community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r1693023 - in /comdev/tools/events_list: templates/groups/index.html templates/include/navbar.html templates/people/ templates/people/index.html urls.py views.py
Date Tue, 28 Jul 2015 08:12:42 GMT
Author: rgardler
Date: Tue Jul 28 08:12:42 2015
New Revision: 1693023

URL: http://svn.apache.org/r1693023
Log:
add a basic person list

Added:
    comdev/tools/events_list/templates/people/
    comdev/tools/events_list/templates/people/index.html
Modified:
    comdev/tools/events_list/templates/groups/index.html
    comdev/tools/events_list/templates/include/navbar.html
    comdev/tools/events_list/urls.py
    comdev/tools/events_list/views.py

Modified: comdev/tools/events_list/templates/groups/index.html
URL: http://svn.apache.org/viewvc/comdev/tools/events_list/templates/groups/index.html?rev=1693023&r1=1693022&r2=1693023&view=diff
==============================================================================
--- comdev/tools/events_list/templates/groups/index.html (original)
+++ comdev/tools/events_list/templates/groups/index.html Tue Jul 28 08:12:42 2015
@@ -51,7 +51,7 @@
       });
     </script>	
   {% else %}
-    <p>No events are available.</p>
+    <p>No groups are available.</p>
   {% endif %}
 </body>
 </html>

Modified: comdev/tools/events_list/templates/include/navbar.html
URL: http://svn.apache.org/viewvc/comdev/tools/events_list/templates/include/navbar.html?rev=1693023&r1=1693022&r2=1693023&view=diff
==============================================================================
--- comdev/tools/events_list/templates/include/navbar.html (original)
+++ comdev/tools/events_list/templates/include/navbar.html Tue Jul 28 08:12:42 2015
@@ -18,6 +18,7 @@
       <ul class="nav navbar-nav">
         <li><a class="{% is_active_page request 'eventIndex' %}" href="{% url 'eventIndex'
%}">Events</a></li>
         <li><a class="{% is_active_page request 'groupIndex' %}" href="{% url 'groupIndex'
%}">Groups</a></li>
+        <li><a class="{% is_active_page request 'personIndex' %}" href="{% url 'personIndex'
%}">People</a></li>
       </ul>
 
       <ul class="nav navbar-nav navbar-right">
@@ -26,9 +27,6 @@
 	{% endif %}
       </ul>
 
-
-
-
     </div><!-- /.navbar-collapse -->
   </div><!-- /.container-fluid -->
 </nav>

Added: comdev/tools/events_list/templates/people/index.html
URL: http://svn.apache.org/viewvc/comdev/tools/events_list/templates/people/index.html?rev=1693023&view=auto
==============================================================================
--- comdev/tools/events_list/templates/people/index.html (added)
+++ comdev/tools/events_list/templates/people/index.html Tue Jul 28 08:12:42 2015
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>Community Development: People</title>
+
+  <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
+  <script type="text/javascript" src="http://cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js"></script>
+  <script type="text/javascript" src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
+
+  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"></link>
 
+  <link rel="stylesheet" href="http://cdn.datatables.net/1.10.7/css/jquery.dataTables.min.css"></link>
+</head>
+<body>
+  {% include "include/navbar.html" %}
+
+  <h1>People</h1>
+
+  {% if person_list %}
+    <table id="peopleList" class="table table-striped">
+      <thead>
+	<tr>
+	  <th>Name</th>
+	  <th>City</th>
+	  <th>State</th>
+	  <th>Country</th>
+	</tr>
+      </thead>
+      <tbody>
+	{% for person in person_list %}
+	<tr>
+	  <td>{{ person.name }}</td>
+	  <td>{{ person.city }}</td>
+	  <td>{{ person.state }}</td>
+	  <td>{{ person.country }}</td>
+	</tr>
+	{% endfor %}
+      </tbody>
+    </table>
+    <script>
+      $(document).ready(function(){
+      $('#peopleList').dataTable({
+          "order": [[ 0, "asc" ]],
+          "stateSave": true
+        });
+      });
+    </script>	
+  {% else %}
+    <p>No people are available.</p>
+  {% endif %}
+</body>
+</html>

Modified: comdev/tools/events_list/urls.py
URL: http://svn.apache.org/viewvc/comdev/tools/events_list/urls.py?rev=1693023&r1=1693022&r2=1693023&view=diff
==============================================================================
--- comdev/tools/events_list/urls.py (original)
+++ comdev/tools/events_list/urls.py Tue Jul 28 08:12:42 2015
@@ -10,4 +10,6 @@ urlpatterns = [
 
     url(r'^groups$', views.groupIndex, name='groupIndex'),
     url(r'^groups/(?P<group_id>[0-9]+)/importMembers/$', views.importMembers, name='importMembers'),
+
+    url(r'^people$', views.personIndex, name='personIndex'),
 ]

Modified: comdev/tools/events_list/views.py
URL: http://svn.apache.org/viewvc/comdev/tools/events_list/views.py?rev=1693023&r1=1693022&r2=1693023&view=diff
==============================================================================
--- comdev/tools/events_list/views.py (original)
+++ comdev/tools/events_list/views.py Tue Jul 28 08:12:42 2015
@@ -66,7 +66,14 @@ def groupIndex(request):
                              'can_import': _canImport()
     })
     return HttpResponse(template.render(context))
-    
+
+def personIndex(request):
+    person_list = Person.objects.all()
+    template = loader.get_template('people/index.html')
+    context = RequestContext(request, {
+                             'person_list': person_list
+    })
+    return HttpResponse(template.render(context))    
 
 def _canImport():
     if settings.DEBUG:



Mime
View raw message