article_list.html 6.11 KB
Newer Older
luxcem's avatar
luxcem committed
1
2
3
{% extends "base.html" %}


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
{% block content-header %}
<div class="row justify-content-left">
  <div class="col-md-6 offset-md-1">
    <h4>Participez à l'aventure !</h4>
    <p>En tant que padawan
      <img class="inline-image" role="img" src="{% static 'img/padawan.svg' %}" />,
      aidez-nous à sélectionner les prochains articles à intégrer dans la
      revue de presse en votant pour les meilleurs. Les jedis
      <img class="inline-image" role="img" src="{% static 'img/jedi.svg' %}" />
      s'occupent ensuite de la relecture et de la mise en page des articles.
    </p>

    <p>Faites-vous connaître sur le
      <a target="_blank" href="https://www.laquadrature.net/wiki/IRC">salon IRC #lqdn-rp</a>
      où il vous sera fait bon accueil, ou en nous
      <a target="_blank" href="https://www.laquadrature.net/fr/contact">contactant par email</a>.
    </p>
  </div>
  <div class="col-md-4">
    <h4>Comment sélectionner un article ?</h4>
  <ol>
    <li>Il aborde les sujets sur lesquels La Quadrature est engagée (paquet télécom, ACTA, <i>etc.</i>).</li>
    <li>Il reflète ou appuie l'avis de La Quadrature.</li>
    <li>Il provient prioritairement de médias importants (presse nationale, régionale ou internationale).</li>
  </ol>

  </div>
</div>
{% endblock %}

{% block content %}
cynddl's avatar
cynddl committed
35
<div class="row">
36
<div class="col-md-12 white-bg">
cynddl's avatar
cynddl committed
37
38
  <ul class="nav nav-integrated">
    <li class="nav-item{% if filter_view == 'flux' %} active{% endif %}">
luxcem's avatar
luxcem committed
39
      <a class="nav-link" href="{% url 'rp:article-list' filter_view='flux'%}">
40
          Flux <span class="glyphicon glyphicon-piggy-bank" aria-hidden="true"></span>
cynddl's avatar
cynddl committed
41
42
43
      </a>
    </li>
    <li class="nav-item {% if filter_view == 'draft' %} active{% endif %}">
luxcem's avatar
luxcem committed
44
      <a class="nav-link" href="{% url 'rp:article-list' filter_view='draft'%}">
cynddl's avatar
cynddl committed
45
46
47
48
        En attente <span class="badge badge-default">{{nb_draft}}</span>
      </a>
    </li>
    <li class="nav-item {% if filter_view == 'published' %} active{% endif %}">
luxcem's avatar
luxcem committed
49
      <a class="nav-link" href="{% url 'rp:article-list' filter_view='published'%}">Publiés</a>
cynddl's avatar
cynddl committed
50
51
52
53
54
55
56
57
    </li>
  </ul>

  <div class="well">
    {% if is_paginated %}
      <div class="pagination">
        <span class="page-links">
          {% if page_obj.has_previous %}
58
            <a href="?page={{ page_obj.previous_page_number }}"><i class="fa fa-chevron-left" aria-hidden="true"></i></a>
cynddl's avatar
cynddl committed
59
60
61
62
63
          {% endif %}
          <span class="page-current">
            Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}
          </span>
          {% if page_obj.has_next %}
64
            <a href="?page={{ page_obj.next_page_number }}"><i class="fa fa-chevron-right" aria-hidden="true"></i></a>
cynddl's avatar
cynddl committed
65
66
67
68
69
          {% endif %}
        </span>
      </div>
    {% endif %}

luxcem's avatar
luxcem committed
70
71
72
73
74
75
    {% if filter_view == "rejected" %}
      <div class="alert alert-danger" role="alert">
        {% trans "Rejected articles" %}
      </div>
    {% endif %}

cynddl's avatar
cynddl committed
76
77
78
    <table class="article-table table table-sm my-4">
      <thead>
        <tr>
79
          {% if filter_view != "published" %}<th>Priority</th>{% endif %}
cynddl's avatar
cynddl committed
80
81
82
83
84
85
          <th>ID</th>
          <th>Date</th>
          <th>Language</th>
          <th>Title</th>
          <th>Note</th>
          <th>Added&nbsp;by</th>
86
87
88
          <th>Archived</th>
          <th>Quotes us</th>
          <th>Speak of us</th>
cynddl's avatar
cynddl committed
89
          <th>Actions<img class="inline-image ml-2" role="img" src="{% static 'img/jedi.svg' %}" /></th>
cynddl's avatar
cynddl committed
90
91
92
93
        </tr>
      </thead>
    <tbody>
    {% for article in object_list|slice:":10" %}
94
95
      <tr id="row_empty_{{article.id}}" class="empty-row"><td colspan="8"></td></tr>
      <tr id="row_{{article.id}}">
96
97
98
99
100
        {% if filter_view != "published" %}
        <td class="icon-cell actions-item" onclick="javascript:call_priority({{article.id}}, {{article.priority|yesno:"false,true"}})">
          <i id="priority_{{article.id}}" class="fa fa-star{{ article.priority|yesno:",-o" }}" aria-hidden="true"></i>
        </td>
        {% endif %}
cynddl's avatar
cynddl committed
101
102
103
        <td>{{article.id}}</td>
        <td>{{article.created_at |date:'d/m/y'}}<br />{{article.created_at |date:'H:i'}}</td>
        <td>{{article.lang}}</td>
104
        <td class="title-cell"><a target="_blank" href="{{article.url}}"><strong>{{article}}</strong></a></td>
cynddl's avatar
cynddl committed
105
        <td>
106
107
            <span id="score_{{article.id}}">{{article.score}}</span>
          {% if filter_view != "published" %}
cynddl's avatar
cynddl committed
108
          <ul class="votes-list">
109
110
111
112
113
114
            <li class="actions-item" onclick="javascript:call_upvote({{article.id}})">
              <i class="fa fa-thumbs-up" aria-hidden="true" style="color:green"></i>
            </li>
            <li class="actions-item" onclick="javascript:call_downvote({{article.id}})">
              <i class="fa fa-thumbs-down" aria-hidden="true" style="color:red"></i>
            </li>
cynddl's avatar
cynddl committed
115
          </ul>
116
          {% endif %}
cynddl's avatar
cynddl committed
117
        </td>
118
        <td>{{article.created_by}}</td>
119
120
121
        <td>{{article.archive}}</td>
        <td>{{article.quote}}</td>
        <td>{{article.speak}}</td>
cynddl's avatar
cynddl committed
122
123
        <td class="actions-cell">
          <ul class="actions-list">
124
            {% if filter_view == 'flux' %}
cynddl's avatar
cynddl committed
125
            <li class="actions-item actions-item-draft" onclick="javascript:call_recover({{article.id}})">
126
              <i class="fa fa-fw fa-chevron-right" aria-hidden="true"></i> Forcer
127
128
            </li>
            {% else %}
129
            <li class="actions-item actions-item-edit"><a href="{% url 'rp:article-edit' article.id %}">
cynddl's avatar
cynddl committed
130
              <i class="fa fa-fw fa-pencil" aria-hidden="true"></i> Éditer</a>
cynddl's avatar
cynddl committed
131
            </li>
cynddl's avatar
cynddl committed
132
133
134
135
            {% endif %}
            {% if filter_view != 'published' %}
            <li class="actions-item actions-item-reject" onclick="javascript:call_reject({{article.id}})">
              <i class="fa fa-fw fa-times" aria-hidden="true"></i> Rejeter
cynddl's avatar
cynddl committed
136
            </li>
137
            {% endif %}
cynddl's avatar
cynddl committed
138
139
140
          </ul>
        </td>
      </tr>
cynddl's avatar
cynddl committed
141
      {% if filter_view != 'flux' and article.tags.count %}
142
      <tr id="row_tags_{{article.id}}" class="tags-row">
cynddl's avatar
cynddl committed
143
        <td colspan="8">
cynddl's avatar
cynddl committed
144
145
146
          {% for t in article.tags.all %}
          <span class="badge badge-info">{{t}}</span>
          {% endfor %}
cynddl's avatar
cynddl committed
147
148
        </td>
      </tr>
149
      {% endif %}
cynddl's avatar
cynddl committed
150
151
152
153
154
155
    {% endfor %}
    </tbody>
    </table>
  </div>
</div>
</div>
luxcem's avatar
luxcem committed
156
{% endblock %}