View | Details | Raw Unified | Return to bug 6740
Collapse All | Expand All

(-)a/classes/author/form/submit/AuthorSubmitSuppFileForm.inc.php (-1 / +3 lines)
 Lines 135-141   class AuthorSubmitSuppFileForm extends Form { Link Here 
135
				'type' => ''
135
				'type' => ''
136
			);
136
			);
137
		}
137
		}
138
138
		return parent::initData();
139
	}
139
	}
140
140
141
	/**
141
	/**
 Lines 171-176   class AuthorSubmitSuppFileForm extends Form { Link Here 
171
171
172
		$fileName = 'uploadSuppFile';
172
		$fileName = 'uploadSuppFile';
173
173
174
		parent::execute();
175
174
		// edit an existing supp file, otherwise create new supp file entry
176
		// edit an existing supp file, otherwise create new supp file entry
175
		if (isset($this->suppFile)) {
177
		if (isset($this->suppFile)) {
176
			$suppFile =& $this->suppFile;
178
			$suppFile =& $this->suppFile;
(-)a/classes/submission/form/SuppFileForm.inc.php (-1 / +3 lines)
 Lines 166-172   class SuppFileForm extends Form { Link Here 
166
				'showReviewers' => 1
166
				'showReviewers' => 1
167
			);
167
			);
168
		}
168
		}
169
169
		return parent::initData();
170
	}
170
	}
171
171
172
	/**
172
	/**
 Lines 203-208   class SuppFileForm extends Form { Link Here 
203
203
204
		$fileName = isset($fileName) ? $fileName : 'uploadSuppFile';
204
		$fileName = isset($fileName) ? $fileName : 'uploadSuppFile';
205
205
206
		parent::execute();
207
206
		if (isset($this->suppFile)) {
208
		if (isset($this->suppFile)) {
207
			$suppFile =& $this->suppFile;
209
			$suppFile =& $this->suppFile;
208
210
(-)a/templates/author/submit/suppFile.tpl (-2 / +11 lines)
 Lines 97-102    Link Here 
97
</table>
97
</table>
98
</div>
98
</div>
99
<div class="separator"></div>
99
<div class="separator"></div>
100
101
{call_hook name="Templates::Author::Submit::SuppFile::AdditionalMetadata"}
102
100
<div id="supplementaryFileUpload">
103
<div id="supplementaryFileUpload">
101
<h3>{translate key="author.submit.supplementaryFileUpload"}</h3>
104
<h3>{translate key="author.submit.supplementaryFileUpload"}</h3>
102
105
 Lines 138-147    Link Here 
138
141
139
<table id="replaceFile" class="data" width="100%">
142
<table id="replaceFile" class="data" width="100%">
140
<tr valign="top">
143
<tr valign="top">
141
	<td width="20%" class="label">{fieldLabel name="uploadSuppFile" key="common.replaceFile"}</td>
144
	<td width="20%" class="label">
145
		{if $suppFile && $suppFile->getFileId()}
146
			{fieldLabel name="uploadSuppFile" key="common.replaceFile"}
147
		{else}
148
			{fieldLabel name="uploadSuppFile" key="common.upload"}
149
		{/if}
150
	</td>
142
	<td width="80%" class="value"><input type="file" name="uploadSuppFile" id="uploadSuppFile" class="uploadField" />&nbsp;&nbsp;{translate key="form.saveToUpload"}</td>
151
	<td width="80%" class="value"><input type="file" name="uploadSuppFile" id="uploadSuppFile" class="uploadField" />&nbsp;&nbsp;{translate key="form.saveToUpload"}</td>
143
</tr>
152
</tr>
144
{if not $suppFile}
153
{if not ($suppFile && $suppFile->getFileId())}
145
<tr valign="top">
154
<tr valign="top">
146
	<td>&nbsp;</td>
155
	<td>&nbsp;</td>
147
        <td class="value"><input type="checkbox" name="showReviewers" id="showReviewers" value="1"{if $showReviewers==1} checked="checked"{/if} />&nbsp;
156
        <td class="value"><input type="checkbox" name="showReviewers" id="showReviewers" value="1"{if $showReviewers==1} checked="checked"{/if} />&nbsp;
(-)a/templates/sectionEditor/submission/management.tpl (-1 / +17 lines)
 Lines 40-46    Link Here 
40
		<td class="label">{translate key="article.suppFilesAbbrev"}</td>
40
		<td class="label">{translate key="article.suppFilesAbbrev"}</td>
41
		<td colspan="2" class="value">
41
		<td colspan="2" class="value">
42
			{foreach name="suppFiles" from=$suppFiles item=suppFile}
42
			{foreach name="suppFiles" from=$suppFiles item=suppFile}
43
				<a href="{url op="downloadFile" path=$submission->getId()|to_array:$suppFile->getFileId()}" class="file">{$suppFile->getFileName()|escape}</a>&nbsp;&nbsp;{$suppFile->getDateModified()|date_format:$dateFormatShort}&nbsp;&nbsp;<a href="{url op="editSuppFile" from="submission" path=$submission->getId()|to_array:$suppFile->getId()}" class="action">{translate key="common.edit"}</a>&nbsp;&nbsp;&nbsp;&nbsp;{if !$notFirst}&nbsp;&nbsp;&nbsp;&nbsp;<a href="{url op="addSuppFile" from="submission" path=$submission->getId()}" class="action">{translate key="submission.addSuppFile"}</a>{/if}<br />
43
				{if $suppFile->getFileId()}
44
					<a href="{url op="downloadFile" path=$submission->getId()|to_array:$suppFile->getFileId()}" class="file">{$suppFile->getFileName()|escape}</a>
45
					&nbsp;&nbsp;
46
				{/if}
47
				{if $suppFile->getDateModified()}
48
					{$suppFile->getDateModified()|date_format:$dateFormatShort}&nbsp;&nbsp;
49
				{else}
50
					{$suppFile->getDateSubmitted()|date_format:$dateFormatShort}&nbsp;&nbsp;
51
				{/if}
52
				<a href="{url op="editSuppFile" from="submission" path=$submission->getId()|to_array:$suppFile->getId()}" class="action">{translate key="common.edit"}</a>
53
				&nbsp;|&nbsp;
54
				<a href="{url op="deleteSuppFile" from="submission" path=$submission->getId()|to_array:$suppFile->getId()}" onclick="return confirm('{translate|escape:"jsparam" key="author.submit.confirmDeleteSuppFile"}')" class="action">{translate key="common.delete"}</a>
55
				{if !$notFirst}
56
					&nbsp;&nbsp;&nbsp;&nbsp;
57
					<a href="{url op="addSuppFile" from="submission" path=$submission->getId()}" class="action">{translate key="submission.addSuppFile"}</a>
58
				{/if}
59
				<br />
44
				{assign var=notFirst value=1}
60
				{assign var=notFirst value=1}
45
			{foreachelse}
61
			{foreachelse}
46
				{translate key="common.none"}&nbsp;&nbsp;&nbsp;&nbsp;<a href="{url op="addSuppFile" from="submission" path=$submission->getId()}" class="action">{translate key="submission.addSuppFile"}</a>
62
				{translate key="common.none"}&nbsp;&nbsp;&nbsp;&nbsp;<a href="{url op="addSuppFile" from="submission" path=$submission->getId()}" class="action">{translate key="submission.addSuppFile"}</a>
(-)a/templates/submission/suppFile/suppFile.tpl (-3 / +6 lines)
 Lines 109-119    Link Here 
109
</table>
109
</table>
110
</div>
110
</div>
111
<div class="separator"></div>
111
<div class="separator"></div>
112
113
{call_hook name="Templates::Submission::SuppFile::AdditionalMetadata"}
114
112
<div id="supplementaryFileUpload">
115
<div id="supplementaryFileUpload">
113
<h3>{translate key="author.submit.supplementaryFileUpload"}</h3>
116
<h3>{translate key="author.submit.supplementaryFileUpload"}</h3>
114
117
115
<table id="suppFile" class="data">
118
<table id="suppFile" class="data">
116
{if $suppFile}
119
{if $suppFile && $suppFile->getFileId()}
117
	<tr valign="top">
120
	<tr valign="top">
118
		<td width="20%" class="label">{translate key="common.fileName"}</td>
121
		<td width="20%" class="label">{translate key="common.fileName"}</td>
119
		<td width="80%" class="data"><a href="{url op="downloadFile" path=$articleId|to_array:$suppFile->getFileId()}">{$suppFile->getFileName()|escape}</a></td>
122
		<td width="80%" class="data"><a href="{url op="downloadFile" path=$articleId|to_array:$suppFile->getFileId()}">{$suppFile->getFileName()|escape}</a></td>
 Lines 150-156    Link Here 
150
<table id="showReviewers" width="100%" class="data">
153
<table id="showReviewers" width="100%" class="data">
151
	<tr valign="top">
154
	<tr valign="top">
152
		<td class="label">
155
		<td class="label">
153
			{if $suppFile}
156
			{if $suppFile && $suppFile->getFileId()}
154
				{fieldLabel name="uploadSuppFile" key="common.replaceFile"}
157
				{fieldLabel name="uploadSuppFile" key="common.replaceFile"}
155
			{else}
158
			{else}
156
				{fieldLabel name="uploadSuppFile" key="common.upload"}
159
				{fieldLabel name="uploadSuppFile" key="common.upload"}
 Lines 158-164    Link Here 
158
		</td>
161
		</td>
159
		<td class="value"><input type="file" name="uploadSuppFile" id="uploadSuppFile" class="uploadField" />&nbsp;&nbsp;{translate key="author.submit.supplementaryFiles.saveToUpload"}</td>
162
		<td class="value"><input type="file" name="uploadSuppFile" id="uploadSuppFile" class="uploadField" />&nbsp;&nbsp;{translate key="author.submit.supplementaryFiles.saveToUpload"}</td>
160
	</tr>
163
	</tr>
161
	{if not $suppFile}
164
	{if not ($suppFile && $suppFile->getFileId())}
162
	<tr valign="top">
165
	<tr valign="top">
163
		<td>&nbsp;</td>
166
		<td>&nbsp;</td>
164
		<td class="value">
167
		<td class="value">

Return to bug 6740