Author: tkoomzaaskz
Date: 2010-01-19 10:11:15 +0100 (Tue, 19 Jan 2010)
New Revision: 26864

Added:
   plugins/tdAudioPlugin/trunk/lib/helper/
   plugins/tdAudioPlugin/trunk/lib/helper/AudioHelper.php
   plugins/tdAudioPlugin/trunk/web/css/
   plugins/tdAudioPlugin/trunk/web/css/td_audio.cdd
Modified:
   plugins/tdAudioPlugin/trunk/modules/tdSampleAudio/actions/actions.class.php
   plugins/tdAudioPlugin/trunk/modules/tdSampleAudio/templates/indexSuccess.php
   plugins/tdAudioPlugin/trunk/modules/tdSampleAudio/templates/showSuccess.php
   plugins/tdAudioPlugin/trunk/package.xml
Log:
[td][audio] modifications before initial release

Added: plugins/tdAudioPlugin/trunk/lib/helper/AudioHelper.php
===================================================================
--- plugins/tdAudioPlugin/trunk/lib/helper/AudioHelper.php                      
        (rev 0)
+++ plugins/tdAudioPlugin/trunk/lib/helper/AudioHelper.php      2010-01-19 
09:11:15 UTC (rev 26864)
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * Audio helper.
+ *
+ * @package    tdAudioPlugin
+ * @author     Tomasz Ducin <[email protected]>
+ */
+
+/**
+ * Returns the path to a audio asset.
+ *
+ * @param string $source   asset name
+ * @param bool   $absolute return absolute path ?
+ *
+ * @return string file path to the audio file
+ */
+function audio_path($source, $absolute = false)
+{
+  return _compute_public_path($source, sfConfig::get('sf_web_audio_dir_name', 
'tdAudioPlugin'), 'mp3', $absolute);
+}
+
+?>
\ No newline at end of file

Modified: 
plugins/tdAudioPlugin/trunk/modules/tdSampleAudio/actions/actions.class.php
===================================================================
--- plugins/tdAudioPlugin/trunk/modules/tdSampleAudio/actions/actions.class.php 
2010-01-19 06:57:28 UTC (rev 26863)
+++ plugins/tdAudioPlugin/trunk/modules/tdSampleAudio/actions/actions.class.php 
2010-01-19 09:11:15 UTC (rev 26864)
@@ -17,6 +17,9 @@
 
   public function executeShow(sfWebRequest $request)
   {
+    // ading default td_video layout
+    $this->getResponse()->addStylesheet('/tdAudioPlugin/css/td_audio');
+        
     $results = 
Doctrine::getTable('tdTrackAlbum')->getActiveAlbumByIdQuery($request->getParameter('id'))->fetchArray();
     $this->audio = $results[0];
 

Modified: 
plugins/tdAudioPlugin/trunk/modules/tdSampleAudio/templates/indexSuccess.php
===================================================================
--- 
plugins/tdAudioPlugin/trunk/modules/tdSampleAudio/templates/indexSuccess.php    
    2010-01-19 06:57:28 UTC (rev 26863)
+++ 
plugins/tdAudioPlugin/trunk/modules/tdSampleAudio/templates/indexSuccess.php    
    2010-01-19 09:11:15 UTC (rev 26864)
@@ -1,18 +1,29 @@
-<?php use_helper('I18N') ?>
+<?php use_helper('I18N', 'Date') ?>
 
 <h1><?php echo __('Audio album list', array(), 'td') ?></h1>
 
 <?php if ($audios): ?>
-<ul>
+<ul id="audio">
   <?php foreach ($audios as $audio): ?>
     <li>
-      <div>
-        <span class="audio_name"><?php echo $audio['name'] ?></span>
-        <span class="audio_author"><?php echo $audio['author'] ?></span>
-        <span class="audio_released_at"><?php echo $audio['released_at'] 
?></span>
-        <span class="audio_cover"><?php echo image_tag($audio['file_cover']) 
?></span>
-        <span class="audio_link"><?php echo link_to(__('play it', array(), 
'td'), '@td_sample_track_album_show?id='.$audio['id']) ?></span>
+      <div class="cover">
+        <?php echo image_tag($audio['file_cover']) ?>
       </div>
+      <div class="name">
+        <span class="title"><?php echo __('Name', array(), 'td') ?>: </span>
+        <span class="value"><?php echo $audio['name'] ?></span>
+      </div>
+      <div class="author">
+        <span class="title"><?php echo __('Author', array(), 'td') ?>: </span>
+        <span class="value"><?php echo $audio['author'] ?></span>
+      </div>
+      <div class="released_at">
+        <span class="title"><?php echo __('Released at', array(), 'td') ?>: 
</span>
+        <span class="value"><?php echo (false !== 
strtotime($video['released_at']) ? format_date($video['released_at'], "f") : 
'&nbsp;') ?></span>
+      </div>
+      <div class="link">
+        <span><?php echo link_to(__('play it', array(), 'td'), 
'@td_sample_track_album_show?file='.$audio['id']) ?></span>
+      </div>
     </li>
   <?php endforeach; ?>
 </ul>

Modified: 
plugins/tdAudioPlugin/trunk/modules/tdSampleAudio/templates/showSuccess.php
===================================================================
--- plugins/tdAudioPlugin/trunk/modules/tdSampleAudio/templates/showSuccess.php 
2010-01-19 06:57:28 UTC (rev 26863)
+++ plugins/tdAudioPlugin/trunk/modules/tdSampleAudio/templates/showSuccess.php 
2010-01-19 09:11:15 UTC (rev 26864)
@@ -2,7 +2,7 @@
 
 <h1>Album</h1>
 
-<?php use_helper('Video', 'Date') ?>
+<?php use_helper('Audio', 'Date') ?>
 
 <div id="flashPlayer">
   This text will be replaced by the flash music player.

Modified: plugins/tdAudioPlugin/trunk/package.xml
===================================================================
--- plugins/tdAudioPlugin/trunk/package.xml     2010-01-19 06:57:28 UTC (rev 
26863)
+++ plugins/tdAudioPlugin/trunk/package.xml     2010-01-19 09:11:15 UTC (rev 
26864)
@@ -51,6 +51,9 @@
            <file name="PlugintdGuestbookForm.class.php" role="data" />
          </dir>
        </dir>
+       <dir name="helper">
+         <file name="AudioHelper.php" role="data" />
+       </dir>
        <dir name="model">
          <dir name="doctrine">
            <file name="PlugintdGuestbook.class.php" role="data" />
@@ -86,6 +89,43 @@
        </dir>
      </dir>
 
+     <dir name="web">
+       <dir name="css">
+         <file name="td_audio.css" role="data" />
+       </dir>
+       <dir name="images">
+         <file name="cartoon.png" role="data" />
+         <file name="movie.png" role="data" />
+       </dir>
+       <dir name="js">
+        <file name="flowplayer-3.1.4.min.js" role="data" />
+       </dir>
+       <dir name="mp3">
+        <file name="aladdin_goodbye.mp3" role="data" />
+        <file name="beback.mp3" role="data" />
+        <file name="big_trouble.mp3" role="data" />
+        <file name="bugs_mail.mp3" role="data" />
+        <file name="cant_takeit.mp3" role="data" />
+        <file name="concentration.mp3" role="data" />
+        <file name="correctamundo.mp3" role="data" />
+        <file name="doh.mp3" role="data" />
+        <file name="drink_babe.mp3" role="data" />
+        <file name="end_of_story.mp3" role="data" />
+        <file name="gameover.mp3" role="data" />
+        <file name="going_to_do.mp3" role="data" />
+        <file name="good_morning_vietnam.mp3" role="data" />
+        <file name="hard_time.mp3" role="data" />
+        <file name="hello_butthead.mp3" role="data" />
+        <file name="mail_here.mp3" role="data" />
+        <file name="example_playlist.xml" role="data" />
+       </dir>
+       <dir name="swf">
+         <file name="playerMultipleList.swf" role="data" />
+         <file name="playerMultipleList_old.swf" role="data" />
+       </dir>
+     </dir>
+
+     <file name="PlayerLicense.doc" role="data" />
      <file name="LICENSE" role="data" />
      <file name="README" role="data" />
    </dir>
@@ -138,4 +178,4 @@
 
   </changelog>
 
-</package>
\ No newline at end of file
+</package>

Added: plugins/tdAudioPlugin/trunk/web/css/td_audio.cdd
===================================================================
--- plugins/tdAudioPlugin/trunk/web/css/td_audio.cdd                            
(rev 0)
+++ plugins/tdAudioPlugin/trunk/web/css/td_audio.cdd    2010-01-19 09:11:15 UTC 
(rev 26864)
@@ -0,0 +1,30 @@
+#audio {
+    list-style-type: none;
+}
+
+#audio li {
+    border: 1px solid #bbb;
+    margin: 10px;
+    padding: 5px;
+    background-color: #eee;
+}
+
+#audio div {
+    margin: 2px;
+}
+
+#audio span.title {
+    font-variant: small-caps;
+}
+
+#audio div.link a {
+    font-variant: small-caps;
+}
+
+#audio div {
+    text-align: justify;
+}
+
+#audio div.description {
+    text-indent: 20px;
+}

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.


Reply via email to