Added view and templates for mentors.
authorLennard de Rijk <ljvderijk@gmail.com>
Sat, 31 Jan 2009 19:46:55 +0000
changeset 1130 9bdbb18d622e
parent 1129 a98a165c1300
child 1131 9dd535241841
Added view and templates for mentors. Mentors can be invited or send a request to become a mentor for a specific org. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed
app/soc/templates/soc/mentor/list/heading.html
app/soc/templates/soc/mentor/list/row.html
app/soc/templates/soc/mentor/manage.html
app/soc/templates/soc/mentor/public.html
app/soc/views/sitemap/build.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/mentor/list/heading.html	Sat Jan 31 19:46:55 2009 +0000
@@ -0,0 +1,4 @@
+<tr align="left">
+  <th class="first" align="right">Organization ID</th>
+  <th>Admin ID</th>
+</tr>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/mentor/list/row.html	Sat Jan 31 19:46:55 2009 +0000
@@ -0,0 +1,8 @@
+<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.scope_path }}</a>
+     </div>
+  </td>
+  <td><div class="link_id">{{ list.item.link_id }}</a></div></td>
+</tr>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/mentor/manage.html	Sat Jan 31 19:46:55 2009 +0000
@@ -0,0 +1,28 @@
+{% extends "soc/mentor/public.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 %}
+
+{% block header_title %}
+{{ page_name }} {{ entity.link_id }} for {{ entity.scope_path }}
+{% endblock %}
+
+{% block manage %}
+<tr>
+  <td>
+    Please select the appropriate action:</br>
+    <input type="button" onclick="location.href='/{{ url_name }}/manage/{{ entity.scope_path }}/{{ entity.link_id }}?resign=true'" value="Resign"/>
+    <input type="button" onclick="location.href='{{ cancel_redirect }}'" value="Cancel"/>
+  </td>
+</tr>
+{% endblock %}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/soc/mentor/public.html	Sat Jan 31 19:46:55 2009 +0000
@@ -0,0 +1,31 @@
+{% 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 }} {{ entity.link_id }} for {{ entity.scope_path }}
+{% endblock %}
+
+{% block body %}
+<p>
+ <table>
+  {% readonly_field_as_table_row entity.fields.link_id.label entity.link_id %}
+  {% readonly_field_as_table_row entity.fields.display_name.label entity.display_name %}
+  {% readonly_field_as_table_row entity.fields.im_handle.label entity.im_handle %}
+  {% readonly_field_as_table_row entity.fields.res_country.label entity.res_country %}
+ </table>
+</p>
+{% block manage %} {% endblock %}
+{% endblock %}
--- a/app/soc/views/sitemap/build.py	Sat Jan 31 19:33:40 2009 +0000
+++ b/app/soc/views/sitemap/build.py	Sat Jan 31 19:46:55 2009 +0000
@@ -30,6 +30,7 @@
 from soc.views.models import club_member
 from soc.views.models import document
 from soc.views.models import host
+from soc.views.models import mentor
 from soc.views.models import notification
 from soc.views.models import organization
 from soc.views.models import org_admin
@@ -62,6 +63,7 @@
 sidebar.addMenu(program.view.getExtraMenus)
 sidebar.addMenu(organization.view.getSidebarMenus)
 sidebar.addMenu(org_admin.view.getSidebarMenus)
+sidebar.addMenu(mentor.view.getSidebarMenus)
 
 sitemap.addPages(club.view.getDjangoURLPatterns())
 sitemap.addPages(club_admin.view.getDjangoURLPatterns())
@@ -69,6 +71,7 @@
 sitemap.addPages(club_member.view.getDjangoURLPatterns())
 sitemap.addPages(document.view.getDjangoURLPatterns())
 sitemap.addPages(host.view.getDjangoURLPatterns())
+sitemap.addPages(mentor.view.getDjangoURLPatterns())
 sitemap.addPages(notification.view.getDjangoURLPatterns())
 sitemap.addPages(organization.view.getDjangoURLPatterns())
 sitemap.addPages(org_admin.view.getDjangoURLPatterns())