baseline
[omp.pkp.sfu.ca.git] / templates / submission / suppFile / suppFile.tpl
blob8f24f058259d01b41b5ace3858145faec9a4f828
1 {**
2  * suppFile.tpl
3  *
4  * Copyright (c) 2003-2008 John Willinsky
5  * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
6  *
7  * Add/edit a supplementary file.
8  *
9  * $Id: suppFile.tpl,v 1.1 2009/02/13 23:18:37 tylerl Exp $
10  *}
11 {strip}
12 {if $suppFileId}
13         {assign var="pageTitle" value="author.submit.editSupplementaryFile"}
14 {else}
15         {assign var="pageTitle" value="author.submit.addSupplementaryFile"}
16 {/if}
17 {assign var="pageCrumbTitle" value="submission.supplementaryFiles"}
18 {include file="common/header.tpl"}
19 {/strip}
21 <form name="suppFile" method="post" action="{url page=$rolePath op="saveSuppFile" path=$suppFileId}" enctype="multipart/form-data">
22 <input type="hidden" name="monographId" value="{$monographId|escape}" />
23 <input type="hidden" name="from" value="{$from|escape}" />
24 {include file="common/formErrors.tpl"}
26 {if count($formLocales) > 1}
27 <table width="100%" class="data">
28         <tr valign="top">
29                 <td width="20%" class="label">{fieldLabel name="formLocale" key="form.formLanguage"}</td>
30                 <td width="80%" class="value">
31                         {if $suppFileId}{url|assign:"formUrl" op="editSuppFile" path=$monographId|to_array:$suppFileId from=$from escape=false}
32                         {else}{url|assign:"formUrl" op="addSuppFile" path=$monographId from=$from escape=false}
33                         {/if}
34                         {form_language_chooser form="suppFile" url=$formUrl}
35                         <span class="instruct">{translate key="form.formLanguage.description"}</span>
36                 </td>
37         </tr>
38 </table>
40 {/if}
41 <h3>{translate key="author.submit.supplementaryFileData"}</h3>
42 <p>{translate key="author.submit.supplementaryFileDataDescription"}</p>
44 <table width="100%" class="data">
45         <tr valign="top">
46                 <td width="20%" class="label">{fieldLabel name="title" required="true" key="common.title"}</td>
47                 <td width="80%" class="value"><input type="text" id="title" name="title[{$formLocale|escape}]" value="{$title[$formLocale]|escape}" size="60" maxlength="255" class="textField" /></td>
48         </tr>
49         {if $enablePublicSuppFileId}
50         <tr valign="top">
51                 <td width="20%" class="label">{fieldLabel name="publicSuppFileId" key="author.suppFile.publicSuppFileIdentifier"}</td>
52                 <td width="80%" class="value"><input type="text" id="publicSuppFileId" name="publicSuppFileId" value="{$publicSuppFileId|escape}" size="20" maxlength="255" class="textField" /></td>
53         </tr>
54         {/if}
55         <tr valign="top">
56                 <td class="label">{fieldLabel name="creator" key="author.submit.suppFile.createrOrOwner"}</td>
57                 <td class="value"><input type="text" id="creator" name="creator[{$formLocale|escape}]" value="{$creator[$formLocale]|escape}" size="60" maxlength="255" class="textField" /></td>
58         </tr>
59         <tr valign="top">
60                 <td class="label">{fieldLabel name="subject" key="common.subject"}</td>
61                 <td class="value"><input type="text" name="subject[{$formLocale|escape}]" id="subject" value="{$subject[$formLocale]|escape}" size="60" maxlength="255" class="textField" /></td>
62         </tr>
63         <tr valign="top">
64                 <td class="label">{fieldLabel name="type" key="common.type"}</td>
65                 <td class="value"><select name="type" size="1" id="type" class="selectMenu">{html_options_translate output=$typeOptionsOutput values=$typeOptionsValues translateValues="true" selected=$type}</select><br />{translate key="author.submit.suppFile.specifyOtherType"}: <input type="text" name="typeOther[{$formLocale|escape}]" value="{$typeOther[$formLocale]|escape}" size="45" maxlength="255" class="textField" /></td>
66         </tr>
67         <tr valign="top">
68                 <td class="label">{fieldLabel name="description" key="author.submit.suppFile.briefDescription"}</td>
69                 <td class="value"><textarea name="description[{$formLocale|escape}]" id="description" rows="5" cols="60" class="textArea">{$description[$formLocale]|escape}</textarea></td>
70         </tr>
71         <tr valign="top">
72                 <td class="label">{fieldLabel name="publisher" key="common.publisher"}</td>
73                 <td class="value">
74                         <input type="text" name="publisher[{$formLocale|escape}]" id="publisher" value="{$publisher[$formLocale]|escape}" size="60" maxlength="255" class="textField" />
75                         <br />
76                         <span class="instruct">{translate key="author.submit.suppFile.publisherDescription"}</span>
77                 </td>
78         </tr>
79         <tr valign="top">
80                 <td class="label">{fieldLabel name="sponsor" key="author.submit.suppFile.contributorOrSponsor"}</td>
81                 <td class="value"><input id="sponsor" type="text" name="sponsor[{$formLocale|escape}]" value="{$sponsor[$formLocale]|escape}" size="60" maxlength="255" class="textField" /></td>
82         </tr>
83         <tr valign="top">
84                 <td class="label">{fieldLabel name="dateCreated" key="common.date"}</td>
85                 <td class="value">
86                         <input type="text" id="dateCreated" name="dateCreated" value="{$dateCreated|escape}" size="11" maxlength="10" class="textField" /> YYYY-MM-DD
87                         <br />
88                         <span class="instruct">{translate key="author.submit.suppFile.dateDescription"}</span>
89                 </td>
90         </tr>
91         <tr valign="top">
92                 <td class="label">{fieldLabel name="source" key="common.source"}</td>
93                 <td class="value">
94                         <input type="text" id="source" name="source[{$formLocale|escape}]" value="{$source[$formLocale]|escape}" size="60" maxlength="255" class="textField" />
95                         <br />
96                         <span class="instruct">{translate key="author.submit.suppFile.sourceDescription"}</span>
97                 </td>
98         </tr>
99         <tr valign="top">
100                 <td class="label">{fieldLabel name="language" key="common.language"}</td>
101                 <td class="value">
102                         <input type="text" id="language" name="language" value="{$language|escape}" size="5" maxlength="10" class="textField" />
103                         <br />
104                         <span class="instruct">{translate key="author.submit.languageInstructions"}</span>
105                 </td>
106         </tr>
107 </table>
109 <div class="separator"></div>
111 <h3>{translate key="author.submit.supplementaryFileUpload"}</h3>
113 <table class="data">
114 {if $suppFile}
115         <tr valign="top">
116                 <td width="20%" class="label">{translate key="common.fileName"}</td>
117                 <td width="80%" class="data"><a href="{url op="downloadFile" path=$monographId|to_array:$suppFile->getFileId()}">{$suppFile->getFileName()|escape}</a></td>
118         </tr>
119         <tr valign="top">
120                 <td class="label">{translate key="common.originalFileName"}</td>
121                 <td class="value">{$suppFile->getOriginalFileName()|escape}</td>
122         </tr>
123         <tr valign="top">
124                 <td class="label">{translate key="common.fileSize"}</td>
125                 <td class="value">{$suppFile->getNiceFileSize()}</td>
126         </tr>
127         <tr>
128                 <td class="label">{translate key="common.dateUploaded"}</td>
129                 <td class="value">{$suppFile->getDateUploaded()|date_format:$dateFormatShort}</td>
130         </tr>
131 </table>
132         
133 <table width="100%"  class="data">
134         <tr valign="top">
135                 <td width="5%" class="label"><input type="checkbox" name="showReviewers" id="showReviewers" value="1"{if $showReviewers==1} checked="checked"{/if} /></td>
136                 <td width="95%" class="value"><label for="showReviewers">{translate key="author.submit.suppFile.availableToPeers"}</label></td>
137         </tr>
138 </table>
139 {else}
140         <tr valign="top">
141                 <td colspan="2" class="nodata">{translate key="author.submit.suppFile.noFile"}</td>
142         </tr>
143 </table>
144 {/if}
146 <br />
148 <table width="100%" class="data">
149         <tr valign="top">
150                 <td class="label">
151                         {if $suppFile}
152                                 {fieldLabel name="uploadSuppFile" key="common.replaceFile"}
153                         {else}
154                                 {fieldLabel name="uploadSuppFile" key="common.upload"}
155                         {/if}
156                 </td>
157                 <td class="value"><input type="file" name="uploadSuppFile" id="uploadSuppFile" class="uploadField" />&nbsp;&nbsp;{translate key="author.submit.supplementaryFiles.saveToUpload"}</td>
158         </tr>
159         {if not $suppFile}
160         <tr valign="top">
161                 <td>&nbsp;</td>
162                 <td class="value">
163                         <input type="checkbox" name="showReviewers" id="showReviewers" value="1"{if $showReviewers==1} checked="checked"{/if} />&nbsp;
164                         <label for="showReviewers">{translate key="author.submit.suppFile.availableToPeers"}</label>
165                 </td>
166         </tr>
167         {/if}
168 </table>
171 <div class="separator"></div>
174 <p><input type="submit" value="{translate key="common.save"}" class="button defaultButton" /> <input type="button" value="{translate key="common.cancel"}" class="button" onclick="history.go(-1)" /></p>
176 <p><span class="formRequired">{translate key="common.requiredField"}</span></p>
178 </form>
180 {include file="common/footer.tpl"}