Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#1056] Fix for 500 error on group create page
Also fixes for: * Group/Org edit template: added missing context in sidebar * Group/Org new template: added missing helper text * Small template refactors: moving group context info into snippet and also group/org helpers into snippets
- Loading branch information
1 parent
e99500b
commit fd05521
Showing
11 changed files
with
86 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div class="module module-narrow module-shallow"> | ||
<h2 class="module-heading"> | ||
<i class="icon-info-sign"></i> | ||
{{ _('What are Groups?') }} | ||
</h2> | ||
<div class="module-content"> | ||
{% trans %} | ||
<p>Groups allow you to group together datasets under a community (for | ||
example, Civil Liberty data) or topic (e.g. Transport, Health, | ||
Environment) to make it easier for users to browse datasets by theme. | ||
Datasets can be part of a group, but do not belong to the group for | ||
editing or authorisation purposes.</p> | ||
{% endtrans %} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<div class="module context-info"> | ||
<section class="module-content"> | ||
<div class="image"> | ||
<a href="{{ group.url }}"> | ||
<img src="{{ group.image_url or h.url_for_static('/base/images/placeholder-group.png') }}" width="190" height="118" alt="{{ group.name }}" /> | ||
</a> | ||
</div> | ||
<h1 class="heading">{{ group.display_name }}</h1> | ||
{% if group.description %} | ||
<p> | ||
{{ h.markdown_extract(group.description, 180) }} | ||
{% link_for _('read more'), controller='group', action='about', id=group.name %} | ||
</p> | ||
{% else %} | ||
<p class="empty">{{ _('There is no description for this group') }}</p> | ||
{% endif %} | ||
{% if show_nums %} | ||
<div class="nums"> | ||
<dl> | ||
<dt>{{ _('Followers') }}</dt> | ||
<dd>{{ h.SI_number_span(group.num_followers) }}</dd> | ||
</dl> | ||
<dl> | ||
<dt>{{ _('Datasets') }}</dt> | ||
<dd>{{ h.SI_number_span(group.packages|length) }}</dd> | ||
</dl> | ||
</div> | ||
<div class="follow_button"> | ||
{{ h.follow_button('group', group.id) }} | ||
</div> | ||
{% endif %} | ||
</section> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<div class="module module-narrow module-shallow"> | ||
<h2 class="module-heading"> | ||
<i class="icon-info-sign"></i> | ||
{{ _('What are Organizations?') }} | ||
</h2> | ||
<div class="module-content"> | ||
{% trans %} | ||
<p>Organizations act like publishing departments for datasets (for | ||
example, the Department of Health). This means that datasets can be | ||
published by and belong to a department instead of an individual | ||
user.</p> | ||
<p>Within organizations, admins can assign roles and authorisation its | ||
members, giving individual users the right to publish datasets from | ||
that particular organisation (e.g. Office of National Statistics).</p> | ||
{% endtrans %} | ||
</div> | ||
</div> |