-
Notifications
You must be signed in to change notification settings - Fork 2k
/
organization.html
69 lines (63 loc) · 2.34 KB
/
organization.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{#
Embeds a organization within the sidebar of a page.
organization - The organization dict.
truncate - A max length for the organization description. If not provided the description
will be full length.
has_context_title - Boolean for whether to display a module-heading for when
this snippet appears within a non-organization template
(e.g. dataset page sidebar)
Example:
{% snippet 'snippets/organization, organization=c.group_dict %}
#}
{% set truncate = truncate or 0 %}
{% set url = h.url_for(controller='organization', action='read', id=organization.name) %}
{% block info %}
<div class="module module-narrow module-shallow context-info">
{% if has_context_title %}
<h2 class="module-heading"><i class="icon-building"></i> {{ _('Organization') }}</h2>
{% endif %}
<section class="module-content">
{% block inner %}
{% block image %}
<div class="image">
<a href="{{ url }}">
<img src="{{ organization.image_display_url or h.url_for_static('/base/images/placeholder-organization.png') }}" width="200" alt="{{ organization.name }}" />
</a>
</div>
{% endblock %}
{% block heading %}
<h1 class="heading">{{ organization.title or organization.name }}</h1>
{% endblock %}
{% block description %}
{% if organization.description %}
<p>
{{ h.markdown_extract(organization.description, 180) }}
{% link_for _('read more'), controller='organization', action='about', id=organization.name %}
</p>
{% else %}
<p class="empty">{{ _('There is no description for this organization') }}</p>
{% endif %}
{% endblock %}
{% if show_nums %}
{% block nums %}
<div class="nums">
<dl>
<dt>{{ _('Followers') }}</dt>
<dd>{{ h.SI_number_span(organization.num_followers) }}</dd>
</dl>
<dl>
<dt>{{ _('Datasets') }}</dt>
<dd>{{ h.SI_number_span(organization.package_count) }}</dd>
</dl>
</div>
{% endblock %}
{% block follow %}
<div class="follow_button">
{{ h.follow_button('group', organization.id) }}
</div>
{% endblock %}
{% endif %}
{% endblock %}
</section>
</div>
{% endblock %}