From c153688d93f4e289edb1dd240544055753f4049a Mon Sep 17 00:00:00 2001 From: John Bintz Date: Thu, 8 Oct 2009 21:40:04 -0400 Subject: [PATCH] more cleanup --- classes/partials/_how-it-works.inc | 50 +++++++++++++++++++ .../partials/_manage-queued-transcripts.inc | 25 ++++++++-- classes/partials/admin.inc | 1 + what-did-they-say.php | 7 --- 4 files changed, 73 insertions(+), 10 deletions(-) create mode 100644 classes/partials/_how-it-works.inc diff --git a/classes/partials/_how-it-works.inc b/classes/partials/_how-it-works.inc new file mode 100644 index 0000000..e248a70 --- /dev/null +++ b/classes/partials/_how-it-works.inc @@ -0,0 +1,50 @@ + +

+ +

+ What Did They Say?!? uses a wspecial workflow to handle the submission and approval of transcripts.', 'what-did-they-say') ?> + What Did They Say?!?:', 'what-did-they-say') ?> +

+ +
+ +

+ +

+ Approved transcripts of each post. You don\'t need to enable transcript submissions for any of your posts.', 'what-did-they-say') ?> + Approve Transcripts.', 'what-did-they-say') ?> +

+ +
+ +

+ +

+ Approved transcripts of each post. Again, you don\'t need to enable transcript submissions for any of your posts.', 'what-did-they-say') ?> + Approve Transcripts.', 'what-did-they-say') ?> +

+ +
+ +

+ +

+ Submit Transcripts capability.', 'what-did-they-say') ?> + Approve Transcripts capability.', 'what-did-they-say') ?> +

+ +

+ Allow new transcripts for this post.', 'what-did-they-say') ?> +

+ +

+ + Queued Transcripts.', 'what-did-they-say') ?> + +

+ +

+ + +

+ diff --git a/classes/partials/_manage-queued-transcripts.inc b/classes/partials/_manage-queued-transcripts.inc index f059dcf..b709e2d 100644 --- a/classes/partials/_manage-queued-transcripts.inc +++ b/classes/partials/_manage-queued-transcripts.inc @@ -1,7 +1,26 @@ - 0) && !current_user_can('approve_transcriptions') && !is_admin()) { ?> -

+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'); + } + } + } +?> + + +

diff --git a/classes/partials/admin.inc b/classes/partials/admin.inc index bb32af4..0eaa1cd 100644 --- a/classes/partials/admin.inc +++ b/classes/partials/admin.inc @@ -1,6 +1,7 @@ __('Introduction', 'what-did-they-say'), + 'how-it-works' => __('How It Works', 'what-did-they-say'), 'capabilities' => array(__('Capabilities', 'what-did-they-say'), 'edit_users'), 'default-styles' => array(__('Styles', 'what-did-they-say'), 'edit_themes'), 'change-languages' => array(__('Languages', 'what-did-they-say'), 'change_languages'), diff --git a/what-did-they-say.php b/what-did-they-say.php index f44f176..3e1dcfe 100644 --- a/what-did-they-say.php +++ b/what-did-they-say.php @@ -184,15 +184,8 @@ function the_media_transcript_queue_editor() { global $post; if (current_user_can('submit_transcriptions')) { - $queued_transcripts_for_user = false; - $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(); $transcript_options = new WDTSTranscriptOptions($post->ID);