diff --git a/classes/WhatDidTheySayAdmin.inc b/classes/WhatDidTheySayAdmin.inc
index fe20f06..4146b3c 100644
--- a/classes/WhatDidTheySayAdmin.inc
+++ b/classes/WhatDidTheySayAdmin.inc
@@ -346,6 +346,10 @@ class WhatDidTheySayAdmin {
}
}
+ if (strpos($pagenow, 'edit') === 0) {
+ wp_enqueue_style('wdts-admin', plugin_dir_url(dirname(__FILE__)) . 'css/wdts-admin.css');
+ }
+
wp_enqueue_script('scriptaculous-effects');
add_action('wp_head', array(&$this, 'include_editor_javascript'));
@@ -407,7 +411,7 @@ class WhatDidTheySayAdmin {
if ($index === false) { $index = count($keys); }
array_splice($keys, $index, 0, array('transcripts'));
- array_splice($values, $index, 0, __('Trans'));
+ array_splice($values, $index, 0, __(' '));
return array_combine($keys, $values);
}
@@ -417,10 +421,19 @@ class WhatDidTheySayAdmin {
*/
function manage_posts_custom_column($name, $post_id) {
if ($name === "transcripts") {
- $queued_transcript_object = new WDTSQueuedTranscript($post_id);
+ foreach (array('Queued' => __('Queued', 'what-did-they-say'), 'Approved' => __('Approved', 'what-did-they-say')) as $type => $label) {
+ $class = "WDTS${type}Transcript";
+ $transcript_object = new $class($post_id);
+ $style = strtolower($type);
- if (($queued_count = $queued_transcript_object->count()) > 0) {
- printf(__('%s queued', 'what-did-they-say'), $queued_count);
+ $count = 0;
+ foreach ($transcript_object->get_transcripts() as $language => $transcript_info) {
+ if (!empty($transcript_info['transcript'])) { $count++; }
+ }
+
+ if ($count > 0) {
+ echo "" . $count . ' ';
+ }
}
}
}
diff --git a/css/wdts-admin.css b/css/wdts-admin.css
index 469a94d..59ec8cf 100644
--- a/css/wdts-admin.css
+++ b/css/wdts-admin.css
@@ -105,6 +105,24 @@ h3.wdts {
padding: 0.75em;
}
+.widefat .column-transcripts {
+ padding-top: 8px;
+}
+
+.wdts-posts-queued-icon, .wdts-posts-approved-icon {
+ background: url(../graphics/transcript-icon-background.png) 1px 1px no-repeat;
+ font-size: 9px;
+ padding: 2px 6px;
+ color: white
+}
+.wdts-posts-queued-icon {
+ background-color: #c99
+}
+
+.wdts-posts-approved-icon {
+ background-color: #aaa
+}
+
body {
overflow-x: hidden
}
\ No newline at end of file
diff --git a/graphics/transcript-icon-background.png b/graphics/transcript-icon-background.png
new file mode 100644
index 0000000..e3e33d8
Binary files /dev/null and b/graphics/transcript-icon-background.png differ