summaryrefslogtreecommitdiff
path: root/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/partner_list.html
blob: 4223e8711e024a002c99287b34cabca90441db26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
{% extends "ndf/base.html" %}
{% load i18n %}
{% load ndf_tags %}
{% load pagination_tags %}
{% get_group_name groupid as group_name_tag %}

{% block title %} {{groups_category}}s {% endblock %}

{% block meta_content %}  
<h2 class="subheader">{{groups_category}}s</h2>
{% endblock %}


{% block help_content %}

{% endblock %}


{% block search_content %}
  {% include "ndf/node_search_base.html" %}
{% endblock %}


{% block related_content %}
  {% if user.is_authenticated %}
  {% user_access_policy groupid request.user as user_access %}
  {% if user_access == "allow" %}
  <br/>
  <div class="create card">
    <div class="group">
      <br/>
      <a class="button medium" 
        {% if groups_category == "Partner" %}
          href="{% url 'create_partner' group_name_tag %}">
        {% else%}
          href="{% url 'create_group' group_name_tag %}">
        {% endif %}
    	<span class="fi-plus">&nbsp;&nbsp;{% trans "New" %} {{groups_category}} </span>
      </a>
    </div>
  </div>
  {% endif %}
  {% endif %}
{% endblock %}


{% block body_content %}
<ul class="small-block-grid-1 medium-block-grid-2 large-block-grid-4">
  
  <!-- Existing card list-->
  <!-- #{#% get_group_type request.path request.user as group_type %} -->
  {% group_type_info groupid request.user as grouptype %}

  {% autopaginate group_nodes 23 %}

  {% for node in group_nodes %}
  {% if node.name != request.user.username %}
  
    <li class="card">
      {% if grouptype == "Moderated" %}
        {% if node.status == "DRAFT" %}
          <div class="draft group">
        {% elif node.status == "PUBLISHED" %}
          <div class="published group">
        {% endif %}
      {% else %}
        <div class='{% if node.status == "PUBLISHED" %}published{% endif %} group'>
      {% endif %} 

      <a href="{% url 'groupchange' node.pk %}">
      <div class="row">
        <div class="small-10 columns">                             
            <b>
              {{ node.name }}{% if node.collection_set %} <i class="fi-page-multiple"></i> {% endif %}
            </b>
        </div>
      </div>
      
      <hr/>
      <span style="font-size:12px;">{{ node.html_content|default_if_none:"Add some description."|safe|striptags|truncatechars:75 }}</span><br/>
      
      <footer>
          <div class="age">
            {{ node.agency_type}} {% trans "created" %} {{node.created_at|timesince}} {% trans "ago by" %} <span class="user" href="" data-gnow="">{{node.user_details_dict.created_by}}</span>
        </div>
        <span><strong>{{node.author_set|length}}</strong> {% trans "Members" %}</span>
        {% get_group_resources node as obj_count %}
        <span class="right"><strong>{{obj_count}}</strong> {% trans "Objects" %}</span>
      </footer>
      </a>

      <div class="label-list small-12 columns">
        {% for tag in node.tags|slice:":3" %}
          <a href="{% url 'tag_info' groupid tag %}"><span class="label" style="background-color:yellow;">{{tag}}</span></a>
        {% endfor %}
      </div>

    </div>
  </li>
  {% endif %}

  {% empty %}
    {% if not searching %}
      <div class="row">
        <div class="small-12 columns">
         <h5>{% trans "There are no" %} {{groups_category}} {% trans "created yet." %} <b>{% trans "Be the first to create a" %} {{groups_category}}!</b></h5>
        </div>
      </div>
    {% endif %}

  {% endfor %}
  
</ul>

{% paginate %}

{% endblock %}