more cleanup

This commit is contained in:
John Bintz 2009-10-08 21:40:04 -04:00
parent 3bb9516f87
commit c153688d93
4 changed files with 73 additions and 10 deletions

View File

@ -0,0 +1,50 @@
<?php if (current_user_can('submit_transcriptions')) { ?>
<h3><?php _e('How It Works', 'what-did-they-say') ?></h3>
<p>
<?php _e('<strong>What Did They Say?!?</strong> uses a wspecial workflow to handle the submission and approval of transcripts.', 'what-did-they-say') ?>
<?php _e('Below are the typical usage patterns of <strong>What Did They Say?!?</strong>:', 'what-did-they-say') ?>
</p>
<hr />
<h4><?php _e('A single user updating their own transcripts', 'what-did-they-say') ?></h4>
<p>
<?php _e('If you\'re the only user of the site, you would edit the <strong>Approved transcripts</strong> of each post. You don\'t need to enable transcript submissions for any of your posts.', 'what-did-they-say') ?>
<?php _e('All users need to have enough permissions to <strong>Approve Transcripts</strong>.', 'what-did-they-say') ?>
</p>
<hr />
<h4><?php _e('Multiple users who directly update transcripts on posts', 'what-did-they-say') ?></h4>
<p>
<?php _e('If you trust the other users on your site, you all would edit the <strong>Approved transcripts</strong> of each post. Again, you don\'t need to enable transcript submissions for any of your posts.', 'what-did-they-say') ?>
<?php _e('All users need to have enough permissions to <strong>Approve Transcripts</strong>.', 'what-did-they-say') ?>
</p>
<hr />
<h4><?php _e('Multiple users, some of which submit transcripts and some that approve transcripts', 'what-did-they-say') ?></h4>
<p>
<?php _e('The users who are allowed to submit transcripts get the <strong>Submit Transcripts</strong> capability.', 'what-did-they-say') ?>
<?php _e('The users who aprove transcripts get the <strong>Approve Transcripts</strong> capability.', 'what-did-they-say') ?>
</p>
<p>
<?php _e('For posts where users are allowed to submit transcripts, a user with Approve Transcripts needs to enable <strong>Allow new transcripts for this post</strong>.', 'what-did-they-say') ?>
</p>
<p>
<?php _e('Transcript submitters need to submit transcripts from the post directly, not from the Admin interface.', 'what-did-they-say') ?>
<?php _e('Transcript submitters submit their transcripts to the queue, making them <strong>Queued Transcripts</strong>.', 'what-did-they-say') ?>
<?php _e('Submitters can edit and delete their own transcripts while they\'re in the queue. Once they\'re approved, they can no longer be edited by the submitter.', 'what-did-they-say') ?>
</p>
<p>
<?php _e('Transcript approvers can approve, edit, or delete queued transcripts of any users.', 'what-did-they-say') ?>
<?php _e('Once a transcript is approved, it\'s removed from the queue and made live on the site.', 'what-did-they-say') ?>
</p>
<?php } ?>

View File

@ -1,7 +1,26 @@
<?php if ((count($queued_transcripts_for_user) > 0) && !current_user_can('approve_transcriptions') && !is_admin()) { ?> <?php
<h3 style="margin-top: 0.5em"><?php _e('Your Submitted Transcripts:', 'what-did-they-say') ?></h3>
$transcripts_to_show = array();
if (current_user_can('approve_transcriptions')) {
$transcripts_to_show = $queued_transcripts->get_transcripts();
$title = __('All Submitted Transcripts', 'what-did-they-say');
} else {
if (!is_admin()) {
$user = wp_get_current_user();
if (!empty($user)) {
$transcripts_to_show = $queued_transcripts->get_transcripts_for_user($user->ID);
$title = __('Your Submitted Transcripts', 'what-did-they-say');
}
}
}
?>
<?php if (!empty($transcripts_to_show)) { ?>
<h3 style="margin-top: 0.5em"><?php echo $title ?></h3>
<?php <?php
foreach ($queued_transcripts_for_user as $transcript) { foreach ($transcripts_to_show as $transcript) {
include(dirname(__FILE__) . '/classes/partials/_display-queued-transcript.inc'); include(dirname(__FILE__) . '/classes/partials/_display-queued-transcript.inc');
} }
?> ?>

View File

@ -1,6 +1,7 @@
<?php <?php
$pages = array( $pages = array(
'introduction' => __('Introduction', 'what-did-they-say'), 'introduction' => __('Introduction', 'what-did-they-say'),
'how-it-works' => __('How It Works', 'what-did-they-say'),
'capabilities' => array(__('Capabilities', 'what-did-they-say'), 'edit_users'), 'capabilities' => array(__('Capabilities', 'what-did-they-say'), 'edit_users'),
'default-styles' => array(__('Styles', 'what-did-they-say'), 'edit_themes'), 'default-styles' => array(__('Styles', 'what-did-they-say'), 'edit_themes'),
'change-languages' => array(__('Languages', 'what-did-they-say'), 'change_languages'), 'change-languages' => array(__('Languages', 'what-did-they-say'), 'change_languages'),

View File

@ -184,15 +184,8 @@ function the_media_transcript_queue_editor() {
global $post; global $post;
if (current_user_can('submit_transcriptions')) { if (current_user_can('submit_transcriptions')) {
$queued_transcripts_for_user = false;
$queued_transcripts = new WDTSQueuedTranscript($post->ID); $queued_transcripts = new WDTSQueuedTranscript($post->ID);
$user = wp_get_current_user();
if (!empty($user)) {
$queued_transcripts_for_user = $queued_transcripts->get_transcripts_for_user($user->ID);
}
$language_options = new WDTSLanguageOptions(); $language_options = new WDTSLanguageOptions();
$transcript_options = new WDTSTranscriptOptions($post->ID); $transcript_options = new WDTSTranscriptOptions($post->ID);