Skip to content

Commit

Permalink
Wrap inner 2ndary content in block
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmartin committed Nov 13, 2012
1 parent f561cba commit 6daf68c
Showing 1 changed file with 53 additions and 51 deletions.
104 changes: 53 additions & 51 deletions ckan/templates/user/read_base.html
Expand Up @@ -36,60 +36,62 @@
{% block secondary_content %}
<div class="module profile-info">
<section class="module-content">
<div class="avatar">{{ h.linked_gravatar(user.email_hash, 180) }}</div>
<h1 class="heading">{{ user.fullname or _('No full name provided') }}</h1>
{% if c.about_formatted %}
{{ c.about_formatted }}
{% else %}
<p class="empty">
{% block secondary_content_inner %}
<div class="avatar">{{ h.linked_gravatar(user.email_hash, 180) }}</div>
<h1 class="heading">{{ user.fullname or _('No full name provided') }}</h1>
{% if c.about_formatted %}
{{ c.about_formatted }}
{% else %}
<p class="empty">
{% if c.is_myself %}
{% trans %}You have not provided a biography.{% endtrans %}
{% else %}
{% trans %}This user has no biography.{% endtrans %}
{% endif %}
</p>
{% endif %}
<div class="nums">
<dl>
<dt>{{ _('Followers') }}</dt>
<dd>{{ user.num_followers }}</dd>
</dl>
<dl>
<dt>{{ _('Datasets') }}</dt>
<dd>{{ user.number_administered_packages }}</dd>
</dl>
<dl>
<dt>{{ _('Edits') }}</dt>
<dd>{{ user.number_of_edits }}</dd>
</dl>
</div>
<div class="info">
<dl>
{% if user.name.startswith('http://') or user.name.startswith('https://') %}
<dt>{{ _('Open ID') }}</dt>
<dd>{{ user.name|urlize(25) }}{# Be great if this just showed the domain #}</dd>
{% else %}
<dt>{{ _('Username') }}</dt>
<dd>{{ user.name }}</dd>
{% endif %}
</dl>
{% if c.is_myself %}
{% trans %}You have not provided a biography.{% endtrans %}
{% else %}
{% trans %}This user has no biography.{% endtrans %}
<dl>
<dt>{{ _('Email') }} <span class="label" title="{{ _('This means only you can see this') }}">{{ _('Private') }}</span></dt>
<dd>{{ user.email }}</dd>
</dl>
{% endif %}
</p>
{% endif %}
<div class="nums">
<dl>
<dt>{{ _('Followers') }}</dt>
<dd>{{ user.num_followers }}</dd>
</dl>
<dl>
<dt>{{ _('Datasets') }}</dt>
<dd>{{ user.number_administered_packages }}</dd>
</dl>
<dl>
<dt>{{ _('Edits') }}</dt>
<dd>{{ user.number_of_edits }}</dd>
</dl>
</div>
<div class="info">
<dl>
{% if user.name.startswith('http://') or user.name.startswith('https://') %}
<dt>{{ _('Open ID') }}</dt>
<dd>{{ user.name|urlize(25) }}{# Be great if this just showed the domain #}</dd>
{% else %}
<dt>{{ _('Username') }}</dt>
<dd>{{ user.name }}</dd>
<dl>
<dt>{{ _('Member Since') }}</dt>
<dd>{{ h.render_datetime(user.created) }}</dd>
</dl>
{% if c.is_myself %}
<dl>
<dt class="key">{{ _('API Key') }} <span class="label" title="{{ _('This means only you can see this') }}">{{ _('Private') }}</span></dt>
<dd class="value"><code>{{ user.apikey }}</code></dd>
</dl>
{% endif %}
</dl>
{% if c.is_myself %}
<dl>
<dt>{{ _('Email') }} <span class="label" title="{{ _('This means only you can see this') }}">{{ _('Private') }}</span></dt>
<dd>{{ user.email }}</dd>
</dl>
{% endif %}
<dl>
<dt>{{ _('Member Since') }}</dt>
<dd>{{ h.render_datetime(user.created) }}</dd>
</dl>
{% if c.is_myself %}
<dl>
<dt class="key">{{ _('API Key') }} <span class="label" title="{{ _('This means only you can see this') }}">{{ _('Private') }}</span></dt>
<dd class="value"><code>{{ user.apikey }}</code></dd>
</dl>
{% endif %}
</div>
</div>
{% endblock %}
</section>
</div>
{% endblock %}

0 comments on commit 6daf68c

Please sign in to comment.