-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscheduling.tpl
95 lines (93 loc) · 3.63 KB
/
scheduling.tpl
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
{**
* scheduling.tpl
*
* Copyright (c) 2003-2011 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Subtemplate defining the scheduling table.
*
* $Id$
*}
<div id="scheduling">
<h3>{translate key="submission.scheduling"}</h3>
<table class="data" width="100%">
{if !$publicationFeeEnabled || $publicationPayment}
<form action="{url op="scheduleForPublication" path=$submission->getId()}" method="post">
<tr valign="top">
<td width="25%" class="label">
<label for="issueId">{translate key="editor.article.scheduleForPublication"}</label>
</td>
<td width="25%" class="value">
{if $publishedArticle}
{assign var=issueId value=$publishedArticle->getIssueId()}
{else}
{assign var=issueId value=0}
{/if}
<select name="issueId" id="issueId" class="selectMenu">
<option value="">{translate key="editor.article.scheduleForPublication.toBeAssigned"}</option>
{html_options options=$issueOptions|truncate:40:"..." selected=$issueId}
</select>
</td>
<td width="50%" class="value">
<input type="submit" value="{translate key="common.record"}" class="button defaultButton" />
{if $issueId}
{if $isEditor}
<a href="{url op="issueToc" path=$issueId}" class="action">{translate key="issue.toc"}</a>
{else}
<a href="{url page="issue" op="view" path=$issueId}" class="action">{translate key="issue.toc"}</a>
{/if}
{/if}
</td>
</tr>
</form>
{if $publishedArticle}
<form action="{url op="setDatePublished" path=$submission->getId()}" method="post">
<tr valign="top">
<td width="20%" class="label">
<label for="issueId">{translate key="editor.issues.published"}</label>
</td>
<td class="value">
{* Find good values for starting and ending year options *}
{assign var=currentYear value=$smarty.now|date_format:"%Y"}
{if $publishedArticle->getDatePublished()}
{assign var=publishedYear value=$publishedArticle->getDatePublished()|date_format:"%Y"}
{math|assign:"minYear" equation="min(x,y)-10" x=$publishedYear y=$currentYear}
{math|assign:"maxYear" equation="max(x,y)+2" x=$publishedYear y=$currentYear}
{else}
{* No issue publication date info *}
{math|assign:"minYear" equation="x-10" x=$currentYear}
{math|assign:"maxYear" equation="x+2" x=$currentYear}
{/if}
{html_select_date prefix="datePublished" time=$publishedArticle->getDatePublished()|default:"---" all_extra="class=\"selectMenu\"" start_year=$minYear end_year=$maxYear year_empty="-" month_empty="-" day_empty="-"}
</td>
<td class="value">
<input type="submit" value="{translate key="common.record"}" class="button defaultButton" />
</td>
</tr>
</form>
{/if}{* $publishedArticle *}
{else}
<tr>
<td>{translate key="editor.article.payment.publicationFeeNotPaid"}</td>
<td align="right">
<form action="{url op="waivePublicationFee" path=$submission->getId()}" method="post">
<input type="hidden" name="markAsPaid" value=1 />
<input type="hidden" name="sendToScheduling" value=1 />
<input type="submit" value="{translate key="payment.paymentReceived"}" class="button defaultButton" />
</form>
</td>
{if $isEditor}
<td align="left">
<form action="{url op="waivePublicationFee" path=$submission->getId()}" method="post">
<input type="hidden" name="sendToScheduling" value=1 />
<input type="submit" value="{translate key="payment.waive"}" class="button defaultButton" />
</form>
</td>
{/if}
</tr>
{/if}
</table>
{if $publishedArticle}
{call_hook name="Templates::sectionEditor::Submission:Scheduling::SwordDepositForm"}
{/if}
</div>