summaryrefslogtreecommitdiff
path: root/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/ebook.html
blob: b1a184f6b3807daf615550d821334d27e7e69bf5 (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
{% extends "ndf/base.html" %}

{% load ndf_tags %}

{% block title %} Repository {% endblock %}

{% block body_content %}

<ul class="small-block-grid-1 medium-block-grid-2 large-block-grid-4">

<!-- {#% get_preferred_lang request page_nodes "Page" as page_nodes %#} -->

  {% group_type_info groupid request.user as grouptype %}

  <!-- Existing card list-->
  {% for node in all_ebooks %}

      <li class="card">
        {% if grouptype == "Moderated" %}
          {% if node.status == "DRAFT" %}
            <div class="draft ebook">
          {% elif node.status == "PUBLISHED" %}
            <div class="published ebook">
          {% endif %}
        {% else %}
          <div class='{% if node.status == "PUBLISHED" %}published{% endif %} ebook'>
        {% endif %} 

          <a href="{% url 'page_details' group_name_tag node %}">
          <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/>
          {% if node.status == "PUBLISHED" or node.created_by == request.user.id %}
          <span style="font-size:12px;">{{ node.html_content|default_if_none:"Add some description."|safe|striptags|truncatechars:75 }}</span><br/>
          {% endif %}
          <footer>
            <div class="age">
              {{ node.member_of_names_list|join:', ' }} created {{node.created_at|timesince}} ago 
              <br/>
              by <span class="user" href="{% url 'dashboard' node.created_by %}" data-gnow="">{{node.user_details_dict.created_by}}</span> 
            </div>
            <span><strong>{{node.contributors|length}}</strong> Contributor{{node.contributors|pluralize}}</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>
 
  {% endfor %}

</ul>

{% endblock %}