aboutsummaryrefslogtreecommitdiffstats
path: root/src/_helpers/band_helper.rb
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2011-11-13 14:55:15 +0100
committerHarald Eilertsen <haraldei@anduin.net>2011-11-13 14:55:15 +0100
commit4bd266ca036b9a11ea37432fdc97485ca2c674d1 (patch)
tree086cf8ae3927771e3eb1c3d1ab61d0a30b010fd5 /src/_helpers/band_helper.rb
parentabfd10ff72446bab988dc24f81d4b9b08dd8ab8b (diff)
downloadThrash-and-Burn-Tour-2012-Website-master.tar.gz
Thrash-and-Burn-Tour-2012-Website-master.tar.bz2
Thrash-and-Burn-Tour-2012-Website-master.zip
Make tourdates a bit nicer.HEADmaster
Diffstat (limited to 'src/_helpers/band_helper.rb')
-rw-r--r--src/_helpers/band_helper.rb30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/_helpers/band_helper.rb b/src/_helpers/band_helper.rb
index 0380184..812892d 100644
--- a/src/_helpers/band_helper.rb
+++ b/src/_helpers/band_helper.rb
@@ -1,9 +1,37 @@
puts "Loading BandHelper..."
module BandHelper
+
def bandlinks_all
"#{link('Exeloume', 'http://www.facebook.com/exeloume')}, " +
"#{link('Imbalance', 'http://www.imbalance.no')} og " +
"#{link('Ninth Circle', 'http://www.ninthcircle.no')}"
end
-end \ No newline at end of file
+
+ def tourdate(date, venue, town, comments = "")
+ rendered_date = tag "span", :class => "date" do
+ date
+ end
+
+ rendered_venue = tag "span", :class => "venue" do
+ venue
+ end
+
+ rendered_town = tag "span", :class => "town" do
+ town
+ end
+
+ output = "#{rendered_date}: #{rendered_venue}, #{rendered_town}"
+
+ unless comments.empty?
+ rendered_comments = tag "span", :class => "comments" do
+ "(#{comments})"
+ end
+ output += " #{rendered_comments}"
+ end
+
+ tag "li", :class => "tour_entry" do
+ output
+ end
+ end
+end