Renamed templates/soc/entity/list/entity_*.html to *.html
This makes it possible to generalize list template positions.
Patch by: Sverre Rabbelier
--- a/app/soc/templates/soc/document/list/docs_heading.html Sat Nov 22 13:59:34 2008 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-<tr align="left">
- <th>Path</th>
- <th>Title</th>
- <th>Link ID</th>
- <th>Featured</th>
- <th>Created By</th>
- <th>Created On</th>
- <th>Modified</th>
-</tr>
--- a/app/soc/templates/soc/document/list/docs_row.html Sat Nov 22 13:59:34 2008 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
- <td align="right">
- <div class="title">
- <a class="noul"
- href="{{ list.redirect }}">{{ list.item.scope_path}}/{{ list.item.link_id }}</a>
- </div>
- </td>
- <td><div class="title">{{ list.item.title }}</div></td>
- <td><div class="link_id">{{ list.item.link_id }}</div></td>
- <td><div class="featured">{{ list.item.is_featured }}</div></td>
- <td><div class="author">{{ list.item.author.link_id }}</div></td>
- <td><div class="created">{{ list.item.created }}</div></td>
- <td><div class="modified">{{ list.item.modified }}</div></td>
-</tr>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/document/list/heading.html Sat Nov 22 14:01:39 2008 +0000
@@ -0,0 +1,9 @@
+<tr align="left">
+ <th>Path</th>
+ <th>Title</th>
+ <th>Link ID</th>
+ <th>Featured</th>
+ <th>Created By</th>
+ <th>Created On</th>
+ <th>Modified</th>
+</tr>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/document/list/row.html Sat Nov 22 14:01:39 2008 +0000
@@ -0,0 +1,15 @@
+<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
+onclick="document.location.href='{{ list.redirect }}'" name="name">
+ <td align="right">
+ <div class="title">
+ <a class="noul"
+ href="{{ list.redirect }}">{{ list.item.scope_path}}/{{ list.item.link_id }}</a>
+ </div>
+ </td>
+ <td><div class="title">{{ list.item.title }}</div></td>
+ <td><div class="link_id">{{ list.item.link_id }}</div></td>
+ <td><div class="featured">{{ list.item.is_featured }}</div></td>
+ <td><div class="author">{{ list.item.author.link_id }}</div></td>
+ <td><div class="created">{{ list.item.created }}</div></td>
+ <td><div class="modified">{{ list.item.modified }}</div></td>
+</tr>
--- a/app/soc/templates/soc/group/list/group_heading.html Sat Nov 22 13:59:34 2008 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-<tr align="left">
- <th class="first" align="right">Name</th>
- <th>Link ID</th>
- <th>Short name</th>
-</tr>
--- a/app/soc/templates/soc/group/list/group_row.html Sat Nov 22 13:59:34 2008 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
- <td align="right"><div class="name"><a class="noul"
- href="{{ list.redirect }}">{{ list.item.name }}</a>
- </div>
- </td>
- <td><div class="link_id">{{ list.item.link_id }}</a></div></td>
- <td><div class="short_name">{{ list.item.short_name }}</div></td>
-</tr>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/group/list/heading.html Sat Nov 22 14:01:39 2008 +0000
@@ -0,0 +1,5 @@
+<tr align="left">
+ <th class="first" align="right">Name</th>
+ <th>Link ID</th>
+ <th>Short name</th>
+</tr>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/group/list/row.html Sat Nov 22 14:01:39 2008 +0000
@@ -0,0 +1,9 @@
+<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
+onclick="document.location.href='{{ list.redirect }}'" name="name">
+ <td align="right"><div class="name"><a class="noul"
+ href="{{ list.redirect }}">{{ list.item.name }}</a>
+ </div>
+ </td>
+ <td><div class="link_id">{{ list.item.link_id }}</a></div></td>
+ <td><div class="short_name">{{ list.item.short_name }}</div></td>
+</tr>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/host/list/heading.html Sat Nov 22 14:01:39 2008 +0000
@@ -0,0 +1,6 @@
+<tr align="left">
+ <th class="first" align="right">User link ID</th>
+ <th>Sponsor name</th>
+ <th>Given name</th>
+ <th>Surname</th>
+</tr>
--- a/app/soc/templates/soc/host/list/host_heading.html Sat Nov 22 13:59:34 2008 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<tr align="left">
- <th class="first" align="right">User link ID</th>
- <th>Sponsor name</th>
- <th>Given name</th>
- <th>Surname</th>
-</tr>
--- a/app/soc/templates/soc/host/list/host_row.html Sat Nov 22 13:59:34 2008 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='/{{ entity_type|lower }}/edit/{{ list.item.sponsor.link_id }}/{{ list.item.user.link_id }}'" name="name">
- <td align="right"><div class="user_link_id"><a class="noul"
- href="/{{ entity_type|lower }}/edit/{{ list.item.sponsor.link_id }}/{{ list.item.user.link_id }}">{{ list.item.user.link_id }}</a>
- </div>
- </td>
- <td><div class="sponsor_name">{{ list.item.sponsor.name }}</div></td>
- <td><div class="given_name">{{ list.item.given_name }}</div></td>
- <td><div class="surname">{{ list.item.surname }}</div></td>
-</tr>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/host/list/row.html Sat Nov 22 14:01:39 2008 +0000
@@ -0,0 +1,10 @@
+<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
+onclick="document.location.href='/{{ entity_type|lower }}/edit/{{ list.item.sponsor.link_id }}/{{ list.item.user.link_id }}'" name="name">
+ <td align="right"><div class="user_link_id"><a class="noul"
+ href="/{{ entity_type|lower }}/edit/{{ list.item.sponsor.link_id }}/{{ list.item.user.link_id }}">{{ list.item.user.link_id }}</a>
+ </div>
+ </td>
+ <td><div class="sponsor_name">{{ list.item.sponsor.name }}</div></td>
+ <td><div class="given_name">{{ list.item.given_name }}</div></td>
+ <td><div class="surname">{{ list.item.surname }}</div></td>
+</tr>
--- a/app/soc/templates/soc/list/list_heading.html Sat Nov 22 13:59:34 2008 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<tr align="left">
- <th class="first" align="right">Default Heading</th>
-</tr>
--- a/app/soc/templates/soc/list/list_main.html Sat Nov 22 13:59:34 2008 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-{{ list.description }}
-
-<div class="list">
- {% include list.pagination %}
-
- <table id="queues">
- {% if not list.rows %}
- <tr><td colspan="9"><span class="disabled">(None)</span></td></tr>
- {% else %}
- {% include list.heading %}
- {% for _ in list.rows %}
- {% include list.next_row %}
- {% endfor %}
- {% endif %}
- </table>
-
- {% include list.pagination %}
-
-</div>
\ No newline at end of file
--- a/app/soc/templates/soc/list/list_pagination.html Sat Nov 22 13:59:34 2008 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<div class="pagination">
-
- {{ pagination_form.as_table }}
-
- {% if list.newest %}
- <a class="novisit" href="{{ list.newest }}">« First</a>
- {% endif %}
- {% if list.prev %}
- <a class="novisit" href="{{ list.prev }}">‹ Previous</a>
- {% endif %}
- <b>{{ list.first }}{% if list.last %} - {{ list.last }}{% endif %}</b>
- {% if list.next %}<a class="novisit" href="{{ list.next }}">Next ›</a>
- {% endif %}
-</div>
--- a/app/soc/templates/soc/list/list_row.html Sat Nov 22 13:59:34 2008 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href=''" name="name">
- <td align="right"><div class="id"><a class="noul"
- href="">{{ list.item }}</a>
- </div>
- </td>
-</tr>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/list/main.html Sat Nov 22 14:01:39 2008 +0000
@@ -0,0 +1,19 @@
+{{ list.description }}
+
+<div class="list">
+ {% include list.pagination %}
+
+ <table id="queues">
+ {% if not list.rows %}
+ <tr><td colspan="9"><span class="disabled">(None)</span></td></tr>
+ {% else %}
+ {% include list.heading %}
+ {% for _ in list.rows %}
+ {% include list.next_row %}
+ {% endfor %}
+ {% endif %}
+ </table>
+
+ {% include list.pagination %}
+
+</div>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/list/pagination.html Sat Nov 22 14:01:39 2008 +0000
@@ -0,0 +1,14 @@
+<div class="pagination">
+
+ {{ pagination_form.as_table }}
+
+ {% if list.newest %}
+ <a class="novisit" href="{{ list.newest }}">« First</a>
+ {% endif %}
+ {% if list.prev %}
+ <a class="novisit" href="{{ list.prev }}">‹ Previous</a>
+ {% endif %}
+ <b>{{ list.first }}{% if list.last %} - {{ list.last }}{% endif %}</b>
+ {% if list.next %}<a class="novisit" href="{{ list.next }}">Next ›</a>
+ {% endif %}
+</div>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/presence/list/heading.html Sat Nov 22 14:01:39 2008 +0000
@@ -0,0 +1,4 @@
+<tr align="left">
+ <th class="first" align="right">Path</th>
+ <th>Home Document</th>
+</tr>
--- a/app/soc/templates/soc/presence/list/home_heading.html Sat Nov 22 13:59:34 2008 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-<tr align="left">
- <th class="first" align="right">Path</th>
- <th>Home Document</th>
-</tr>
--- a/app/soc/templates/soc/presence/list/home_row.html Sat Nov 22 13:59:34 2008 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
- <td align="right">
- <div class="title">
- <a class="noul"
- href="{{ list.redirect }}">{{ list.item.scope_path}}/{{ list.item.link_id }}</a>
- </div>
- </td>
- <td><div class="link_id">{{ list.item.home.title }}</div></td>
-</tr>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/presence/list/row.html Sat Nov 22 14:01:39 2008 +0000
@@ -0,0 +1,10 @@
+<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
+onclick="document.location.href='{{ list.redirect }}'" name="name">
+ <td align="right">
+ <div class="title">
+ <a class="noul"
+ href="{{ list.redirect }}">{{ list.item.scope_path}}/{{ list.item.link_id }}</a>
+ </div>
+ </td>
+ <td><div class="link_id">{{ list.item.home.title }}</div></td>
+</tr>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/request/list/heading.html Sat Nov 22 14:01:39 2008 +0000
@@ -0,0 +1,7 @@
+<tr align="left">
+ <th class="first" align="right">Requester</th>
+ <th>Role</th>
+ <th>To</th>
+ <th>Accepted</th>
+ <th>Declined</th>
+</tr>
--- a/app/soc/templates/soc/request/list/request_heading.html Sat Nov 22 13:59:34 2008 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-<tr align="left">
- <th class="first" align="right">Requester</th>
- <th>Role</th>
- <th>To</th>
- <th>Accepted</th>
- <th>Declined</th>
-</tr>
--- a/app/soc/templates/soc/request/list/request_row.html Sat Nov 22 13:59:34 2008 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
- <td align="right"><div class="user_link_id"><a class="noul"
- href="{{ list.redirect }}">{{ list.item.requester.link_id }}</a>
- </div>
- </td>
- <td><div class="role">{{ list.item.role }}</div></td>
- <td><div class="to">{{ list.item.to.link_id }}</div></td>
- <td><div class="accepted">{{ list.item.accepted }}</div></td>
- <td><div class="declined">{{ list.item.declined }}</div></td>
-</tr>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/request/list/row.html Sat Nov 22 14:01:39 2008 +0000
@@ -0,0 +1,11 @@
+<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
+onclick="document.location.href='{{ list.redirect }}'" name="name">
+ <td align="right"><div class="user_link_id"><a class="noul"
+ href="{{ list.redirect }}">{{ list.item.requester.link_id }}</a>
+ </div>
+ </td>
+ <td><div class="role">{{ list.item.role }}</div></td>
+ <td><div class="to">{{ list.item.to.link_id }}</div></td>
+ <td><div class="accepted">{{ list.item.accepted }}</div></td>
+ <td><div class="declined">{{ list.item.declined }}</div></td>
+</tr>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/site/list/heading.html Sat Nov 22 14:01:39 2008 +0000
@@ -0,0 +1,4 @@
+<tr align="left">
+ <th class="first" align="right">Path</th>
+ <th>Home Document</th>
+</tr>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/site/list/row.html Sat Nov 22 14:01:39 2008 +0000
@@ -0,0 +1,10 @@
+<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
+onclick="document.location.href='/site/settings/edit/{{ list.item.scope_path }}/{{ list.item.link_id }}'" name="name">
+ <td align="right">
+ <div class="title">
+ <a class="noul"
+ href="/site/settings/edit/{{ list.item.scope_path }}/{{ list.item.link_id }}">{{ list.item.scope_path}}/{{ list.item.link_id }}</a>
+ </div>
+ </td>
+ <td><div class="link_id">{{ list.item.home.title }}</div></td>
+</tr>
--- a/app/soc/templates/soc/site/list/site_heading.html Sat Nov 22 13:59:34 2008 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-<tr align="left">
- <th class="first" align="right">Path</th>
- <th>Home Document</th>
-</tr>
--- a/app/soc/templates/soc/site/list/site_row.html Sat Nov 22 13:59:34 2008 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='/site/settings/edit/{{ list.item.scope_path }}/{{ list.item.link_id }}'" name="name">
- <td align="right">
- <div class="title">
- <a class="noul"
- href="/site/settings/edit/{{ list.item.scope_path }}/{{ list.item.link_id }}">{{ list.item.scope_path}}/{{ list.item.link_id }}</a>
- </div>
- </td>
- <td><div class="link_id">{{ list.item.home.title }}</div></td>
-</tr>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/user/list/heading.html Sat Nov 22 14:01:39 2008 +0000
@@ -0,0 +1,6 @@
+<tr align="left">
+ <th class="first" align="right">Account</th>
+ <th>Email</th>
+ <th>Public name</th>
+ <th>Link ID</th>
+</tr>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/user/list/row.html Sat Nov 22 14:01:39 2008 +0000
@@ -0,0 +1,10 @@
+<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
+onclick="document.location.href='{{ list.redirect }}'" name="name">
+ <td align="right"><div class="account"><a class="noul"
+ href="{{ list.redirect }}">{{ list.item.account }}</a>
+ </div>
+ </td>
+ <td><div class="email">{{ list.item.account.email }}</a></div></td>
+ <td><div class="name">{{ list.item.name }}</div></td>
+ <td><div class="link_id">{{ list.item.link_id }}</div></td>
+</tr>
--- a/app/soc/templates/soc/user/list/user_heading.html Sat Nov 22 13:59:34 2008 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<tr align="left">
- <th class="first" align="right">Account</th>
- <th>Email</th>
- <th>Public name</th>
- <th>Link ID</th>
-</tr>
--- a/app/soc/templates/soc/user/list/user_row.html Sat Nov 22 13:59:34 2008 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
- <td align="right"><div class="account"><a class="noul"
- href="{{ list.redirect }}">{{ list.item.account }}</a>
- </div>
- </td>
- <td><div class="email">{{ list.item.account.email }}</a></div></td>
- <td><div class="name">{{ list.item.name }}</div></td>
- <td><div class="link_id">{{ list.item.link_id }}</div></td>
-</tr>
--- a/app/soc/views/models/base.py Sat Nov 22 13:59:34 2008 +0000
+++ b/app/soc/views/models/base.py Sat Nov 22 14:01:39 2008 +0000
@@ -98,8 +98,10 @@
new_params = {}
new_params['rights'] = rights
- new_params['create_redirect'] = '/%s' % params['url_name']
- new_params['missing_redirect'] = '/%s/create' % params['url_name']
+ new_params['create_redirect'] = '/%(url_name)s' % params
+ new_params['missing_redirect'] = '/%(url_name)s/create' % params
+ new_params['delete_redirect'] = '/%(url_name)s/list' % params
+ new_params['invite_redirect'] = '/request/list'
new_params['sidebar'] = None
new_params['sidebar_defaults'] = [
@@ -127,13 +129,17 @@
'soc.views.models.%s.list', 'List %(name_plural)s'),
]
+ new_params['public_template'] = 'soc/%(module_name)s/public.html' % params
+ new_params['create_template'] = 'soc/models/edit.html'
new_params['edit_template'] = 'soc/models/edit.html'
new_params['list_template'] = 'soc/models/list.html'
new_params['invite_template'] = 'soc/models/invite.html'
- new_params['list_main'] = 'soc/list/list_main.html'
- new_params['list_pagination'] = 'soc/list/list_pagination.html'
-
+ new_params['list_main'] = 'soc/list/main.html'
+ new_params['list_pagination'] = 'soc/list/pagination.html'
+ new_params['list_row'] = 'soc/%(module_name)s/list/row.html' % params
+ new_params['list_heading'] = 'soc/%(module_name)s/list/heading.html' % params
+
new_params['list_action'] = '/' + params['url_name'] + '/edit'
new_params['list_params'] = {
'list_action': 'action',
@@ -526,7 +532,7 @@
if access_type not in rights:
for check in rights['unspecified']:
# No checks defined, so do the 'generic check' and bail out
- check(request, access_type)
+ check(request)
return
for check in rights[access_type]:
--- a/app/soc/views/models/document.py Sat Nov 22 13:59:34 2008 +0000
+++ b/app/soc/views/models/document.py Sat Nov 22 14:01:39 2008 +0000
@@ -103,14 +103,6 @@
params['edit_form'] = EditForm
params['create_form'] = CreateForm
- # TODO(tlarsen) Add support for Django style template lookup
- params['public_template'] = 'soc/document/public.html'
-
- params['list_row'] = 'soc/document/list/docs_row.html'
- params['list_heading'] = 'soc/document/list/docs_heading.html'
-
- params['delete_redirect'] = '/' + params['url_name'] + '/list'
-
params = dicts.merge(original_params, params)
base.View.__init__(self, params=params)
--- a/app/soc/views/models/host.py Sat Nov 22 13:59:34 2008 +0000
+++ b/app/soc/views/models/host.py Sat Nov 22 14:01:39 2008 +0000
@@ -101,15 +101,6 @@
params['edit_form'] = EditForm
params['create_form'] = CreateForm
- # TODO(tlarsen) Add support for Django style template lookup
- params['public_template'] = 'soc/host/public.html'
-
- params['list_row'] = 'soc/host/list/host_row.html'
- params['list_heading'] = 'soc/host/list/host_heading.html'
-
- params['delete_redirect'] = '/' + params['url_name'] + '/list'
- params['invite_redirect'] = '/request/list'
-
params = dicts.merge(original_params, params)
role.RoleView.__init__(self, original_params=params)
--- a/app/soc/views/models/presence.py Sat Nov 22 13:59:34 2008 +0000
+++ b/app/soc/views/models/presence.py Sat Nov 22 14:01:39 2008 +0000
@@ -118,14 +118,6 @@
params['edit_form'] = EditForm
params['create_form'] = CreateForm
- # TODO(tlarsen) Add support for Django style template lookup
- params['public_template'] = 'soc/presence/public.html'
-
- params['list_row'] = 'soc/presence/list/home_row.html'
- params['list_heading'] = 'soc/presence/list/home_heading.html'
-
- params['delete_redirect'] = '/' + params['url_name'] + '/list'
-
params = dicts.merge(original_params, params)
base.View.__init__(self, params=params)
--- a/app/soc/views/models/request.py Sat Nov 22 13:59:34 2008 +0000
+++ b/app/soc/views/models/request.py Sat Nov 22 14:01:39 2008 +0000
@@ -109,12 +109,6 @@
params['edit_form'] = EditForm
params['create_form'] = CreateForm
- # TODO(tlarsen) Add support for Django style template lookup
- params['public_template'] = 'soc/request/public.html'
-
- params['list_row'] = 'soc/request/list/request_row.html'
- params['list_heading'] = 'soc/request/list/request_heading.html'
-
params['sidebar_defaults'] = [('/%s/list', 'List %(name_plural)s')]
params['delete_redirect'] = '/' + params['url_name'] + '/list'
--- a/app/soc/views/models/site.py Sat Nov 22 13:59:34 2008 +0000
+++ b/app/soc/views/models/site.py Sat Nov 22 14:01:39 2008 +0000
@@ -95,17 +95,13 @@
params['sidebar_defaults'] = [('/%s/edit', 'Edit %(name)s')]
params['sidebar_heading'] = params['name_short']
- params['lists_template'] = {
- 'list_main': 'soc/list/list_main.html',
- 'list_pagination': 'soc/list/list_pagination.html',
- 'list_row': 'soc/site/list/site_row.html',
- 'list_heading': 'soc/site/list/site_heading.html',
- }
+ params['public_template'] = 'soc/home/public.html'
- params['delete_redirect'] = '/' + params['url_name'] + '/list'
params['rights'] = {
+ 'unspecified': [access.checkIsDeveloper],
'any_access': [access.allow],
- 'public': [access.allow]}
+ 'public': [access.allow]
+ }
params = dicts.merge(original_params, params)
--- a/app/soc/views/models/sponsor.py Sat Nov 22 13:59:34 2008 +0000
+++ b/app/soc/views/models/sponsor.py Sat Nov 22 14:01:39 2008 +0000
@@ -122,10 +122,8 @@
params['edit_template'] = 'soc/sponsor/edit.html'
params['public_template'] = 'soc/group/public.html'
- params['list_row'] = 'soc/group/list/group_row.html'
- params['list_heading'] = 'soc/group/list/group_heading.html'
-
- params['delete_redirect'] = '/' + params['url_name'] + '/list'
+ params['list_row'] = 'soc/group/list/row.html'
+ params['list_heading'] = 'soc/group/list/heading.html'
params = dicts.merge(original_params, params)
--- a/app/soc/views/models/user.py Sat Nov 22 13:59:34 2008 +0000
+++ b/app/soc/views/models/user.py Sat Nov 22 14:01:39 2008 +0000
@@ -176,14 +176,6 @@
params['edit_form'] = EditForm
params['create_form'] = CreateForm
- # TODO(tlarsen) Add support for Django style template lookup
- params['public_template'] = 'soc/user/public.html'
-
- params['list_row'] = 'soc/user/list/user_row.html'
- params['list_heading'] = 'soc/user/list/user_heading.html'
-
- params['delete_redirect'] = '/' + params['url_name'] + '/list'
-
params['sidebar_heading'] = 'Users'
params = dicts.merge(original_params, params)