|
1 |
| -{% load i18n %} |
2 |
| -{% load core_tags %} |
3 |
| -{% load privacy_tags %} |
4 |
| -{% load core_tags %} |
5 |
| -{% load gravatar %} |
| 1 | +{% load blocktrans trans from i18n %} |
| 2 | +{% load gravatar_url from gravatar %} |
| 3 | +{% load is_admin from privacy_tags %} |
6 | 4 |
|
7 | 5 | {% comment %}
|
8 | 6 |
|
|
15 | 13 | {% block organization_header %}
|
16 | 14 | {# Organization specific notifications only #}
|
17 | 15 | {% if organization %}
|
18 |
| - <readthedocs-notification-list |
19 |
| - url="{% url "organizations-notifications-list" organization.slug %}" |
20 |
| - csrf-token="{{ csrf_token }}"> |
| 16 | + <readthedocs-notification-list url="{% url "organizations-notifications-list" organization.slug %}" |
| 17 | + csrf-token="{{ csrf_token }}" |
| 18 | + class="ui basic segment relaxed list"> |
21 | 19 | </readthedocs-notification-list>
|
22 | 20 | {% endif %}
|
23 | 21 |
|
24 |
| - <div class="ui top attached segment" data-bind="using: CollapsingHeaderView(true)"> |
| 22 | + <div class="ui top attached segment" |
| 23 | + data-bind="using: CollapsingHeaderView(true)"> |
25 | 24 |
|
26 | 25 | {% block organization_header_metadata %}
|
27 | 26 | <div class="ui stacking grid">
|
28 | 27 |
|
29 | 28 | {% block organization_header_title %}
|
30 | 29 | <div class="eight wide computer eight wide tablet sixteen wide mobile middle aligned column">
|
31 |
| - <img class="ui micro rounded right spaced inline image" src="{% gravatar_url organization.email 48 %}" /> |
| 30 | + <img class="ui micro rounded right spaced inline image" |
| 31 | + src="{% gravatar_url organization.email 48 %}" |
| 32 | + alt="{% blocktrans trimmed with organization_name=organization.name %}{{ organization_name }} organization{% endblocktrans %}" /> |
32 | 33 | <a class="ui medium text" href="{{ organization.get_absolute_url }}">
|
33 | 34 | {{ organization.name }}
|
34 | 35 | </a>
|
|
38 | 39 | {% block organization_header_labels %}
|
39 | 40 | <div class="right aligned eight wide computer eight wide tablet sixteen wide left aligned mobile column">
|
40 | 41 | {# The dropdown action button, to swap between expanded/collapsed #}
|
41 |
| - <a class="ui icon primary label" data-bind="click: toggle_collapsed" data-content="{% trans "More organization information" %}"> |
| 42 | + <a class="ui icon primary label" |
| 43 | + data-bind="click: toggle_collapsed" |
| 44 | + data-content="{% trans "More organization information" %}"> |
42 | 45 | <i class="fas fa-caret-down icon" data-bind="class: dropdown_class"></i>
|
43 | 46 | </a>
|
44 | 47 | </div>
|
45 | 48 | {% endblock organization_header_labels %}
|
46 | 49 |
|
47 | 50 | {% block organization_header_metadata_left %}
|
48 |
| - <div |
49 |
| - class="eight wide computer eight wide tablet sixteen wide mobile column" |
50 |
| - data-bind="visible: !is_collapsed()" style="display: none;"> |
| 51 | + <div class="ko hidden eight wide computer eight wide tablet sixteen wide mobile column" |
| 52 | + data-bind="css: {hidden: is_collapsed()}"> |
51 | 53 |
|
52 | 54 | {% block organization_header_description %}
|
53 | 55 | {% if organization.description %}
|
54 |
| - <p> |
55 |
| - {{ organization.description|truncatewords:15 }} |
56 |
| - </p> |
| 56 | + <p>{{ organization.description|truncatewords:15 }}</p> |
57 | 57 | {% endif %}
|
58 |
| - {% endblock %} |
| 58 | + {% endblock organization_header_description %} |
59 | 59 | </div>
|
60 | 60 | {% endblock organization_header_metadata_left %}
|
61 | 61 |
|
62 | 62 | {% block organization_header_metadata_right %}
|
63 |
| - <div |
64 |
| - class="right aligned eight wide computer eight wide tablet sixteen wide mobile column" |
65 |
| - data-bind="visible: !is_collapsed()" style="display: none;"> |
| 63 | + <div class="ko hidden right aligned eight wide computer eight wide tablet sixteen wide mobile column" |
| 64 | + data-bind="css: {hidden: is_collapsed()}"> |
66 | 65 |
|
67 | 66 | {% block organization_header_owners %}
|
68 |
| - <div class="ui sub header"> |
69 |
| - {% trans "Owners" %} |
70 |
| - </div> |
| 67 | + <div class="ui sub header">{% trans "Owners" %}</div> |
71 | 68 |
|
72 | 69 | <div class="ui overlapping avatar images">
|
73 | 70 | {% for user in organization.owners.all|slice:":8" %}
|
74 | 71 | <a href="{% url "profiles_profile_detail" user.username %}">
|
75 |
| - <img class="ui image" src="{% gravatar_url user.email 32 %}" /> |
| 72 | + <img class="ui image" |
| 73 | + src="{% gravatar_url user.email 32 %}" |
| 74 | + alt="{% blocktrans trimmed with username=user.username %}Profile for user {{ username }}{% endblocktrans %}" /> |
76 | 75 | </a>
|
77 | 76 | {% endfor %}
|
78 | 77 |
|
79 | 78 | {% with more_owners=organization.owners.all|slice:"8:"|length %}
|
80 | 79 | {% if more_owners %}
|
81 |
| - <span> |
82 |
| - {% trans "... and {more_maintainers} others" %} |
83 |
| - </span> |
| 80 | + <span>{% trans "... and {more_maintainers} others" %}</span> |
84 | 81 | {% endif %}
|
85 | 82 | {% endwith %}
|
86 | 83 | </div>
|
|
96 | 93 |
|
97 | 94 | {% block organization_header_navigation %}
|
98 | 95 | <div class="ui bottom attached stackable menu">
|
99 |
| - <a class="item {{ projects_active }}" href="{{ organization.get_absolute_url }}"> |
100 |
| - {% trans "Projects" %} |
101 |
| - </a> |
102 |
| - <a class="item {{ teams_active }}" href="{% url "organization_team_list" organization.slug %}"> |
| 96 | + <a class="item {{ projects_active }}" |
| 97 | + href="{{ organization.get_absolute_url }}">{% trans "Projects" %}</a> |
| 98 | + <a class="item {{ teams_active }}" |
| 99 | + href="{% url "organization_team_list" organization.slug %}"> |
103 | 100 | {% trans "Teams" %}
|
104 | 101 | </a>
|
105 |
| - <a class="item {{ members_active }}" href="{% url "organization_members" organization.slug %}"> |
| 102 | + <a class="item {{ members_active }}" |
| 103 | + href="{% url "organization_members" organization.slug %}"> |
106 | 104 | {% trans "Members" %}
|
107 | 105 | </a>
|
108 | 106 | {% if request.user|is_admin:organization %}
|
109 | 107 | <div class="right menu">
|
110 |
| - <a class="item {{ edit_active }}" href="{% url "organization_edit" organization.slug %}"> |
| 108 | + <a class="item {{ edit_active }}" |
| 109 | + href="{% url "organization_edit" organization.slug %}"> |
111 | 110 | <i class="fa-duotone fa-gears icon"></i>
|
112 | 111 | {% trans "Settings" %}
|
113 | 112 | </a>
|
|
0 commit comments