summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspocky <spocky@ampache>2008-03-17 20:29:24 +0000
committerspocky <spocky@ampache>2008-03-17 20:29:24 +0000
commit7ddc95541d649fdf0121eafcd71a93376b16efec (patch)
treecb0fcb9f4ad2c9844a5cc08106a43900c7b7b7d9
parentb96588ebc587f18f75e3dbe0240b180371ae4ff4 (diff)
downloadampache-7ddc95541d649fdf0121eafcd71a93376b16efec.tar.gz
ampache-7ddc95541d649fdf0121eafcd71a93376b16efec.tar.bz2
ampache-7ddc95541d649fdf0121eafcd71a93376b16efec.zip
shoutbox now makes use of flip_class
rewrote show_song code and css
-rw-r--r--templates/show_shoutbox.inc.php5
-rw-r--r--templates/show_song.inc.php92
-rw-r--r--themes/classic/templates/default.css24
-rw-r--r--themes/greysme/templates/default.css23
4 files changed, 80 insertions, 64 deletions
diff --git a/templates/show_shoutbox.inc.php b/templates/show_shoutbox.inc.php
index 9d99620e..83c02f6e 100644
--- a/templates/show_shoutbox.inc.php
+++ b/templates/show_shoutbox.inc.php
@@ -22,17 +22,14 @@
<?php show_box_top(_('Shoutbox')); ?>
<div id="shoutbox">
<?php
- $rowparity="even";
foreach ($shouts as $shout_id) {
$shout = new shoutBox($shout_id);
$object = shoutBox::get_object($shout->object_type,$shout->object_id);
$object->format();
$client = new User($shout->user);
$client->format();
-
- $rowparity = ($rowparity=="even") ? "odd" : "even";
?>
-<div class="shout <?php echo($rowparity) ?>">
+<div class="shout <?php echo flip_class(); ?>">
<?php echo $shout->get_image(); ?>
<strong><?php echo ucfirst($shout->object_type); ?>:</strong> <?php echo $object->f_link; ?>
<span class="information"><?php echo $client->f_link; ?> <?php echo date("d/m H:i",$shout->date); ?></span>
diff --git a/templates/show_song.inc.php b/templates/show_song.inc.php
index d9180d0b..918bf552 100644
--- a/templates/show_song.inc.php
+++ b/templates/show_song.inc.php
@@ -19,62 +19,38 @@
*/
?>
-<?php show_box_top($song->title . ' ' . _('Details')); ?>
-<table class="tabledata" cellspacing="0" cellpadding="0">
-<tr>
- <td><?php echo _('Title'); ?></td>
- <td><?php echo scrub_out($song->title); ?></td>
-</tr>
-<tr>
- <td><?php echo _('Artist'); ?></td>
- <td><?php echo $song->f_artist_link; ?></td>
-</tr>
-<tr>
- <td><?php echo _('Album'); ?></td>
- <td><?php echo $song->f_album_link; ?> (<?php echo scrub_out($song->year); ?>)</td>
-</tr>
-<tr>
- <td><?php echo _('Genre'); ?></td>
- <td><?php echo $song->f_genre_link; ?></td>
-</tr>
-<tr>
- <td><?php echo _('Length'); ?></td>
- <td><?php echo scrub_out($song->f_time); ?></td>
-</tr>
-<tr>
- <td><?php echo _('Comment'); ?></td>
- <td><?php echo scrub_out($song->comment); ?></td>
-</tr>
-<tr>
- <td><?php echo _('Label'); ?></td>
- <td><?php echo scrub_out($song->label); ?></td>
-</tr>
-<tr>
- <td><?php echo _('Language'); ?></td>
- <td><?php echo scrub_out($song->language); ?></td>
-</tr>
-<tr>
- <td><?php echo _('Catalog Number'); ?></td>
- <td><?php echo scrub_out($song->catalog_number); ?></td>
-</tr>
-<tr>
- <td><?php echo _('Bitrate'); ?></td>
- <td><?php echo scrub_out($song->f_bitrate); ?></td>
-</tr>
-<?php if ($GLOBALS['user']->has_access('75')) { ?>
-<tr>
- <td><?php echo _('Filename'); ?></td>
- <td><?php echo scrub_out($song->file); ?> (<?php echo $song->f_size; ?>MB)</td>
-</tr>
-<?php } ?>
-<?php if ($song->update_time) { ?>
-<tr>
- <td><?php echo _('Last Updated'); ?></td>
- <td><?php echo date("d/m/Y H:i",$song->update_time); ?></td>
-</tr>
-<?php } ?>
-<tr>
- <td><?php echo _('Added'); ?></td>
- <td><?php echo date("d/m/Y H:i",$song->addition_time); ?></td>
-</table>
+<?php
+ show_box_top($song->title . ' ' . _('Details'));
+
+ $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;
+ $songprops['Length'] = scrub_out($song->f_time);
+ $songprops['Comment'] = scrub_out($song->comment);
+ $songprops['Label'] = scrub_out($song->label);
+ $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')) {
+ $songprops['Filename'] = scrub_out($song->file) . " " . $song->f_size . "MB";
+ }
+ 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))
+ {
+ $rowparity = flip_class();
+ echo "<dt class=\"".$rowparity."\">" . _($key) . "</dt><dd class=\"".$rowparity."\">" . $value . "</dd>";
+ }
+ }?>
+ </dl>
+
<?php show_box_bottom(); ?>
diff --git a/themes/classic/templates/default.css b/themes/classic/templates/default.css
index 481a19e5..c6e8f4b7 100644
--- a/themes/classic/templates/default.css
+++ b/themes/classic/templates/default.css
@@ -533,10 +533,10 @@ a.button{padding:1px 3px;}
border-bottom:1px dotted #c0c0c0;
}
.tabledata .even:hover, .tabledata .odd:hover {
- background:#99ccff;
+ background:#9cf;
}
.row-highlight:hover {
- background:#cc3333;
+ background:#c33;
}
@@ -561,6 +561,26 @@ td.cel_cover{padding:6px;}
font-size: 0.8em;
}
+/************************************************/
+/* Song details */
+/************************************************/
+dl.song_details{font-size:0.8em;}
+.song_details dt {
+ float:left;
+ clear:both;
+ width:20%;
+ min-width:20%; /*Ie bugfix*/
+ font-weight:bold;
+}
+.song_details dd {
+ float:left;
+ width:79%;
+ min-width:79%; /*Ie bugfix*/
+ margin:0 0 0.2em .3em;
+ padding-left:.2em;
+}
+dt + dd {border-bottom:1px dotted #c0c0c0;}
+dt:hover, dt:hover + dd {background:#9cf;}
/************************************************/
/* Albums of the moment */
diff --git a/themes/greysme/templates/default.css b/themes/greysme/templates/default.css
index c086e0c1..584f283b 100644
--- a/themes/greysme/templates/default.css
+++ b/themes/greysme/templates/default.css
@@ -609,6 +609,29 @@ td.cel_track {text-align:right;}
}
/************************************************/
+/* Song details */
+/************************************************/
+dl.song_details{font-size:1em;}
+.song_details dt {
+ float:left;
+ clear:both;
+ width:20%;
+ min-width:20%; /*Ie bugfix*/
+ font-weight:bold;
+}
+.song_details dd {
+ float:left;
+ width:79%;
+ min-width:79%; /*Ie bugfix*/
+ margin:0 0 0.2em .3em;
+ padding-left:.2em;
+}
+dt, dt + dd {background: url(../images/list_back.png) 0 50% repeat-x !important; background-image: none;}
+dt, dt + dd { background-color: #111 !important;}
+dt:hover, dt:hover + dd {background-color: #2b293d !important;}
+
+
+/************************************************/
/* Albums of the moment */
/************************************************/
.random_album{