baseline
[omp.pkp.sfu.ca.git] / templates / acquisitionsEditor / submissionHistory.tpl
blob13eb41d88e494bf561e91e321a5ff52387a1867d
1 {**
2  * submissionHistory.tpl
3  *
4  * Copyright (c) 2003-2009 John Willinsky
5  * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
6  *
7  * Show submission history page.
8  *
9  * $Id: submissionHistory.tpl,v 1.1 2009/08/05 19:41:42 tylerl Exp $
10  *}
11 {strip}
12 {translate|assign:"pageTitleTranslated" key="submission.page.history" id=$submission->getMonographId()}
13 {assign var="pageCrumbTitle" value="submission.history"}
14 {include file="common/header.tpl"}
15 {/strip}
17 {literal}
18 <script type="text/javascript">
19 <!--
20         var toggleAll = 0;
21         var noteArray = new Array();
22         function toggleNote(divNoteId) {
23                 var domStyle = getBrowserObject(divNoteId,1);
24                 domStyle.display = (domStyle.display == "block") ? "none" : "block";
25         }
27         function toggleNoteAll() {
28                 for(var i = 0; i < noteArray.length; i++) {
29                         var domStyle = getBrowserObject(noteArray[i],1);
30                         domStyle.display = toggleAll ? "none" : "block";
31                 }
32                 toggleAll = toggleAll ? 0 : 1;
34                 var collapse = getBrowserObject("collapseNotes",1);
35                 var expand = getBrowserObject("expandNotes",1);
36                 if (collapse.display == "inline") {
37                         collapse.display = "none";
38                         expand.display = "inline";
39                 } else {
40                         collapse.display = "inline";
41                         expand.display = "none";
42                 }
43         }
44 // -->
45 </script>
46 {/literal}
48 <ul class="menu">
49         <li><a href="{url op="submission" path=$submission->getMonographId()}">{translate key="submission.summary"}</a></li>
50         {if $canReview}<li><a href="{url op="submissionReview" path=$submission->getMonographId()}">{translate key="submission.review"}</a></li>{/if}
51         {if $canEdit}<li><a href="{url op="submissionEditing" path=$submission->getMonographId()}">{translate key="submission.editing"}</a></li>
52         <li><a href="{url op="submissionProduction" path=$submission->getMonographId()}">{translate key="submission.production"}</a></li>{/if}
53         <li class="current"><a href="{url op="submissionHistory" path=$submission->getMonographId()}">{translate key="submission.history"}</a></li>
54 </ul>
56 <ul class="menu">
57         <li><a href="{url op="submissionEventLog" path=$submission->getMonographId()}">{translate key="submission.history.submissionEventLog"}</a></li>
58         <li><a href="{url op="submissionEmailLog" path=$submission->getMonographId()}">{translate key="submission.history.submissionEmailLog"}</a></li>
59 </ul>
61 {include file="sectionEditor/submission/summary.tpl"}
63 <div class="separator"></div>
64 <div id="submissionEventLog">
65 <h3>{translate key="submission.history.submissionEventLog"} - {translate key="submission.history.recentLogEntries"}</h3>
66 <table width="100%" class="listing">
67         <tr><td class="headseparator" colspan="5">&nbsp;</td></tr>
68         <tr class="heading" valign="bottom">
69                 <td width="7%">{translate key="common.date"}</td>
70                 <td width="5%">{translate key="submission.event.logLevel"}</td>
71                 <td width="25%">{translate key="common.user"}</td>
72                 <td>{translate key="common.event"}</td>
73                 <td width="56" align="right">{translate key="common.action"}</td>
74         </tr>
75         <tr><td class="headseparator" colspan="5">&nbsp;</td></tr>
76 {iterate from=eventLogEntries item=logEntry}
77         <tr valign="top">
78                 <td>{$logEntry->getDateLogged()|date_format:$dateFormatShort}</td>
79                 <td>{$logEntry->getLogLevel()}</td>
80                 <td>
81                         {assign var=emailString value="`$logEntry->getUserFullName()` <`$logEntry->getUserEmail()`>"}
82                         {url|assign:"url" page="user" op="email" to=$emailString|to_array redirectUrl=$currentUrl subject=$logEntry->getEventTitle()|translate monographId=$submission->getMonographId()}
83                         {$logEntry->getUserFullName()|escape} {icon name="mail" url=$url}
84                 </td>
85                 <td>
86                         {translate key=$logEntry->getEventTitle()}
87                         <br />
88                         {$logEntry->getMessage()|strip_unsafe_html|truncate:60:"..."}
89                 </td>
90                 <td align="right">{if $logEntry->getAssocType()}<a href="{url op="submissionEventLogType" path=$submission->getMonographId()|to_array:$logEntry->getAssocType():$logEntry->getAssocId()}" class="action">{translate key="common.related"}</a>&nbsp;|&nbsp;{/if}<a href="{url op="submissionEventLog" path=$submission->getMonographId()|to_array:$logEntry->getLogId()}" class="action">{translate key="common.view"}</a>{if $isEditor}&nbsp;|&nbsp;<a href="{url op="clearSubmissionEventLog" path=$submission->getMonographId()|to_array:$logEntry->getLogId()}" class="action" onclick="return confirm('{translate|escape:"jsparam" key="submission.event.confirmDeleteLogEntry"}')">{translate key="common.delete"}</a>{/if}</td>
91         </tr>
92         <tr valign="top">
93                 <td colspan="5" class="{if $eventLogEntries->eof()}end{/if}separator">&nbsp;</td>
94         </tr>
95 {/iterate}
96 {if $eventLogEntries->wasEmpty()}
97         <tr valign="top">
98                 <td colspan="5" class="nodata">{translate key="submission.history.noLogEntries"}</td>
99         </tr>
100         <tr valign="top">
101                 <td colspan="5" class="endseparator">&nbsp;</td>
102         </tr>
103 {/if}
104 </table>
106 <a href="{url op="submissionEventLog" path=$submission->getMonographId()}" class="action">{translate key="submission.history.viewLog"}</a>{if $isEditor} |
107 <a href="{url op="clearSubmissionEventLog" path=$submission->getMonographId()}" class="action" onclick="return confirm('{translate|escape:"jsparam" key="submission.event.confirmClearLog"}')">{translate key="submission.history.clearLog"}</a>{/if}
108 </div>
109 <br /><br />
111 <div class="separator"></div>
112 <div id="submissionEmailLog">
113 <h3>{translate key="submission.history.submissionEmailLog"} - {translate key="submission.history.recentLogEntries"}</h3>
115 <table width="100%" class="listing">
116         <tr><td class="headseparator" colspan="5">&nbsp;</td></tr>
117         <tr class="heading" valign="bottom">
118                 <td width="7%">{translate key="common.date"}</td>
119                 <td width="25%">{translate key="email.sender"}</td>
120                 <td width="20%">{translate key="email.recipients"}</td>
121                 <td>{translate key="common.subject"}</td>
122                 <td width="60" align="right">{translate key="common.action"}</td>
123         </tr>
124         <tr><td class="headseparator" colspan="6">&nbsp;</td></tr>
125 {iterate from=emailLogEntries item=logEntry}
126         <tr valign="top">
127                 <td>{$logEntry->getDateSent()|date_format:$dateFormatShort}</td>
128                 <td>{$logEntry->getFrom()|truncate:40:"..."|escape}</td>
129                 <td>{$logEntry->getRecipients()|truncate:40:"..."|escape}</td>
130                 <td>{$logEntry->getSubject()|truncate:60:"..."|escape}</td>
131                 <td>{if $logEntry->getAssocType()}<a href="{url op="submissionEmailLogType" path=$submission->getMonographId()|to_array:$logEntry->getAssocType():$logEntry->getAssocId()}" class="action">{translate key="common.related"}</a>&nbsp;|&nbsp;{/if}<a href="{url op="submissionEmailLog" path=$submission->getMonographId()|to_array:$logEntry->getLogId()}" class="action">{translate key="common.view"}</a>{if $isEditor}&nbsp;|&nbsp;<a href="{url op="clearSubmissionEmailLog" path=$submission->getMonographId()|to_array:$logEntry->getLogId()}" onclick="return confirm('{translate|escape:"jsparam" key="submission.email.confirmDeleteLogEntry"}')" class="action">{translate key="common.delete"}</a>{/if}</td>
132         </tr>
133         <tr valign="top">
134                 <td colspan="5" class="{if $emailLogEntries->eof()}end{/if}separator">&nbsp;</td>
135         </tr>
136 {/iterate}
137 {if $emailLogEntries->wasEmpty()}
138         <tr valign="top">
139                 <td colspan="5" class="nodata">{translate key="submission.history.noLogEntries"}</td>
140         </tr>
141         <tr valign="top">
142                 <td colspan="5" class="endseparator">&nbsp;</td>
143         </tr>
144 {/if}
145 </table>
147 <a class="action" href="{url op="submissionEmailLog" path=$submission->getMonographId()}">{translate key="submission.history.viewLog"}</a>{if $isEditor} |
148 <a class="action" href="{url op="clearsubmissionEmailLog" path=$submission->getMonographId()}" onclick="return confirm('{translate|escape:"jsparam" key="submission.email.confirmClearLog"}')">{translate key="submission.history.clearLog"}</a>{/if}
149 </div>
151 {include file="common/footer.tpl"}