Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / templates / im / astakosgroup_list.html @ c8977d75

History | View | Annotate | Download (6 kB)

1
{% extends "im/account_base.html" %}
2

    
3
{% load filters %}
4

    
5
{% block page.body %}
6
<div class="maincol {% block innerpage.class %}{% endblock %}">
7
    <h2>GROUPS</h2>
8
    {% if form %}
9
    <p>You can search for a group by name</p>
10
    <form action="{% url group_search %}" method="post" class="withlabels signup">{% csrf_token %}
11
            {% include "im/form_render.html" %}
12
            <div class="form-row submit">
13
                <input type="submit" class="submit altcol" value="SEARCH" />
14
            </div>
15
    </form>
16
    {% else %}
17
    <div class="projects">
18
                <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. <br />You can <a href="{% url group_create_list %}">create a new group</a> or <a href="{% url group_search %}">join</a> to an existing one.</p>
19
                 
20
                <ul class="widjets clearfix">        
21
                        <li>
22
                                <div>
23
                                        <p>WELCOME!<br />Connect with a world of people who share your passions.<br />With millions of groups at your fingertips, it's easy to find the group that's best for you -- no matter your interest.</p>
24
                                        <p class="btn"><a href="{% url group_create_list %}" class="submit">CREATE</a></p>
25
                                </div>
26
                        </li>
27
                        <li>
28
                                <div>
29
                                        <p>LOOKING FOR A GROUP?</p><p>Well, this is the place to start!</br>sdofuisd ofuaofi usdiof uiofu osifuaoi ufisdfiousf oiusd<br /><img alt="THINK ABOUT IT" src="/static/medialibrary/2012/06/behind_okeanos.png"></p>
30
                                        <p class="btn"><a href="{% url group_search %}" class="submit">JOIN</a></p>
31
                                </div>
32
                        </li>
33
                </ul>
34
        
35
    {% endif %}
36
    {% with object_list|enabled:is_search as object_list %}
37
    {% if object_list %}
38
      {% with object_list|split:user as d %}
39
              {% with d|lookup:'own' as mine %}
40
                      {% if mine %}        
41
                              <div class="full-dotted">
42
                                        <table class="alt-style table_sorting complex" id="">
43
                                    <caption>MY GROUPS</caption>
44
                                    <thead>
45
                                      <tr>
46
                                        <th>Name</th>
47
                                        <th>Type</th>
48
                                        <th>Issued</th>
49
                                        <th>Expires</th>
50
                                        <th>Enrolled</th>
51
                                        <th>Status</th>
52
                                        <th>Moderated</th>
53
                                        <th>&nbsp;</th>
54
                                      </tr>
55
                                    </thead>
56
                                    <tbody>
57
                                      {% for o in mine %}
58
                                      <tr class="{% cycle 'tr1' 'tr2' %}">
59
                                        <td><a class="extra-link" href="{% url group_detail o.id %}">{{o.name|cut:"http://"|cut:"/" }}</a></td>
60
                                        <td>{{o.kind|capfirst}}</td>
61
                                        <td>{{o.issue_date|date:"d/m/Y"}}</td>
62
                                        <td>{{o.expiration_date|date:"d/m/Y"}}</td>
63
                                        <td>{{ o.approved_members|length }}</td>
64
                                        <td>{% if o.is_enabled %}Active{% else %}Pending{% endif %}</td>
65
                                        <td>{% if o.moderation_enabled%}Yes{% else %}No{% endif %}</td>
66
                                        <td><a href="#" class="more-info">[ + More Info ]</a></td> 
67
                                      </tr>
68
                                      <tr class="{% cycle 'tmore1' 'tmore2' %}" style="display:none">
69
                                        <td colspan="8">{{o.desc}}</td>
70
                                      </tr>
71
                                      {% endfor %}
72
                                    </tbody>
73
                                </table>
74
                               
75
                                </div>
76
                      {% endif %}
77
              {% endwith %}
78
              {% with d|lookup:'other' as other %}
79
                      {% if other %}        
80
                              <div class="full-dotted">
81
                                        <table class="alt-style table_sorting">
82
                                    <caption>
83
                                            {% if is_search %}
84
                                                    SEARCH RESULTS
85
                                            {% else %}
86
                                                    I PARTICIPATE IN
87
                                            {% endif %}
88
                                    </caption>
89
                                    <thead>
90
                                      <tr>
91
                                        <th>Name</th>
92
                                        <th>Type</th>
93
                                        <th>Issued</th>
94
                                        <th>Expires</th>
95
                                         
96
                                        <th>Enrolled</th>
97
                                       
98
                                         
99
                                        <th>Enrollment status</th>
100
                                      
101
                                      </tr>
102
                                    </thead>
103
                                    <tbody>
104
                                      {% for o in other %}
105
                                      <tr>
106
                                        <td><a class="extra-link" href="{% url group_detail o.id %}">{{o.name|cut:"http://"|cut:"/" }}</a></td>
107
                                        <td>{{o.kind|capfirst}}</td>
108
                                        <td>{{o.issue_date|date:"d/m/Y"}}</td>
109
                                        <td>{{o.expiration_date|date:"d/m/Y"}}</td>
110
                                        
111
                                        <td>{{ o.approved_members|length }}</td>
112
                                        
113
                                        <td>
114
                                        {% if user in o.approved_members %}
115
                        
116
                                            Registered
117
                                            <form action="{% url group_leave o.id %}" method="post" class="link-like">{% csrf_token %}
118
                                             <input type="submit"  value="LEAVE GROUP" />
119
                                        </form>        
120
                                            
121
                                                
122
                                        {% else %}
123
                                            {% if user in o.members %}
124
                                                Pending
125
                                            {% else %}
126
                                                Not member 
127
                                                    <form action="{% url group_join o.id %}" method="post" class="link-like">{% csrf_token %}
128
                                                        <input type="submit"   value="JOIN GROUP" />
129
                                                    </form>
130
                                                
131
                                            {% endif %}
132
                                        {% endif %}
133
                                        </td>
134
                                      </tr>
135
                                      {% endfor %}
136
                                    </tbody>
137
                                </table>
138
                               
139
                                </div>
140
                        {% endif %}
141
              {% endwith %}
142
      {% endwith %}
143
      {% else %}
144
            {% if is_search %}
145
                <h2>No groups found!</h2>
146
            {% endif %}
147
      {% endif %}
148
    {% endwith %}
149
</div>
150
</div>
151
{% endblock %}