what-did-they-say/classes/partials/_manage-queued-transcripts.inc

52 lines
2.1 KiB
PHP
Raw Normal View History

2009-10-09 01:40:04 +00:00
<?php
$transcripts_to_show = array();
if (current_user_can('approve_transcriptions')) {
2009-10-09 01:58:06 +00:00
$transcripts_to_show = $queued_transcript_object->get_transcripts();
2009-10-09 01:40:04 +00:00
$title = __('All Submitted Transcripts', 'what-did-they-say');
} else {
if (!is_admin()) {
$user = wp_get_current_user();
if (!empty($user)) {
2009-10-09 01:58:06 +00:00
$transcripts_to_show = $queued_transcript_object->get_transcripts_for_user($user->ID);
2009-10-09 01:40:04 +00:00
$title = __('Your Submitted Transcripts', 'what-did-they-say');
}
}
}
?>
<?php if (!empty($transcripts_to_show)) { ?>
<h3 style="margin-top: 0.5em"><?php echo $title ?></h3>
2009-10-01 00:45:05 +00:00
<?php
2009-10-09 01:40:04 +00:00
foreach ($transcripts_to_show as $transcript) {
2009-10-09 01:58:06 +00:00
include('_display-queued-transcript.inc');
2009-10-01 00:45:05 +00:00
}
?>
<?php } ?>
<?php if (current_user_can('submit_transcriptions')) { ?>
2009-10-01 02:33:17 +00:00
<div id="wdts-<?php echo $new_transcript_id ?>" style="zoom:1<?php echo (!$transcript_options->are_new_transcripts_allowed() ? ';display:none' : '') ?>">
<?php wdts_header_wrapper(__('Submit a New Transcript:', 'what-did-they-say')) ?>
2009-10-01 01:28:03 +00:00
<form method="post">
2009-10-01 00:45:05 +00:00
<input type="hidden" name="wdts[_nonce]" value="<?php echo wp_create_nonce('what-did-they-say') ?>" />
<input type="hidden" name="wdts[module]" value="queue-transcript" />
<input type="hidden" name="wdts[post_id]" value="<?php echo $post->ID ?>" />
<div class="wdts-transcript-editor">
<label>
<?php _e('Language:', 'what-did-they-say') ?>
<select name="wdts[language]">
<?php foreach ($language_options->get_languages() as $code => $info) { ?>
<option value="<?php echo $code ?>"><?php echo $info['name'] ?></option>
<?php } ?>
</select>
</label>
<div class="wdts-button-holder"></div>
<textarea style="height: 200px; width: 99%" name="wdts[transcript]"></textarea>
2009-10-02 03:04:16 +00:00
<input type="submit" class="button" value="<?php _e('Submit For Approval', 'what-did-they-say') ?>" />
2009-10-01 00:45:05 +00:00
</div>
</form>
2009-10-01 01:28:03 +00:00
</div>
<script type="text/javascript">WhatDidTheySay.setup_transcript_editor('wdts-<?php echo $new_transcript_id ?>')</script>
2009-10-01 00:45:05 +00:00
<?php } ?>