Added support for creating clubs.
authorLennard de Rijk <ljvderijk@gmail.com>
Wed, 07 Jan 2009 22:09:52 +0000
changeset 779 81506d223cb0
parent 778 bc13cd968946
child 780 042aafcd7dce
Added support for creating clubs. Patch by : Lennard de Rijk
app/soc/templates/soc/club/list/heading.html
app/soc/templates/soc/club/list/row.html
app/soc/templates/soc/club/public.html
app/soc/views/sitemap/build.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/club/list/heading.html	Wed Jan 07 22:09:52 2009 +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/club/list/row.html	Wed Jan 07 22:09:52 2009 +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/club/public.html	Wed Jan 07 22:09:52 2009 +0000
@@ -0,0 +1,35 @@
+{% extends "soc/base.html" %}
+{% comment %}
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+{% load forms_helpers %}
+
+{% block header_title %}
+{{ page_name }} for {{ entity.name }}
+{% endblock %}
+
+{% block body %}
+<p>
+ <table>
+  {% readonly_field_as_table_row entity.fields.name.label entity.name %}
+  {% readonly_field_as_table_row entity.fields.home_page.label entity.home_page %}
+  {% readonly_field_as_table_row entity.fields.description.label entity.description %}
+  {% readonly_field_as_table_row entity.fields.street.label entity.street %}
+  {% readonly_field_as_table_row entity.fields.city.label entity.city %}
+  {% readonly_field_as_table_row entity.fields.state.label entity.state %}
+  {% readonly_field_as_table_row entity.fields.country.label entity.country %}
+  {% readonly_field_as_table_row entity.fields.postalcode.label entity.postalcode %}
+  {% readonly_field_as_table_row entity.fields.phone.label entity.phone %}
+ </table>
+</p>
+{% endblock %}
--- a/app/soc/views/sitemap/build.py	Wed Jan 07 21:58:43 2009 +0000
+++ b/app/soc/views/sitemap/build.py	Wed Jan 07 22:09:52 2009 +0000
@@ -24,6 +24,7 @@
 
 from django.conf.urls import defaults
 
+from soc.views.models import club
 from soc.views.models import document
 from soc.views.models import host
 from soc.views.models import notification
@@ -43,6 +44,7 @@
 
 sidebar.addMenu(user_self.view.getSidebarMenus)
 sidebar.addMenu(presence.view.getSidebarMenus)
+sidebar.addMenu(club.view.getSidebarMenus)
 sidebar.addMenu(site.view.getSidebarMenus)
 sidebar.addMenu(user.view.getSidebarMenus)
 sidebar.addMenu(document.view.getSidebarMenus)
@@ -53,6 +55,7 @@
 sidebar.addMenu(program.view.getExtraMenus)
 sidebar.addMenu(organization.view.getSidebarMenus)
 
+sitemap.addPages(club.view.getDjangoURLPatterns())
 sitemap.addPages(document.view.getDjangoURLPatterns())
 sitemap.addPages(host.view.getDjangoURLPatterns())
 sitemap.addPages(notification.view.getDjangoURLPatterns())