summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-06-08 09:29:29 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-06-08 09:29:29 +0000
commit4b4930e286690713ba83c2f18cff48bb652e7a0a (patch)
tree75fcf2ea0badf884a1a83c7e755482ee8b0791c8 /templates
parentd5b8c6a6b70733d87d62904bcd65a8b94f477b40 (diff)
downloadampache-4b4930e286690713ba83c2f18cff48bb652e7a0a.tar.gz
ampache-4b4930e286690713ba83c2f18cff48bb652e7a0a.tar.bz2
ampache-4b4930e286690713ba83c2f18cff48bb652e7a0a.zip
make the verify remove dead songs and tweak single song view a tiny bit
Diffstat (limited to 'templates')
-rw-r--r--templates/show_song.inc.php44
1 files changed, 20 insertions, 24 deletions
diff --git a/templates/show_song.inc.php b/templates/show_song.inc.php
index 9c41d7e7..e8857f64 100644
--- a/templates/show_song.inc.php
+++ b/templates/show_song.inc.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2007 Ampache.org
+ Copyright (c) Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
@@ -18,11 +18,24 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+$rowparity = flip_class();
+$icon = $song->enabled ? 'disable' : 'enable';
?>
+<?php show_box_top($song->title . ' ' . _('Details')); ?>
+<dl class="song_details">
+<dt class="<?php echo $rowparity; ?>"><?php echo _('Action'); ?></dt>
+ <dd class"<?php echo $rowparity; ?>">
+ <?php echo Ajax::button('?action=basket&type=song&id=' . $song->id,'add',_('Add'),'add_song_' . $song->id); ?>
+ <?php if (Access::check_function('download')) { ?>
+ <a href="<?php echo $song->get_url(); ?>"><?php echo get_user_icon('link'); ?></a>
+ <a href="<?php echo Config::get('web_path'); ?>/stream.php?action=download&amp;song_id=<?php echo $song->id; ?>"><?php echo get_user_icon('download'); ?></a>
+ <?php } ?>
+ <?php if (Access::check('interface','75')) { ?>
+ <?php echo Ajax::button('?page=song&action=flip_state&song_id=' . $song->id,$icon,_(ucfirst($icon)),'flip_song_' . $song->id); ?>
+ <?php } ?>
+ </dd>
<?php
- show_box_top($song->title . ' ' . _('Details'));
-
- $songprops['Title'] = scrub_out($song->title) . Ajax::button('?action=basket&type=song&id=' . $song->id,'add',_('Add'),'add_' . $song->id);
+ $songprops['Title'] = scrub_out($song->title);
$songprops['Artist'] = $song->f_artist_link;
$songprops['Album'] = $song->f_album_link . " (" . scrub_out($song->year). ")";
$songprops['Genre'] = $song->f_genre_link;
@@ -32,20 +45,14 @@
$songprops['Language']= scrub_out($song->language);
$songprops['Catalog Number'] = scrub_out($song->catalog_number);
$songprops['Bitrate'] = scrub_out($song->f_bitrate);
- if ($GLOBALS['user']->has_access('75')) {
+ if (Access::check('interface','75')) {
$songprops['Filename'] = scrub_out($song->file) . " " . $song->f_size . "MB";
}
- if (Config::get('download')) {
- $songprops['Filename'] = "<a href=\"" . Config::get('web_path') . "/stream.php?action=download&amp;song_id=" . $song->id . "\">" . $songprops['Filename'] . "</a>";
- }
if ($song->update_time) {
$songprops['Last Updated'] = date("d/m/Y H:i",$song->update_time);
}
$songprops['Added'] = date("d/m/Y H:i",$song->addition_time);
- ?>
-
- <dl class="song_details">
- <?php
+
foreach ($songprops as $key => $value)
{
if(trim($value))
@@ -54,16 +61,5 @@
echo "<dt class=\"".$rowparity."\">" . _($key) . "</dt><dd class=\"".$rowparity."\">" . $value . "</dd>";
}
}
- echo '<dt> Tags </dt><dd>';
- $tags = Tag::get_object_tags('song', array($song->id));
- foreach($tags as $i)
- echo $i['name'] . ' ';
- ?><form type=POST action=coin>
- <?php
- echo Ajax::text('?page=tag&action=add&type=song&id=' . $song->id . "&val='+document.getElementById('tagname').value+'", _("Add tag"), 'tag_artist');
- ?>
- <input type="text" size="10" maxlength="10" id="tagname"></input></form>
- </dd>
- </dl>
-
+?>
<?php show_box_bottom(); ?>