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

Thomas De Schampheleire patrickdepinguin at gmail.com
Sun Feb 22 16:19:44 EST 2015


On Sun, Feb 22, 2015 at 4:44 PM, Mads Kiilerich <mads at kiilerich.com> wrote:
> 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.)

I had a brief look to this second step: templates are currently adding
context variables explicitly when appropriate. This could be a
repository name, but also a username, user group, repo group, ...
How do you suggest to handle this?
In the case of repository name for example, the string is typically
'%s $title' % c.repo_name, but should we assume this is always the
case and that '$title %s' may not be more appropriate?
And does it make sense to treat the repository context from root.html,
but other relevant context like username from the template itself?

Thanks,
Thomas


More information about the kallithea-general mailing list