Skip to content

Commit 74ca143

Browse files
ajrbyersmauromsl
authored andcommitted
feat openlibhums#4809 Add Contacts box to workflow pages using give-me-options show/hide
1 parent 7908a66 commit 74ca143

7 files changed

Lines changed: 81 additions & 0 deletions

File tree

src/templates/admin/copyediting/article_copyediting.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ <h2>Actions</h2>
163163
</ul>
164164
</div>
165165
</div>
166+
{% include "admin/elements/contacts_box.html" %}
166167
</div>
167168
</div>
168169
{% include "admin/elements/summary_modal.html" %}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{% load i18n %}
2+
{% load uuid %}
3+
{% trans "Correspondence Author" as label_corr_author %}
4+
{% trans "Author" as label_author %}
5+
{% trans "Reviewer" as label_reviewer %}
6+
{% trans "Copyeditor" as label_copyeditor %}
7+
{% trans "Typesetter" as label_typesetter %}
8+
9+
{% get_uuid4 as pid %}
10+
11+
<div class="box">
12+
<div class="title-area">
13+
<h2>{% trans "Contacts" %}</h2>
14+
</div>
15+
<div class="content">
16+
{% with author=article.correspondence_author %}
17+
{% if author %}
18+
{% include "admin/elements/contacts_box_person.html" with person=author role=label_corr_author %}
19+
{% endif %}
20+
{% endwith %}
21+
22+
<div data-give-me-options-{{ pid }} class="give-me-options">
23+
<div class="button-group no-bottom-margin">
24+
<button
25+
data-give-me
26+
class="button hollow secondary"
27+
type="button"
28+
aria-expanded="false"
29+
aria-controls="options-pane-{{ pid }}">
30+
<span class="fa fa-angle-up"></span>
31+
<span class="fa fa-angle-down"></span>
32+
{% trans "Show more contacts" %}
33+
</button>
34+
</div>
35+
<div id="options-pane-{{ pid }}" class="options-pane padding-block-1">
36+
{% for author in article.authors.all %}
37+
{% if author != article.correspondence_author %}
38+
{% include "admin/elements/contacts_box_person.html" with person=author role=label_author %}
39+
{% endif %}
40+
{% endfor %}
41+
42+
{% for assignment in article.editorassignment_set.all %}
43+
{% include "admin/elements/contacts_box_person.html" with person=assignment.editor role=assignment.get_editor_type_display %}
44+
{% endfor %}
45+
46+
{% for assignment in article.reviewassignment_set.all %}
47+
{% include "admin/elements/contacts_box_person.html" with person=assignment.reviewer role=label_reviewer %}
48+
{% endfor %}
49+
50+
{% for assignment in article.copyeditassignment_set.all %}
51+
{% if assignment.copyeditor %}
52+
{% include "admin/elements/contacts_box_person.html" with person=assignment.copyeditor role=label_copyeditor %}
53+
{% endif %}
54+
{% endfor %}
55+
56+
{% if article.productionassignment %}
57+
{% for task in article.productionassignment.typeset_tasks %}
58+
{% include "admin/elements/contacts_box_person.html" with person=task.typesetter role=label_typesetter %}
59+
{% endfor %}
60+
{% endif %}
61+
</div>
62+
</div>
63+
</div>
64+
</div>
65+
66+
{% include "admin/elements/give_me_options_js.html" with pid=pid %}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<p>
2+
<strong>{{ person.full_name }}</strong>
3+
<a onclick="return popitup('{% url 'send_user_email_article' person.pk article.pk %}')">
4+
<i class="fa fa-envelope-o" aria-hidden="true"></i>
5+
</a><br>
6+
<small>{{ person.real_email }}</small><br>
7+
<small>{{ role }}</small>
8+
</p>

src/templates/admin/journal/publish_article.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ <h2>Confirm Article Set for Publication</h2>
228228
</div>
229229
</div>
230230
</div>
231+
232+
{% include "admin/elements/contacts_box.html" %}
233+
231234
</div>
232235

233236
{% include "admin/elements/summary_modal.html" %}

src/templates/admin/review/in_review.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ <h2>Actions</h2>
314314
</ul>
315315
</div>
316316
</div>
317+
{% include "admin/elements/contacts_box.html" %}
317318
</div><!--/col-lg-12 -->
318319
</div>
319320
{% include "admin/elements/summary_modal.html" %}

src/templates/admin/review/unassigned_article.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ <h2>Actions</h2>
299299
{% endif %}
300300
</div>
301301
</div>
302+
{% include "admin/elements/contacts_box.html" %}
302303
</div>
303304

304305

src/templates/admin/typesetting/elements/sidebar.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,6 @@ <h2>Actions</h2>
5858
</ul>
5959
</div>
6060
</div>
61+
{% include "admin/elements/contacts_box.html" %}
6162
{% include "typesetting/elements/complete_typesetting.html" %}
6263
{% include "typesetting/elements/add_new_round.html" %}

0 commit comments

Comments
 (0)