Author: floguy
Date: Sat Sep 20 22:05:34 2008
New Revision: 913

Added:
    trunk/local_apps/tribes/thing.py
    trunk/pinax/templates/things/
    trunk/pinax/templates/things/tribe_list.html

Log:
Forgot to svn add a bunch of files.

Added: trunk/local_apps/tribes/thing.py
==============================================================================
--- (empty file)
+++ trunk/local_apps/tribes/thing.py    Sat Sep 20 22:05:34 2008
@@ -0,0 +1,12 @@
+import things
+from tribes.models import Tribe
+
+class TribeThing(things.ModelThing):
+    created = things.OrderField(verbose_name_asc='Newest',
+        verbose_name_desc='Oldest', url_asc='newest', url_desc='oldest',
+        field_url='date')
+    name = things.OrderField()
+    members = things.OrderField(verbose_name_asc='Largest',
+        verbose_name_desc='Smallest', url_asc='largest',  
url_desc='smallest',
+        field_url='size')
+    search = ('name', 'description')
\ No newline at end of file

Added: trunk/pinax/templates/things/tribe_list.html
==============================================================================
--- (empty file)
+++ trunk/pinax/templates/things/tribe_list.html        Sat Sep 20 22:05:34 2008
@@ -0,0 +1,73 @@
+{% extends "tribes/base.html" %}
+
+{% load i18n %}
+{% load humanize %}
+{% load pagination_tags %}
+{% load order_by %}
+{% load extra_tagging_tags %}
+{% load tribe_tags %}
+
+{% block head_title %}{% blocktrans %}Tribes{% endblocktrans %}{%  
endblock %}
+
+{% block body %}
+    <h1>{% trans "Tribes" %}</h1>
+
+    <p>{% trans "A <b>tribe</b> is a group of people with some common  
interest." %}</p>
+    {% if user.is_authenticated %}
+        <p><a href="#" onclick="$('#tribe_form').toggle(); return  
false;">{% trans "Start your own tribe" %}</a></p>
+
+        <form id="tribe_form" method="POST" action="{% url tribes_list %}"  
style="display: none;">
+            {% get_tribe_form as tribe_form %}
+            <table>
+                {{ tribe_form }}
+                <tr><td></td><td><input type="hidden" name="action"  
value="create" /><input type="submit" value="{%  
trans 'create' %}"/></td></tr>
+            </table>
+        </form>
+    {% else %}
+        {% url acct_signup as signup_url %}
+        {% url acct_login as login_url %}
+        <p>{% blocktrans %}<a href="{{ signup_url }}">Sign up</a> and <a  
href="{{ login_url }}">log in </a> to create your own tribe or join an  
existing one.{% endblocktrans %}</p>
+    {% endif %}
+    {% if search_enabled %}
+        <form method="GET" action="">
+            <input type="text" name="search" value="{{ terms }}" />
+            <input type="submit" value="Search" />
+        </form>
+    {% endif %}
+    <p>Order by:
+        {% for f in fields %}
+            {% ifequal f field %}
+                {% if descending %}
+                    <a href="{{ f.full_url_asc }}">{{ f.verbose_name_asc  
}}</a> or
+                    <b>{{ f.verbose_name_desc }}</b>
+                {% else %}
+                    <b>{{ f.verbose_name_asc }}</b> or
+                    <a href="{{ f.full_url_desc }}">{{ f.verbose_name_desc  
}}</a>
+                {% endif %}
+            {% else %}
+                <a href="{{ f.full_url_asc }}">{{ f.verbose_name_asc  
}}</a> or
+                <a href="{{ f.full_url_desc }}">{{ f.verbose_name_desc  
}}</a>
+            {% endifequal %}
+            {% if not forloop.last %}, {% endif %}
+        {% endfor %}
+    </p>
+
+    {% autopaginate objects 10 %}
+    {% if objects %}
+        <dl>
+        {% for tribe in objects %}
+            {% show_tribe tribe %}
+        {% endfor %}
+        </dl>
+        {% paginate %}
+    {% endif %}
+
+{% endblock %}
+
+{% block extra_body %}
+    <script>
+        {% if tribe_form.errors %}
+            $('#tribe_form').show();
+        {% endif %}
+    </script>
+{% endblock %}
\ No newline at end of file

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to