diff --git a/app/controllers/geronimo_controller.rb b/app/controllers/geronimo_controller.rb
index b6aa05a..65d4d4b 100644
--- a/app/controllers/geronimo_controller.rb
+++ b/app/controllers/geronimo_controller.rb
@@ -7,11 +7,13 @@ def everything
def index
blog = Blog.latest_for_frontpage
- @latest_front_page_blogpost = blog ? blog.blogtext : "Nothing to say"
+ @latest_front_page_blogpost = blog ? blog.to_html : "Predators hunt you"
@next_show = Show.next_show
if(Track.where(:frontpage => true).count > 0)
@frontpage_audio_url = Track.where(:frontpage => true).first.recording.url
+ @tracks = Track.where(:frontpage => true).limit(4);
end
+ @pictures = Picture.all.shuffle
render 'predators/home', :layout => 'simple'
end
diff --git a/app/controllers/tracks_controller.rb b/app/controllers/tracks_controller.rb
index e87524d..eb7fae5 100644
--- a/app/controllers/tracks_controller.rb
+++ b/app/controllers/tracks_controller.rb
@@ -13,8 +13,8 @@ def index
def frontpage
track = Track.find(params[:id])
- frontpage_tracks = Track.where(:frontpage => true)
- frontpage_tracks.first.toggle!(:frontpage) unless frontpage_tracks.count == 0
+ #frontpage_tracks = Track.where(:frontpage => true)
+ #frontpage_tracks.first.toggle!(:frontpage) unless frontpage_tracks.count == 0
track.toggle!(:frontpage)
redirect_to :tracks
end
diff --git a/app/views/layouts/simple.html.erb b/app/views/layouts/simple.html.erb
index b6a3db5..32b48e2 100644
--- a/app/views/layouts/simple.html.erb
+++ b/app/views/layouts/simple.html.erb
@@ -4,7 +4,8 @@
+
+ <% @pictures.each do |picture| %>
+ <%= image_tag picture.image.url %>
+ <% end %>
+
+
+
+
\ No newline at end of file
diff --git a/app/views/predators/_player.html.erb b/app/views/predators/_player.html.erb
new file mode 100644
index 0000000..927fc15
--- /dev/null
+++ b/app/views/predators/_player.html.erb
@@ -0,0 +1,30 @@
+
+
+
+ <% unless @frontpage_audio_url.nil?%>
+ <%= render 'tracks/player', :audio_url => @frontpage_audio_url %>
+ <% end %>
+
+
+
+ <%= render @tracks unless @tracks.nil? %>
+
+
+
+
\ No newline at end of file
diff --git a/app/views/predators/_poster.html.erb b/app/views/predators/_poster.html.erb
new file mode 100644
index 0000000..439ccc3
--- /dev/null
+++ b/app/views/predators/_poster.html.erb
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+ <%= render('shared/title') %>
+
+
+
+ <%= raw @next_show.to_html unless @next_show.nil? %>
+
+
+
+
\ No newline at end of file
diff --git a/app/views/predators/home.html.erb b/app/views/predators/home.html.erb
index d527859..5fbcd48 100644
--- a/app/views/predators/home.html.erb
+++ b/app/views/predators/home.html.erb
@@ -1,45 +1,4 @@
-
-
-
-
-
- <%= render('shared/title') %>
-
-
-
- <%= raw @next_show.to_html unless @next_show.nil? %>
-
-
- <% unless @frontpage_audio_url.nil?%>
- <%= render 'tracks/player', :audio_url => @frontpage_audio_url %>
- <% end %>
-
\ No newline at end of file
+<%= render 'predators/player' %>
+<%= render 'predators/poster' %>
+<%= render 'predators/blogs' %>
+<%= render 'predators/pictures' %>
\ No newline at end of file
diff --git a/app/views/tracks/_player.html.erb b/app/views/tracks/_player.html.erb
index 5f51877..c2bbb20 100644
--- a/app/views/tracks/_player.html.erb
+++ b/app/views/tracks/_player.html.erb
@@ -1,5 +1,5 @@
<%
- visibility = 'hidden' if local_assigns[:visibility].nil?
+ visibility = 'none' if local_assigns[:visibility].nil?
%>
@@ -50,4 +50,4 @@ $(document).ready(function(){