4 * Copyright (c) 2003-2008 John Willinsky
5 * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
7 * Add/edit a supplementary file.
9 * $Id: suppFile.tpl,v 1.1 2009/02/13 23:18:37 tylerl Exp $
13 {assign var="pageTitle" value="author.submit.editSupplementaryFile"}
15 {assign var="pageTitle" value="author.submit.addSupplementaryFile"}
17 {assign var="pageCrumbTitle" value="submission.supplementaryFiles"}
18 {include file="common/header.tpl"}
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">
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}
34 {form_language_chooser form="suppFile" url=$formUrl}
35 <span class="instruct">{translate key="form.formLanguage.description"}</span>
41 <h3>{translate key="author.submit.supplementaryFileData"}</h3>
42 <p>{translate key="author.submit.supplementaryFileDataDescription"}</p>
44 <table width="100%" class="data">
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>
49 {if $enablePublicSuppFileId}
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>
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>
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>
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>
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>
72 <td class="label">{fieldLabel name="publisher" key="common.publisher"}</td>
74 <input type="text" name="publisher[{$formLocale|escape}]" id="publisher" value="{$publisher[$formLocale]|escape}" size="60" maxlength="255" class="textField" />
76 <span class="instruct">{translate key="author.submit.suppFile.publisherDescription"}</span>
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>
84 <td class="label">{fieldLabel name="dateCreated" key="common.date"}</td>
86 <input type="text" id="dateCreated" name="dateCreated" value="{$dateCreated|escape}" size="11" maxlength="10" class="textField" /> YYYY-MM-DD
88 <span class="instruct">{translate key="author.submit.suppFile.dateDescription"}</span>
92 <td class="label">{fieldLabel name="source" key="common.source"}</td>
94 <input type="text" id="source" name="source[{$formLocale|escape}]" value="{$source[$formLocale]|escape}" size="60" maxlength="255" class="textField" />
96 <span class="instruct">{translate key="author.submit.suppFile.sourceDescription"}</span>
100 <td class="label">{fieldLabel name="language" key="common.language"}</td>
102 <input type="text" id="language" name="language" value="{$language|escape}" size="5" maxlength="10" class="textField" />
104 <span class="instruct">{translate key="author.submit.languageInstructions"}</span>
109 <div class="separator"></div>
111 <h3>{translate key="author.submit.supplementaryFileUpload"}</h3>
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>
120 <td class="label">{translate key="common.originalFileName"}</td>
121 <td class="value">{$suppFile->getOriginalFileName()|escape}</td>
124 <td class="label">{translate key="common.fileSize"}</td>
125 <td class="value">{$suppFile->getNiceFileSize()}</td>
128 <td class="label">{translate key="common.dateUploaded"}</td>
129 <td class="value">{$suppFile->getDateUploaded()|date_format:$dateFormatShort}</td>
133 <table width="100%" class="data">
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>
141 <td colspan="2" class="nodata">{translate key="author.submit.suppFile.noFile"}</td>
148 <table width="100%" class="data">
152 {fieldLabel name="uploadSuppFile" key="common.replaceFile"}
154 {fieldLabel name="uploadSuppFile" key="common.upload"}
157 <td class="value"><input type="file" name="uploadSuppFile" id="uploadSuppFile" class="uploadField" /> {translate key="author.submit.supplementaryFiles.saveToUpload"}</td>
163 <input type="checkbox" name="showReviewers" id="showReviewers" value="1"{if $showReviewers==1} checked="checked"{/if} />
164 <label for="showReviewers">{translate key="author.submit.suppFile.availableToPeers"}</label>
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>
180 {include file="common/footer.tpl"}