4 Oct 2010 16:14
[mb-commits] branch, next, updated. Merge branch 'master' into next Display an overview on a tags landing page
MusicBrainz Git Server <noreply <at> musicbrainz.org>
2010-10-04 14:14:23 GMT
2010-10-04 14:14:23 GMT
The branch, next has been updated
via
http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=1854b53e8e4479fc67b4012101c9c142132ba908 (commit)
via
http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=7bfbd57cbc2e0afcaea05b129635744f4d4157a0 (commit)
from
http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=c703bceb53126bd7d2ac25dd940807c87ab6d378 (commit)
Summary of changes:
lib/MusicBrainz/Server/Controller/Tag.pm | 14 ++++++++++++--
root/tag/index.tt | 18 +++++++++++++++++-
2 files changed, 29 insertions(+), 3 deletions(-)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1854b53e8e4479fc67b4012101c9c142132ba908
Merge: c703bce 7bfbd57
Author: Oliver Charles <oliver.g.charles <at> googlemail.com>
Date: Mon Oct 4 15:14:19 2010 +0100
Merge branch 'master' into next
commit 7bfbd57cbc2e0afcaea05b129635744f4d4157a0
Author: Oliver Charles <oliver.g.charles <at> googlemail.com>
Date: Mon Oct 4 15:13:55 2010 +0100
Display an overview on a tags landing page
diff --git a/lib/MusicBrainz/Server/Controller/Tag.pm b/lib/MusicBrainz/Server/Controller/Tag.pm
index 7e23f66..2ae4bd6 100644
--- a/lib/MusicBrainz/Server/Controller/Tag.pm
+++ b/lib/MusicBrainz/Server/Controller/Tag.pm
<at> <at> -3,6 +3,8 <at> <at> use Moose;
BEGIN { extends 'MusicBrainz::Server::Controller' }
+use MusicBrainz::Server::Data::Utils qw( type_to_model );
+
__PACKAGE__->config( entity_name => 'tag' );
sub base : Chained('/') PathPart('tag') CaptureArgs(0) { }
<at> <at> -33,8 +35,16 <at> <at> sub cloud : Chained('base') PathPart('') Args(0)
sub show : Chained('load') PathPart('')
{
my ($self, $c) = <at> _;
-
- $c->stash->{template} = 'tag/index.tt';
+ my $tag = $c->stash->{tag};
+ $c->stash(
+ template => 'tag/index.tt',
+ map {
+ my ($entities) = $c->model(type_to_model($_))->tags->find_entities(
+ $tag->id, 10);
+
+ $_ . '_tags' => $entities
+ } qw( artist label recording release_group work )
+ );
}
sub artist : Chained('load')
diff --git a/root/tag/index.tt b/root/tag/index.tt
index 3532fbe..872974a 100644
--- a/root/tag/index.tt
+++ b/root/tag/index.tt
<at> <at> -1,4 +1,20 <at> <at>
-[%- WRAPPER 'tag/layout.tt' page='index' -%]
+[%- WRAPPER 'tag/layout.tt' page='index' full_width=1 -%]
+[% FOR section=[
+ [l('Artists'), artist_tags],
+ [l('Labels'), label_tags],
+ [l('Recordings'), recording_tags],
+ [l('Release Groups'), release_group_tags],
+ [l('Works'), work_tags],
+] %]
+ [% IF section.1.size %]
+ <h2>[% section.0 %]</h2>
+ <ul>
+ [% FOR entity=section.1 %]
+ <li>[% link_entity(entity.entity) %]</li>
+ [% END %]
+ </ul>
+ [% END %]
+[% END %]
[%- END -%]
-----------------------------------------------------------------------
hooks/post-receive
--
--
mb_server
RSS Feed