Created
February 28, 2025 16:30
-
-
Save mreidsma/c20361928e82680729222a19a737edd3 to your computer and use it in GitHub Desktop.
Corrections plugin template file for GVSU's Omeka: views/public/index/add.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
queue_css_file('correction'); | |
echo head(); | |
$user = current_user(); | |
?> | |
<?php echo flash(); ?> | |
<div class="wrapper"> | |
<div class="content"> | |
<div class="row"> | |
<div class="col-12"> | |
<p> | |
<?php echo __('You can suggest corrections to the following fields for item '); ?> | |
<?php echo link_to($item, 'show', metadata($item, array('Dublin Core', 'Title')) . '.' , array('target' => '_blank')); ?> | |
</p> | |
<p> | |
<?php echo __('You can also leave general comments or suggestions in the "comments" section. An administrator will review your contribution.'); ?> | |
</p> | |
<p> | |
<?php echo __('Thank you for taking the time to improve this site!'); ?> | |
</p> | |
</div> | |
</div> | |
</div> | |
</div> | |
<form method='post'> | |
<div class="wrapper-full-width wrapper-background wrapper-light"> | |
<div style="background-color: #f7f7f7;"> | |
<div class="content"> | |
<div class="row"> | |
<div class="col-12"> | |
<style> | |
button.add-element { | |
display: none; | |
} | |
.field-meta label { | |
text-transform: uppercase; | |
font-weight: bold; | |
font-size: 1.2em; | |
} | |
.correction-current-data { | |
border: none !important; | |
} | |
</style> | |
<h2> <label for='comment'><?php echo __('Comments'); ?></label> | |
</h2> | |
<p class="explanation"><?php echo __('Please describe the nature of this correction, or anything about it that we should know. Thanks!'); ?></p> | |
<div class="input-block"> | |
<textarea cols='50' rows='3' name='comment'></textarea> | |
</div> | |
<?php if ( ! $user): ?> | |
<h2><label for='email'><?php echo __('Email'); ?></label> | |
</h2> | |
<p class="explanation"></p> | |
<div class="input-block"> | |
<input type='text' name='email' /> | |
</div> | |
<?php endif; ?> | |
<input type="checkbox" value="1" name="may_contact"> | |
<label for='may_contact'>Check this box if it is okay for us to contact you about this correction.</label> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="wrapper"> | |
<div class="content"> | |
<div class="row"> | |
<div class="col-12"> | |
<?php | |
foreach ($elements as $element) { | |
echo "<div class='element-correction' >"; | |
$elName = $element->name; | |
$elSet = $element->getElementSet(); | |
$elSetName = $elSet->name; | |
echo $this->elementForm($element, $corrections_correction); | |
echo "<p class='correction-current-data'>" . __('Current data for %s', $elName) . "</p>"; | |
echo "<p>" . metadata($item, array($elSetName, $elName)) . "</p>"; | |
echo "</div>"; | |
} | |
?> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="wrapper-full-width wrapper-background wrapper-light"> | |
<div style="background-color: #f7f7f7;"> | |
<div class="content"> | |
<div class="row"> | |
<div class="col-12"> | |
<?php | |
if (! $user) { | |
echo $captchaScript; | |
} | |
echo $this->formSubmit('submit', __('Submit Correction')); | |
?> | |
<input type='hidden' name='item_id' value='<?php echo $item->id; ?>' /> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</form> | |
<?php echo foot(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment