Skip to content

Commit

Permalink
[#2375] Update legacy templates
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Aug 30, 2012
1 parent f183ff3 commit 672264c
Show file tree
Hide file tree
Showing 17 changed files with 12 additions and 481 deletions.
48 changes: 0 additions & 48 deletions ckan/templates_legacy/_snippet/add-related.html

This file was deleted.

70 changes: 0 additions & 70 deletions ckan/templates_legacy/_util.html
Expand Up @@ -89,20 +89,6 @@
</py:for>
</table>

<!--! List of authorization groups: pass in a collection of authorization groups and
this renders the standard group listing -->
<table class="table table-bordered table-striped table-condensed authorization_groups" py:def="authorization_group_list(authorization_groups)">
<tr><th>Title</th><th>Number of members</th></tr>
<py:for each="authorization_group in authorization_groups">
<tr>
<td><a href="${h.url_for(controller='authorization_group', action='read', id=authorization_group.name or authorization_group.id)}">
${authorization_group.name or authorization_group.id}</a>
</td>
<td>${len(authorization_group.users)}</td>
</tr>
</py:for>
</table>

<!--! Dataset openness icons -->
<img py:def="package_license_icon(package)"
src="${h.url_for('/images/icons/door_%s.png' % 'open' if package.isopen() else 'grey')}"
Expand Down Expand Up @@ -210,41 +196,6 @@ <h5 class="heading" title="${related.title}">${h.markdown_extract(related.title,
</py:for>
</table>

<!--! Copy and paste of above table. Only difference when created was the h.linked_user for the -->
<!--! table rows. How to combine the two? -->
<table class="table table-bordered table-striped table-condensed" py:def="authz_form_group_table(id, roles, users, user_role_dict)">
<tr>
<th>User Group</th>
<py:for each="role in roles">
<th> ${role} </th>
</py:for>
</tr>
<py:for each="user in users">
<tr>
<td>
${h.linked_authorization_group(user)}
</td>
<py:for each="role in roles">
<td>
<input type="hidden" name="${ h.literal( '%s$%s' % (user,role)) }" value="submitted"/>
<py:choose>
<py:when test="user_role_dict[(user,role)]">
<input type="checkbox"
name="${ h.literal( '%s$%s' % (user,role)) }"
checked='checked'/>
</py:when>
<py:otherwise>
<input type="checkbox"
name="${ h.literal( '%s$%s' % (user,role)) }"
/>
</py:otherwise>
</py:choose>
</td>
</py:for>
</tr>
</py:for>
</table>



<table class="table table-bordered table-striped table-condensed" py:def="authz_add_table(roles)">
Expand All @@ -267,27 +218,6 @@ <h5 class="heading" title="${related.title}">${h.markdown_extract(related.title,
</tr>
</table>

<!--! again, copy-and-paste of above, this time to attach different autocompletion -->
<table class="table table-bordered table-striped table-condensed" py:def="authz_add_group_table(roles)">
<tr>
<th>User Group</th>
<py:for each="role in roles">
<th> ${role} </th>
</py:for>
</tr>
<tr>
<td>
<input type="textbox" name="new_user_name" class="autocomplete-authzgroup" />
</td>
<py:for each="role in roles">
<td>
<input type="hidden" name="${ h.literal( '%s' % role) }" value="submitted"/>
<input type="checkbox" name="${ h.literal( '%s' % role) }"/>
</td>
</py:for>
</tr>
</table>


<py:def function="revision_list(revisions, allow_compare=False)">
${revision_list_from_dict(h.convert_to_dict('revisions', revisions), allow_compare=allow_compare)}
Expand Down
21 changes: 0 additions & 21 deletions ckan/templates_legacy/admin/authz.html
Expand Up @@ -24,27 +24,6 @@ <h3>Add Roles for Any User</h3>
<div class="clear"></div>
</form>

<hr/>

<py:if test="c.are_any_authz_groups">
<h3>Existing Roles for Authorization Groups</h3>

<form id="authzgroup_form" method="POST">
${authz_form_group_table('authzgroup_form', c.roles, c.authz_groups, c.authz_groups_role_dict)}
<button type="submit" name="authz_save" class="btn btn-primary">Save Changes</button>
<div class="clear"></div>
</form>

<h3>Add Roles for Any Authorization Group</h3>

<form id="authzgroup_addform" method="POST">
${authz_add_group_table(c.roles)}
<button type="submit" name="authz_add" class="btn btn-primary">Add Role</button>
<div class="clear"></div>
</form>
</py:if>



</div>

Expand Down
Empty file.
52 changes: 0 additions & 52 deletions ckan/templates_legacy/authorization_group/authz.html

This file was deleted.

20 changes: 0 additions & 20 deletions ckan/templates_legacy/authorization_group/edit.html

This file was deleted.

30 changes: 0 additions & 30 deletions ckan/templates_legacy/authorization_group/edit_form.html

This file was deleted.

24 changes: 0 additions & 24 deletions ckan/templates_legacy/authorization_group/index.html

This file was deleted.

43 changes: 0 additions & 43 deletions ckan/templates_legacy/authorization_group/layout.html

This file was deleted.

20 changes: 0 additions & 20 deletions ckan/templates_legacy/authorization_group/new.html

This file was deleted.

26 changes: 0 additions & 26 deletions ckan/templates_legacy/authorization_group/read.html

This file was deleted.

0 comments on commit 672264c

Please sign in to comment.