Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

[mb-commits] r8412 - in mb_server/branches/RELEASE_20060712-BRANCH: cgi-bin: msg#00109

audio.musicbrainz.cvs

Subject: [mb-commits] r8412 - in mb_server/branches/RELEASE_20060712-BRANCH: cgi-bin htdocs/comp/release htdocs/css htdocs/user

Author: keschte
Date: 2006-08-13 17:17:21 +0000 (Sun, 13 Aug 2006)
New Revision: 8412

Modified:
mb_server/branches/RELEASE_20060712-BRANCH/cgi-bin/UserPreference.pm
mb_server/branches/RELEASE_20060712-BRANCH/htdocs/comp/release/release_begin
mb_server/branches/RELEASE_20060712-BRANCH/htdocs/css/main.css
mb_server/branches/RELEASE_20060712-BRANCH/htdocs/user/preferences.html
Log:
introduced 2 new user preferences which allow to enable the relationships bar
again, and added an annotation edit bar using the same principle. both are off
per default, to avoid cluttering the release box too much. Those who like to
have all the options available, will be able to turn them on. (fixes #1936)


Modified: mb_server/branches/RELEASE_20060712-BRANCH/cgi-bin/UserPreference.pm
===================================================================
--- mb_server/branches/RELEASE_20060712-BRANCH/cgi-bin/UserPreference.pm
2006-08-13 16:33:35 UTC (rev 8411)
+++ mb_server/branches/RELEASE_20060712-BRANCH/cgi-bin/UserPreference.pm
2006-08-13 17:17:21 UTC (rev 8412)
@@ -257,6 +257,8 @@
addpref('navbar_mod_show_select_page', 0, \&check_bool);
addpref('nosidebar', 0, \&check_bool);
addpref('no_sidebar_panels', 0, \&check_bool);
+addpref('release_show_annotationlinks', 0, \&check_bool);
+addpref('release_show_relationshipslinks', 0, \&check_bool);
addpref('releases_show_compact', 50, sub { check_int(1,100,@_) });
addpref('remove_recent_link_on_add', 1, \&check_bool);
addpref('reveal_address_when_mailing', 0, \&check_bool);

Modified:
mb_server/branches/RELEASE_20060712-BRANCH/htdocs/comp/release/release_begin
===================================================================
---
mb_server/branches/RELEASE_20060712-BRANCH/htdocs/comp/release/release_begin
2006-08-13 16:33:35 UTC (rev 8411)
+++
mb_server/branches/RELEASE_20060712-BRANCH/htdocs/comp/release/release_begin
2006-08-13 17:17:21 UTC (rev 8412)
@@ -58,6 +58,7 @@
my $mbid = $release->GetMBId;
my $name = $release->GetName;
my $nonalbum = $release->IsNonAlbumTracks;
+ my $exists = MusicBrainz::IsNonNegInteger($release->GetId) &&
$release->GetId;

</%perl>

@@ -82,7 +83,7 @@
<td class="title">

% # if the release has a rowid, show name as link, else text-only.
-% if (MusicBrainz::IsNonNegInteger($release->GetId) && $release->GetId)
+% if ($exists)
% {
<a href="/release/<% $mbid %>.html"
id="link::<% $releaseid %>" title="<% $name %>"><% $name %></a>

@@ -130,7 +131,7 @@
$m->out(qq!<td class="links">!);
$m->out(qq!<table class="inner">!);

- # First row: non-editing links
+ # non-editing links
if ($showlinks)
{
$m->out(qq!<tr><td class="info">!);
@@ -147,7 +148,47 @@
$m->out(qq! ] </td></tr>!);
}

- # Second row: editing links
+
+ my $editlinkprereq = ($session{uid} and $showeditlinks and
$exists);
+
+ # annotation links
+ if ($editlinkprereq and
UserPreference::get("release_show_annotationlinks"))
+ {
+ my $mb = $m->comp("/comp/dblogin");
+
+ # load the annotation from the database
+ my $annotation =
MusicBrainz::Server::Annotation->new($mb->{DBH});
+ $annotation->SetAlbum($releaseid);
+ $annotation->GetLatestAnnotation() or $annotation =
undef;
+
+ $m->out(qq!<tr><td class="editannotation">!);
+ $m->out(qq!Annotation: [ !);
+
+ if ($annotation)
+ {
+ $m->out(sprintf qq!<a
href="/edit/annotation/album/history.html?albumid=%d&amp;expand_all=1">Show
history</a> | !,
+
$release->GetId);
+ $m->comp("/edit/annotation/edit-link",
annotation => $annotation);
+ }
+ else
+ {
+ $m->out("This release does not yet have an
annotation. ");
+ $m->out(sprintf qq!<a
href="/edit/annotation/album/edit.html?albumid=%d">Add an annotation
&raquo;</a>!,
+
$release->GetId);
+ }
+ $m->out(qq! ]</td></tr>!);
+ }
+
+ # relationship links
+ if ($editlinkprereq and
UserPreference::get("release_show_relationshipslinks") and !$nonalbum)
+ {
+ $m->out(qq!<tr><td class="editrelationships">!);
+ $m->out(qq!Relationships: !);
+ $m->comp("/comp/ar/ShowARLinks", id => $releaseid, type
=> "album", name => $release->GetName, short => 1);
+ $m->out(qq!</td></tr>!);
+ }
+
+ # editing links
if ($showeditlinks)
{
$m->out(qq!<tr><td class="edit"> Edit: [ !);
@@ -253,7 +294,8 @@
$asin);
$m->out(qq!</div></td>!);
}
- $m->out(qq!</tr></table>!);
+ $m->out(qq!</tr>!);
+ $m->out(qq!</table>!);
}

</%perl>

Modified: mb_server/branches/RELEASE_20060712-BRANCH/htdocs/css/main.css
===================================================================
--- mb_server/branches/RELEASE_20060712-BRANCH/htdocs/css/main.css
2006-08-13 16:33:35 UTC (rev 8411)
+++ mb_server/branches/RELEASE_20060712-BRANCH/htdocs/css/main.css
2006-08-13 17:17:21 UTC (rev 8412)
@@ -430,12 +430,24 @@
font-size: 9px;
}

-/* info link row, lightblue */
+/* info links, lightblue */
table.releaselinks td.info {
background-color: #f0efff; color: #000;
}

-/* editing link row, lightred */
+/* annotation links, lightblue */
+table.releaselinks td.editannotation {
+ background-color: #f0efff; color: #000;
+ border-top: 1px solid #000;
+}
+
+/* relationships links, lightgray */
+table.releaselinks td.editrelationships {
+ background-color: #efe8e2; color: #000;
+ border-top: 1px solid #000;
+}
+
+/* editing links, lightred */
table.releaselinks td.edit {
background-color: #ffecd6; color: #000;
border-top: 1px solid #000;

Modified:
mb_server/branches/RELEASE_20060712-BRANCH/htdocs/user/preferences.html
===================================================================
--- mb_server/branches/RELEASE_20060712-BRANCH/htdocs/user/preferences.html
2006-08-13 16:33:35 UTC (rev 8411)
+++ mb_server/branches/RELEASE_20060712-BRANCH/htdocs/user/preferences.html
2006-08-13 17:17:21 UTC (rev 8412)
@@ -290,7 +290,7 @@

<& /comp/tableend &>

- <& /comp/tablebegin, title => "Artist page (List of
releases)" &>
+ <& /comp/tablebegin, title => "Show artist" &>

<div>
<label for="pref_releases_show_compact">
@@ -304,16 +304,33 @@

<& /comp/tableend &>

- <& /comp/tablebegin, title => "Amazon.com cover art" &>

+ <& /comp/tablebegin, title => "Show release" &>
+
<div>
+ <label
for="pref_release_show_relationshipslinks">
+ <input type="checkbox"
name="release_show_relationshipslinks" id="pref_release_show_relationshipslinks"
+%
$m->out(UserPreference::get('release_show_relationshipslinks') ? '
checked="checked" ' : "");
+ />
+ Show the add/edit relationships links
in the release header.
+ </div>
+
+ <div>
+ <label
for="pref_release_show_annotationlinks">
+ <input type="checkbox"
name="release_show_annotationlinks" id="pref_release_show_annotationlinks"
+%
$m->out(UserPreference::get('release_show_annotationlinks') ? '
checked="checked" ' : "");
+ />
+ Show the add/edit annotation links in
the release header.
+ </div>
+
+ <div>
<label
for="pref_show_amazon_coverart"><input type="checkbox"
name="show_amazon_coverart" id="pref_show_amazon_coverart"
%
$m->out(UserPreference::get('show_amazon_coverart') ? ' checked="checked" ' :
"");
/>
Show Amazon.com cover art and buy
links.</label>
</div>

- <div>
+ <div style="margin-left: 25px">
Your preferred Amazon Store:
<select name="use_amazon_store">
<& /comp/options, [
UserPreference::allowed_amazon_stores() ],


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
ide.eclipse.wtp...    bug-tracking.ro...    xfree86.cvs/200...    lisp.wxcl.devel...    file-systems.ar...    kde.devel.kwrit...    jakarta.jetspee...    qnx.openqnx.dev...    drivers.openib/...    ports.xbox.deve...    gis.gdal.devel/...    netbsd.ports.ma...    ubuntu.marketin...    systemtap/2005-...    web.omniweb/200...    mail.qmail.ldap...    hardware.soekri...    os.netbsd.devel...    audio.madman.ge...    tv.freeguide-tv...    cluster.openmos...    education.ezpro...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation