[PATCH] my pull requests: fix page title when no site branding is set

Mads Kiilerich mads at kiilerich.com
Sun Feb 22 10:44:05 EST 2015


On 02/21/2015 08:48 PM, Thomas De Schampheleire wrote:
> # HG changeset patch
> # User Thomas De Schampheleire <thomas.de_schampheleire at alcatel-lucent.com>
> # Date 1423170039 -3600
> #      Thu Feb 05 22:00:39 2015 +0100
> # Node ID d5ca82fa417e49d1cec4989e895bb95397fccdc2
> # Parent  9df497f29cf2538f29440e66013bc7f864395082
> my pull requests: fix page title when no site branding is set
>
> Just like any other page, the 'middot' between the page name and site name
> should only be visible if a site name has been specified.

It seems like it would be even better to remove the duplication of code 
and move all the site_name header handling to root.html?

(Next step could be to also show repo_name if there is one in the context.)

/Mads


>
> diff --git a/kallithea/templates/pullrequests/pullrequest_show_my.html b/kallithea/templates/pullrequests/pullrequest_show_my.html
> --- a/kallithea/templates/pullrequests/pullrequest_show_my.html
> +++ b/kallithea/templates/pullrequests/pullrequest_show_my.html
> @@ -1,7 +1,10 @@
>   <%inherit file="/base/base.html"/>
>   
>   <%def name="title()">
> -    ${_('My Pull Requests')} · ${c.site_name}
> +    ${_('My Pull Requests')}
> +    %if c.site_name:
> +        · ${c.site_name}
> +    %endif
>   </%def>
>   
>   <%def name="breadcrumbs_links()">
> _______________________________________________
> kallithea-general mailing list
> kallithea-general at sfconservancy.org
> http://lists.sfconservancy.org/mailman/listinfo/kallithea-general



More information about the kallithea-general mailing list