mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-05 19:41:55 +02:00
Add artist information tabs (fix #126)
This commit is contained in:
parent
a45a1479ad
commit
24895f24f7
6 changed files with 90 additions and 13 deletions
|
@ -1131,7 +1131,6 @@ class User extends database_object
|
|||
$avatar['url_mini'] = $avatar['url'];
|
||||
$avatar['url'] .= '&thumb=3';
|
||||
$avatar['url_mini'] .= '&thumb=5';
|
||||
$avatar['data'] = $this->avatar;
|
||||
} else {
|
||||
foreach (Plugin::get_plugins('get_avatar_url') as $plugin_name) {
|
||||
$plugin = new Plugin($plugin_name);
|
||||
|
|
|
@ -19,6 +19,16 @@
|
|||
//
|
||||
$(document).ready(function () {
|
||||
$('.default_hidden').hide();
|
||||
|
||||
$("#tabs li").click(function() {
|
||||
$("#tabs li").removeClass('tab_active');
|
||||
$(this).addClass("tab_active");
|
||||
$(".tab_content").hide();
|
||||
var selected_tab = $(this).find("a").attr("href");
|
||||
$(selected_tab).fadeIn();
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
$(function() {
|
||||
|
|
|
@ -53,3 +53,52 @@ a.tag_size1, a.tag_size2, a.tag_size3, a.tag_size4 { text-decoration: none; }
|
|||
.item_off {
|
||||
color: #FF0000;
|
||||
}
|
||||
|
||||
#tabs_wrapper {
|
||||
width: auto;
|
||||
}
|
||||
#tabs_container {
|
||||
border-bottom: 1px solid #3C3C3C;
|
||||
}
|
||||
#tabs {
|
||||
list-style: none;
|
||||
padding: 5px 0 4px 0;
|
||||
margin: 0 0 0 10px;
|
||||
font: 0.75em arial;
|
||||
}
|
||||
#tabs li {
|
||||
display: inline;
|
||||
}
|
||||
#tabs li a {
|
||||
padding: 4px 6px;
|
||||
text-decoration: none;
|
||||
background-color: #5D5C5C;
|
||||
border-bottom: none;
|
||||
outline: none;
|
||||
border-radius: 5px 5px 0 0;
|
||||
-moz-border-radius: 5px 5px 0 0;
|
||||
-webkit-border-top-left-radius: 5px;
|
||||
-webkit-border-top-right-radius: 5px;
|
||||
}
|
||||
#tabs li a:hover {
|
||||
background-color: #3C3C3C;
|
||||
padding: 4px 6px;
|
||||
}
|
||||
#tabs li.tab_active a {
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
padding: 4px 6px 5px 6px;
|
||||
border-bottom: none;
|
||||
}
|
||||
#tabs li.tab_active a:hover {
|
||||
background-color: #5D5C5C;
|
||||
padding: 4px 6px 5px 6px;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
#tabs_content {
|
||||
padding: 10px;
|
||||
width: auto;
|
||||
}
|
||||
.tab_content {
|
||||
display: none;
|
||||
}
|
|
@ -114,21 +114,40 @@ if (AmpConfig::get('show_played_times')) {
|
|||
</ul>
|
||||
</div>
|
||||
<?php UI::show_box_bottom(); ?>
|
||||
<div class="tabs_wrapper">
|
||||
<div id="tabs_container">
|
||||
<ul id="tabs">
|
||||
<li class="tab_active"><a href="#albums"><?php echo T_('Albums'); ?></a></li>
|
||||
<?php if (AmpConfig::get('wanted')) { ?>
|
||||
<li><a id="missing_albums_link" href="#missing_albums"><?php echo T_('Missing Albums'); ?></a></li>
|
||||
<?php if (AmpConfig::get('show_similar')) { ?>
|
||||
<?php } ?>
|
||||
<li><a id="similar_artist_link" href="#similar_artist"><?php echo T_('Similar Artists'); ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="tabs_content">
|
||||
<div id="albums" class="tab_content" style="display: block;">
|
||||
<?php
|
||||
$browse->show_objects($object_ids);
|
||||
$browse->store();
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
if (AmpConfig::get('wanted')) {
|
||||
echo Ajax::observe('window','load', Ajax::action('?page=index&action=wanted_missing_albums&artist='.$artist->id, 'missing_albums'));
|
||||
echo Ajax::observe('missing_albums_link','click', Ajax::action('?page=index&action=wanted_missing_albums&artist='.$artist->id, 'missing_albums'));
|
||||
?>
|
||||
<div id="missing_albums"></div>
|
||||
<div id="missing_albums" class="tab_content">
|
||||
<?php UI::show_box_top(T_('Missing Albums'), 'info-box'); echo T_('Loading...'); UI::show_box_bottom(); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if (AmpConfig::get('show_similar')) {
|
||||
echo Ajax::observe('window','load', Ajax::action('?page=index&action=similar_artist&artist='.$artist->id, 'similar_artist'));
|
||||
echo Ajax::observe('similar_artist_link','click', Ajax::action('?page=index&action=similar_artist&artist='.$artist->id, 'similar_artist'));
|
||||
?>
|
||||
<div id="similar_artist">
|
||||
<div id="similar_artist" class="tab_content">
|
||||
<?php UI::show_box_top(T_('Similar Artists'), 'info-box'); echo T_('Loading...'); UI::show_box_bottom(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue