[mb-commits] r9834 - in mb_server/branches/TemplateToolkit/catalyst: lib/musicbrainz/Controller root/layout root/static
root at musicbrainz.org
root at musicbrainz.org
Mon May 12 23:41:43 UTC 2008
Author: acid2
Date: 2008-05-12 23:41:43 +0000 (Mon, 12 May 2008)
New Revision: 9834
Modified:
mb_server/branches/TemplateToolkit/catalyst/lib/musicbrainz/Controller/Root.pm
mb_server/branches/TemplateToolkit/catalyst/root/layout/footer-bar.tt
mb_server/branches/TemplateToolkit/catalyst/root/static/main.css
Log:
Support the footer bar. Also first bit of Perl that is using 'use lib' to specify the location of cgi-bin. Please let me know if there is a better way (will discuss on irc)
Modified: mb_server/branches/TemplateToolkit/catalyst/lib/musicbrainz/Controller/Root.pm
===================================================================
--- mb_server/branches/TemplateToolkit/catalyst/lib/musicbrainz/Controller/Root.pm 2008-05-12 22:05:32 UTC (rev 9833)
+++ mb_server/branches/TemplateToolkit/catalyst/lib/musicbrainz/Controller/Root.pm 2008-05-12 23:41:43 UTC (rev 9834)
@@ -4,6 +4,11 @@
use warnings;
use parent 'Catalyst::Controller';
+# We need this to specify the MusicBrainz perl codebase
+use lib "/home/musicbrainz/blah/TemplateToolkit/cgi-bin";
+
+use DBDefs;
+
#
# Sets the actions in this controller to be registered with no prefix
# so they function identically to actions created in MyApp.pm
@@ -42,12 +47,19 @@
=head2 end
-Attempt to render a view, if needed.
+Attempt to render a view, if needed. This will also set up some global variables in the
+context containing important information about the server used on the majority of templates.
=cut
-sub end : ActionClass('RenderView') {}
+sub end : ActionClass('RenderView') {
+ my ($self, $c) = @_;
+ $c->stash->{server_details} = {
+ version => &DBDefs::VERSION,
+ };
+}
+
=head1 AUTHOR
Catalyst developer
Modified: mb_server/branches/TemplateToolkit/catalyst/root/layout/footer-bar.tt
===================================================================
--- mb_server/branches/TemplateToolkit/catalyst/root/layout/footer-bar.tt 2008-05-12 22:05:32 UTC (rev 9833)
+++ mb_server/branches/TemplateToolkit/catalyst/root/layout/footer-bar.tt 2008-05-12 23:41:43 UTC (rev 9834)
@@ -25,7 +25,7 @@
<ul id="creditsBar" class="bulletless">
<li class="left">Original Design|<a href="http://vacubomb.com/">vacubomb.com</a></li>
- <li class="right">Server version: <% &DBDefs::VERSION %></li>
+ <li class="right">Server version: [% server_details.version %]</li>
<li><img src="/images/edit.gif" alt="" /><a href="/doc/ContactUs">Contact details</a></li>
</ul>
</div>
Modified: mb_server/branches/TemplateToolkit/catalyst/root/static/main.css
===================================================================
--- mb_server/branches/TemplateToolkit/catalyst/root/static/main.css 2008-05-12 22:05:32 UTC (rev 9833)
+++ mb_server/branches/TemplateToolkit/catalyst/root/static/main.css 2008-05-12 23:41:43 UTC (rev 9834)
@@ -57,6 +57,29 @@
text-align: center;
}
+#creditsBar {
+ clear: both;
+ color: #BBB;
+ margin: 0 1em;
+ margin-bottom: 1em;
+}
+
+#creditsBar a, #footerNotes a {
+ font-weight: bold;
+ color: #BBB;
+}
+
+#creditsBar a:hover, #footerNotes a:hover {
+ color: #555;
+}
+
+#creditsBar li {
+ text-align: center;
+ list-style-type: none;
+}
+#creditsBar li.left { float: left;}
+#creditsBar li.right { float: right; }
+
#sidebar {
float: left;
width: 100pt;
More information about the MusicBrainz-commits
mailing list