librefm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Librefm-commits] [1141] album picture on album page


From: Clint Adams
Subject: [Librefm-commits] [1141] album picture on album page
Date: Sat, 02 May 2009 23:28:36 +0000

Revision: 1141
          http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1141
Author:   clint
Date:     2009-05-02 23:28:36 +0000 (Sat, 02 May 2009)
Log Message:
-----------
album picture on album page

Modified Paths:
--------------
    trunk/nixtape/album.php
    trunk/nixtape/data/Track.php
    trunk/nixtape/themes/librefm/templates/album.tpl

Modified: trunk/nixtape/album.php
===================================================================
--- trunk/nixtape/album.php     2009-05-02 21:37:54 UTC (rev 1140)
+++ trunk/nixtape/album.php     2009-05-02 23:28:36 UTC (rev 1141)
@@ -29,6 +29,7 @@
 
 $smarty->assign("name", $album->name);
 $smarty->assign("artist", $artist);
+$smarty->assign("album", $album);
 $aAlbumTracks = $album->getTracks();
 if (!PEAR::isError($aAlbumTracks )) {
        $smarty->assign("tracks", $aAlbumTracks);

Modified: trunk/nixtape/data/Track.php
===================================================================
--- trunk/nixtape/data/Track.php        2009-05-02 21:37:54 UTC (rev 1140)
+++ trunk/nixtape/data/Track.php        2009-05-02 23:28:36 UTC (rev 1141)
@@ -135,6 +135,10 @@
                return new Artist($this->artist_name);
        }
 
+       function getAlbum() {
+               return new Album($this->album_name, $this->artist_name);
+       }
+
        function getURL() {
                return Server::getTrackURL($this->artist_name, 
$this->album_name, $this->name);
        }

Modified: trunk/nixtape/themes/librefm/templates/album.tpl
===================================================================
--- trunk/nixtape/themes/librefm/templates/album.tpl    2009-05-02 21:37:54 UTC 
(rev 1140)
+++ trunk/nixtape/themes/librefm/templates/album.tpl    2009-05-02 23:28:36 UTC 
(rev 1141)
@@ -2,6 +2,13 @@
 
 <h2><a href="{$artist->getURL()}">{$artist->name}</a> - {$name}</h2>
 
+<a rel="foaf:page" href="{$album->getURL()}">
+<span{if $album->image != false} about="{$album->id}" 
rel="foaf:depiction"{/if}>
+<img class="album photo" {if $album->image == false} 
src="{$base_url}/i/qm160.png"{else}src="{$album->image}"{/if}
+ 
alt="{$album->name|escape:'html':'UTF-8'}"title="{$album->name|escape:'html':'UTF-8'}"
 width="160" />
+</span>
+</a>
+
 {include file='player.tpl'}
 
 <script type="text/javascript">





reply via email to

[Prev in Thread] Current Thread [Next in Thread]