# HG changeset patch # User Mads Kiilerich # Date 2017-06-25 18:28:32 # Node ID e77f5cd50f1fc9733ccf56eb8fc5bcc3c0922ead # Parent f17431fde3c7af39b9c2176766bb2472ffa5874c style: change some div to span to make it inline and look better without custom styling - especially around gravatars diff --git a/kallithea/lib/helpers.py b/kallithea/lib/helpers.py --- a/kallithea/lib/helpers.py +++ b/kallithea/lib/helpers.py @@ -830,7 +830,7 @@ from kallithea.lib.auth import HasPermis # GRAVATAR URL #============================================================================== def gravatar_div(email_address, cls='', size=30, **div_attributes): - """Return an html literal with a div around a gravatar if they are enabled. + """Return an html literal with a span around a gravatar if they are enabled. Extra keyword parameters starting with 'div_' will get the prefix removed and '_' changed to '-' and be used as attributes on the div. The default class is 'gravatar'. @@ -844,7 +844,7 @@ def gravatar_div(email_address, cls='', for k, v in sorted(div_attributes.items()): assert k.startswith('div_'), k attributes.append(' %s="%s"' % (k[4:].replace('_', '-'), escape(v))) - return literal("""%s""" % + return literal("""%s""" % (''.join(attributes), gravatar(email_address, cls=cls, size=size))) diff --git a/kallithea/public/css/style.css b/kallithea/public/css/style.css --- a/kallithea/public/css/style.css +++ b/kallithea/public/css/style.css @@ -1165,14 +1165,6 @@ a.metatag[data-tag="license"]:hover { margin-right: 10px; } -#journal .journal_container { - clear: both; -} - -#journal .journal_action_container { - padding-left: 18px; -} - #journal .journal_user { color: #747474; font-size: 14px; diff --git a/kallithea/templates/admin/gists/index.html b/kallithea/templates/admin/gists/index.html --- a/kallithea/templates/admin/gists/index.html +++ b/kallithea/templates/admin/gists/index.html @@ -43,10 +43,10 @@ % for gist in c.gists_pager:
${h.gravatar_div(gist.owner.email, size=28)} -
+ ${h.person(gist.owner.full_contact)} / gist: ${gist.gist_access_id} -
+
${_('Created')} ${h.age(gist.created_on)} / diff --git a/kallithea/templates/admin/notifications/notifications_data.html b/kallithea/templates/admin/notifications/notifications_data.html --- a/kallithea/templates/admin/notifications/notifications_data.html +++ b/kallithea/templates/admin/notifications/notifications_data.html @@ -3,8 +3,8 @@
%for notification in c.notifications:
- ${h.gravatar_div(notification.notification.created_by_user.email, size=24)} + ${h.gravatar_div(notification.notification.created_by_user.email, size=24)} ${notification.notification.description} diff --git a/kallithea/templates/files/files_browser.html b/kallithea/templates/files/files_browser.html --- a/kallithea/templates/files/files_browser.html +++ b/kallithea/templates/files/files_browser.html @@ -29,10 +29,10 @@
${h.form(h.url.current())}
-
${_('Revision')}
-
-
${h.text('at_rev',value=c.changeset.revision,size=5,class_='form-control input-sm')}
-
+ ${_('Revision')} + + ${h.text('at_rev',value=c.changeset.revision,size=5,class_='form-control input-sm')} +
${h.end_form()}
diff --git a/kallithea/templates/journal/journal_data.html b/kallithea/templates/journal/journal_data.html --- a/kallithea/templates/journal/journal_data.html +++ b/kallithea/templates/journal/journal_data.html @@ -4,16 +4,15 @@ %for day,items in c.journal_day_aggregate:

${day}

% for user,entries in items: -
+
${h.gravatar_div(user.email if user else 'anonymous@kallithea-scm.org', size=24)} %if user: -
${user.name} ${user.lastname}
+ ${user.name} ${user.lastname} %else: -
${entries[0].username}
+ ${entries[0].username} %endif -
% for entry in entries: -
+
${h.action_parser(entry)[2]()}
@@ -34,7 +33,6 @@
%endfor -
%endfor %endfor