Skip to content

Commit

Permalink
[#2223]: Packages and revision templates improved.
Browse files Browse the repository at this point in the history
  • Loading branch information
teajaymars committed Mar 22, 2012
1 parent 046b53a commit 54b579b
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 41 deletions.
9 changes: 5 additions & 4 deletions ckan/public/css/style.css
@@ -1,5 +1,5 @@
body.no-sidebar .sidebar-outer { display: none; }
body.no-sidebar #content { border-right: none; }
body.no-sidebar #content { padding-right: 0; border-right: none; }
body.no-sidebar .content-outer {
width: 940px;
}
Expand Down Expand Up @@ -156,6 +156,7 @@ label.control-label {
/* ====== */
/* Tables */
/* ====== */
/*
table th {
border: 1px solid #e0e0e0;
background-color: #e2e2e2;
Expand All @@ -179,13 +180,15 @@ tbody tr:nth-child(even) td, tbody tr.even td {
tbody tr:nth-child(odd) td, tbody tr.odd td {
background-color: #F2F2F2;
}
*/


/* ==================== */
/* Common page elements */
/* ==================== */
#content {
border-right: 1px solid #e0e0e0;
padding-right: 20px;
}
.page_heading {
margin-top: 0.9em;
Expand Down Expand Up @@ -398,8 +401,6 @@ ul.no-break li {
/* Sidebar */
/* ======= */
#sidebar {
margin-right: -10px;
padding-left: 9px;
overflow: hidden;
}
#sidebar h2,
Expand All @@ -408,7 +409,7 @@ ul.no-break li {
}
#sidebar .widget-list {
list-style: none;
padding-left: 0px;
margin-left: 0px;
}
#sidebar .widget-list li.widget-container {
padding-bottom: 1em;
Expand Down
18 changes: 9 additions & 9 deletions ckan/templates/_util.html
Expand Up @@ -147,7 +147,7 @@

<!--! List of dataset groups: pass in a collection of dataset groups
and this renders the standard group listing -->
<table py:def="group_list(groups)" class="groups">
<table class="table table-bordered table-striped table-condensed groups" py:def="group_list(groups)">
<tr><th>Title</th><th>Number of datasets</th><th>Description</th></tr>
<py:for each="group in groups">
<tr>
Expand All @@ -160,7 +160,7 @@

<!--! List of dataset groups: pass in a collection of dataset groups
and this renders the standard group listing. Same as the above, but using dictionaries -->
<table py:def="group_list_from_dict(groups)" class="groups">
<table class="table table-bordered table-striped table-condensed groups" py:def="group_list_from_dict(groups)">
<tr><th>Title</th><th>Number of datasets</th><th>Description</th></tr>
<py:for each="group in groups">
<tr>
Expand All @@ -173,7 +173,7 @@

<!--! List of authorization groups: pass in a collection of authorization groups and
this renders the standard group listing -->
<table py:def="authorization_group_list(authorization_groups)" class="authorization_groups">
<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>
Expand Down Expand Up @@ -238,7 +238,7 @@
</div>
</div><!--! /rating-group -->

<table py:def="authz_form_table(id, roles, users, user_role_dict)">
<table class="table table-bordered table-striped table-condensed" py:def="authz_form_table(id, roles, users, user_role_dict)">
<tr>
<th> User </th>
<py:for each="role in roles">
Expand Down Expand Up @@ -273,7 +273,7 @@

<!--! 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 py:def="authz_form_group_table(id, roles, users, user_role_dict)">
<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">
Expand Down Expand Up @@ -308,7 +308,7 @@



<table py:def="authz_add_table(roles)">
<table class="table table-bordered table-striped table-condensed" py:def="authz_add_table(roles)">
<tr>
<th>User</th>
<py:for each="role in roles">
Expand All @@ -329,7 +329,7 @@
</table>

<!--! again, copy-and-paste of above, this time to attach different autocompletion -->
<table py:def="authz_add_group_table(roles)">
<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">
Expand All @@ -350,7 +350,7 @@
</table>


<table py:def="revision_list(revisions, allow_compare=False)">
<table class="table table-bordered table-striped table-condensed" py:def="revision_list(revisions, allow_compare=False)">
<tr>
<th>Revision</th><th>Timestamp</th><th>Author</th><th>Entity</th><th>Log Message</th>
</tr>
Expand Down Expand Up @@ -403,7 +403,7 @@
</table>


<table py:def="revision_list_from_dict(revisions, allow_compare=False)">
<table class="table table-bordered table-striped table-condensed" py:def="revision_list_from_dict(revisions, allow_compare=False)">
<tr>
<th>Revision</th><th>Timestamp</th><th>Author</th><th>Entity</th><th>Log Message</th>
</tr>
Expand Down
8 changes: 4 additions & 4 deletions ckan/templates/package/authz.html
Expand Up @@ -10,7 +10,7 @@ <h3>Update Existing Roles</h3>

<form id="theform" method="POST">
${authz_form_table('theform', c.roles, c.users, c.user_role_dict)}
<button type="submit" name="save" class="btn primary">
<button type="submit" name="save" class="btn btn-primary">
Save Changes
</button>
<div class="clear"></div>
Expand All @@ -19,7 +19,7 @@ <h3>Update Existing Roles</h3>
<h3>Add Roles for Any User</h3>
<form id="addform" method="POST">
${authz_add_table(c.roles)}
<button type="submit" name="add" class="btn primary">Add Role</button>
<button type="submit" name="add" class="btn btn-primary">Add Role</button>
<div class="clear"></div>
</form>

Expand All @@ -29,15 +29,15 @@ <h3>Update 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 primary">Save Changes</button>
<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 primary">Add Role</button>
<button type="submit" name="authz_add" class="btn btn-primary">Add Role</button>
<div class="clear"></div>
</form>

Expand Down
19 changes: 3 additions & 16 deletions ckan/templates/package/history.html
Expand Up @@ -5,20 +5,7 @@

<py:def function="page_title">${c.pkg_dict.get('title', c.pkg_dict['name'])} - Datasets - History</py:def>
<py:def function="page_heading">History: ${c.pkg.title or c.pkg.name}</py:def>

<!-- Sidebar -->
<!--py:match path="primarysidebar">
<li class="widget-container widget_text">
<h4>Updates</h4>
<p class="atom-feed-link dataset-history-link">
<a
href="${h.url(controller='package', action='history', id=c.pkg_dict['name'], format='atom', days=7)}"
title="${g.site_title} - Dataset History - ${c.pkg_dict['name']}">
Subscribe &raquo;</a>
</p>
</li>
</py:match>
-->
<py:def function="body_class">no-sidebar</py:def>

<div py:match="content" class="dataset">
<h3>Revisions</h3>
Expand All @@ -33,7 +20,7 @@ <h3 py:if="c.error" class="form-errors">

<input type="hidden" name="pkg_name" value="${c.pkg_dict['name']}"/>

<table>
<table class="table table-striped table-bordered table-condensed">
<tr>
<th></th><th>Revision</th><th>Timestamp</th><th>Author</th><th>Log Message</th>
</tr>
Expand All @@ -53,7 +40,7 @@ <h3 py:if="c.error" class="form-errors">
</tr>
</py:for>
</table>
<input type="submit" name="diff" value="${_('Compare &raquo;')}" class="btn primary" />
<input type="submit" name="diff" value="${_('Compare &raquo;')}" class="btn btn-primary" />
</form>
</div> <!-- content -->

Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/package/read_core.html
Expand Up @@ -51,7 +51,7 @@ <h3>Additional Information
${h.subnav_link(c, _('(settings)'), controller='package', action='edit', id=c.pkg.name)}
</py:if></h3>
<div id="dataset-information">
<table>
<table class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>Field</th>
Expand Down
3 changes: 2 additions & 1 deletion ckan/templates/revision/diff.html
Expand Up @@ -3,6 +3,7 @@
py:strip="">

<py:def function="page_title">Differences - Revisions</py:def>
<py:def function="body_class">no-sidebar</py:def>

<div py:match="content">
<h2>Revision Differences -
Expand All @@ -26,7 +27,7 @@ <h2>Revision Differences -
</p>

<py:if test="c.diff">
<table>
<table class="table table-bordered table-striped">
<tr>
<th>Field</th><th>Difference</th>
</tr>
Expand Down
5 changes: 1 addition & 4 deletions ckan/templates/revision/list.html
Expand Up @@ -4,15 +4,12 @@

<py:def function="page_title">Revision History</py:def>
<py:def function="page_heading">Revision History</py:def>
<py:def function="body_class">no-sidebar</py:def>

<py:match path="minornavigation">
<ul class="tabbed">
<li class="current-tab">
${h.subnav_link(c,_('Home'), controller='revision', action='index')}</li>
<!--li class="action">
${h.subnav_link(c, h.icon('atom_feed') + _('Subscribe'),
controller='revision', action='index', format='atom', days=1)}
</li-->
</ul>
</py:match>

Expand Down
4 changes: 2 additions & 2 deletions ckan/templates/revision/read.html
Expand Up @@ -17,10 +17,10 @@ <h2>Revision Actions</h2>
id=c.revision.id)}"
>
<py:if test="c.revision.state!='deleted'">
<button type="submit" name="action" value="delete" class="btn">Delete</button>
<button type="submit" name="action" value="delete" class="btn btn-danger">Delete</button>
</py:if>
<py:if test="c.revision.state=='deleted'">
<button type="submit" name="action" value="undelete" class="btn">Undelete</button>
<button type="submit" name="action" value="undelete" class="btn btn-danger">Undelete</button>
</py:if>
</form>
</div>
Expand Down

0 comments on commit 54b579b

Please sign in to comment.