Skip to content
Snippets Groups Projects
Commit 29cea9cc authored by Tim Steiner's avatar Tim Steiner
Browse files

Add links to files on both view and edit screens.

parent 47a5abf5
No related branches found
No related tags found
No related merge requests found
......@@ -365,6 +365,57 @@
<?php } else { ?>
<input type="hidden" name="dfRemoval" value="no" />
<?php } ?>
<!-- fieldset id="dfRemovalFieldset">
<div class="legend">DF Removal:</div>
<div class="selections">
<div>
<input type="radio"
id="dfRemoval_no"
class="radio"
name="dfRemoval"
value="no"
<?php if($this->course->dfRemoval == 'no') { ?>
checked="checked"
<?php } ?>
/>
<label for="dfRemoval_no">No</label>
</div>
<div>
<input type="radio"
id="dfRemoval_yes"
class="radio"
name="dfRemoval"
value="yes"
<?php if($this->course->dfRemoval == 'yes') { ?>
checked="checked"
<?php } ?>
/>
<label for="dfRemoval_yes">Yes, previous version of this course</label>
</div>
<div>
<input type="radio"
id="dfRemoval_yes"
class="radio"
name="dfRemoval"
value="yes"
<?php if($this->course->dfRemoval == 'yes') { ?>
checked="checked"
<?php } ?>
/>
<label for="dfRemoval_yes">Yes, the following course:</label>
</div>
<div id="dfRemovalCourseId">
<?php /*echo $this->formSelect('dfRemovalSubject', null, null, Subjects::getInstance()->getSubjectList()); ?>
<?php echo $this->formSelect('dfRemovalCourseNumber'); ?>
<?php echo $this->formSelect('dfRemovalCourseLetter'); ?>
<?php echo $this->formSelect('dfRemovalLastEffectiveSemester'); */ ?>
</div>
</div>
<div class="clear"></div>
</fieldset -->
<fieldset class="four_column">
......@@ -589,7 +640,14 @@
<h3>Syllabus</h3>
<?php } ?>
<?php echo htmlspecialchars($this->request->getFileByType(RequestFile::SYLLABUS_TYPE)->title); ?>
<?php
$syllabus = $this->request->getFileByType(RequestFile::SYLLABUS_TYPE);
if ($syllabus) {
echo '<a href="/Request/GetFile/' . $syllabus->file . '">';
echo htmlspecialchars($syllabus->title);
echo '</a>';
}
?>
<input type="file" name="request[<?php echo RequestFile::SYLLABUS_TYPE; ?>]" />
</label>
<label>
......@@ -603,7 +661,14 @@
<fieldset>
<label>
<h3>Crosslist Memo</h3>
<?php echo htmlspecialchars($this->request->getFileByType(RequestFile::CROSSLIST_MEMO_TYPE)->title); ?>
<?php
$crosslistMemo = $this->request->getFileByType(RequestFile::CROSSLIST_MEMO_TYPE);
if ($crosslistMemo) {
echo '<a href="/Request/GetFile/' . $crosslistMemo->file . '">';
echo htmlspecialchars($crosslistMemo->title);
echo '</a>';
}
?>
<input type="file" name="request[<?php echo RequestFile::CROSSLIST_MEMO_TYPE; ?>]" />
</label>
<label>
......@@ -618,7 +683,14 @@
<fieldset>
<label>
<h3 class="required">IS Narrative Documentation</h3>
<?php echo htmlspecialchars($this->request->getFileByType(RequestFile::IS_NARRATIVE_TYPE)->title); ?>
<?php
$ISNarrative = $this->request->getFileByType(RequestFile::IS_NARRATIVE_TYPE);
if ($ISNarrative) {
echo '<a href="/Request/GetFile/' . $ISNarrative->file . '">';
echo htmlspecialchars($ISNarrative->title);
echo '</a>';
}
?>
<input type="file" name="request[<?php echo RequestFile::IS_NARRATIVE_TYPE; ?>]" />
</label>
<label>
......@@ -633,7 +705,14 @@
<fieldset>
<label>
<h3>Additional Documentation (opt.)</h3>
<?php echo htmlspecialchars($this->request->getFileByType(RequestFile::OTHER_TYPE)->title); ?>
<?php
$additionalDocumentation = $this->request->getFileByType(RequestFile::OTHER_TYPE);
if ($additionalDocumentation) {
echo '<a href="/Request/GetFile/' . $additionalDocumentation->file . '">';
echo htmlspecialchars($additionalDocumentation->title);
echo '</a>';
}
?>
<input type="file" name="request[<?php echo RequestFile::OTHER_TYPE; ?>]" />
</label>
<label>
......
......@@ -73,6 +73,19 @@
</div>
<?php } ?>
<?php
$additionalDocumentation = $this->request->getFileByType(RequestFile::OTHER_TYPE);
if ($ISNarrative) {
?>
<div id="isNarrative">
<h2>Additional Documentation</h2>
<a href="/Request/GetFile/<?php echo $additionalDocumentation->file; ?>">
<?php echo $additionalDocumentation->title; ?>
</a>
</div>
<?php } ?>
<?php if ($this->preview) { ?>
<form method="post" action="/Request/Update">
<?php if ($this->initialRequest) { ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment