forked from concerto/concerto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sidebar now handled via content_for block. [concerto#105 state:resolved]
- Loading branch information
Showing
9 changed files
with
92 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
module ApplicationHelper | ||
|
||
# Generate the HTML for the standardized back buttons used | ||
# in the header elements. | ||
def back_button(path, name = "Back", options = {}) | ||
options[:class] ||= "button back" | ||
|
||
tag("div", {:class => "C-header_back"}, true) + link_to(name, path, options) + raw("</div>") | ||
end | ||
|
||
# Figure out which class we should be using to setup the sidebar. | ||
# The default for no sidebar is "no" but if a sidebar is used | ||
# the default becomes "sm" (small) but it can be overridden by | ||
# setting @sidebar_class anywhere a sidebar is used. | ||
def sidebar_class | ||
if content_for?(:sidebar) | ||
@sidebar_class || "sm" | ||
else | ||
"no" | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,30 @@ | ||
<div class="C-full sm"> | ||
<div class="C-header"> | ||
<h1>Browse Content</h1> | ||
</div> | ||
<div class="C-cont"> | ||
<div class="C-center column"> | ||
<a class="button" href="#" onclick="this.blur();"><span>Design a Graphic</span></a> | ||
<% @contents.each do |content| %> | ||
<ul class="iconlist"> | ||
<li> | ||
<a href=""> | ||
<div class="iconlist_padding"> | ||
<div class="ins"> | ||
<div class="type-folder"><%= content.data %><%#= image_tag("ph/ph.png", :alt => "") %></div> | ||
</div> | ||
<h2> | ||
<%= content.name %> | ||
<br /> | ||
<%= content.start_time %> - <%= content.end_time %> | ||
</h2> | ||
</div> | ||
</a> | ||
</li> | ||
</ul> | ||
<% end %> | ||
</div> | ||
<div class="C-sidebar column"> | ||
<ul class="feedbuttons"> | ||
<li class="selected"><% link_to "#", :class => "button" do %><span>99+</span>Service & Community<% end %></li> | ||
<li><% link_to "#", :class => "button" do %><span>7</span>Entertainment<% end %></li> | ||
</ul> | ||
</div> | ||
<div class="clear"></div> | ||
</div> | ||
</div> | ||
<% content_for :header do %> | ||
<%= back_button screens_path %> | ||
<h1>New Screen</h1> | ||
<% end %> | ||
<% content_for :sidebar do %> | ||
<ul class="feedbuttons"> | ||
<li class="selected"><% link_to "#", :class => "button" do %><span>99+</span>Service & Community<% end %></li> | ||
<li><% link_to "#", :class => "button" do %><span>7</span>Entertainment<% end %></li> | ||
</ul> | ||
<% end %> | ||
|
||
<a class="button" href="#" onclick="this.blur();"><span>Design a Graphic</span></a> | ||
<% @contents.each do |content| %> | ||
<ul class="iconlist"> | ||
<li> | ||
<a href=""> | ||
<div class="iconlist_padding"> | ||
<div class="ins"> | ||
<div class="type-folder"><%= content.data %><%#= image_tag("ph/ph.png", :alt => "") %></div> | ||
</div> | ||
<h2> | ||
<%= content.name %> | ||
<br /> | ||
<%= content.start_time %> - <%= content.end_time %> | ||
</h2> | ||
</div> | ||
</a> | ||
</li> | ||
</ul> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<h1>Editing feed</h1> | ||
|
||
<%= render 'form' %> | ||
<%= link_to 'Show', @feed %> | | ||
<%= link_to 'Back', feeds_path %> | ||
<% content_for :header do %> | ||
<%= back_button feeds_path %> | ||
<h1>Edit Feed</h1> | ||
<% end %> | ||
<%= render 'form' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,5 @@ | ||
<div class="C-full no"> | ||
<div class="C-header"> | ||
<%= back_button feeds_path %> | ||
<h1>New Feed</h1> | ||
</div> | ||
<div class="C-cont"> | ||
<div class="C-center column"> | ||
<%= render 'form' %> | ||
</div> | ||
<div class="clear"></div> | ||
</div> | ||
</div> | ||
<% content_for :header do %> | ||
<%= back_button feeds_path %> | ||
<h1>New Feed</h1> | ||
<% end %> | ||
<%= render 'form' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<h1>Editing group</h1> | ||
|
||
<%= render 'form' %> | ||
<%= link_to 'Show', @group %> | | ||
<%= link_to 'Back', groups_path %> | ||
<% content_for :header do %> | ||
<%= back_button groups_path %> | ||
<h1>Edit Group</h1> | ||
<% end %> | ||
<%= render 'form' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
<div class="C-header"> | ||
<%= back_button groups_path %> | ||
<h1>New Group</h1> | ||
</div> | ||
<div class="C-cont"> | ||
<div class="C-center column"> | ||
<%= render 'form' %> | ||
</div> | ||
<div class="clear"></div> | ||
</div> | ||
<% content_for :header do %> | ||
<%= back_button groups_path %> | ||
<h1>New Group</h1> | ||
<% end %> | ||
<%= render 'form' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<h1>Editing screen</h1> | ||
|
||
<%= render 'form' %> | ||
<%= link_to 'Show', @screen %> | | ||
<%= link_to 'Back', screens_path %> | ||
<% content_for :header do %> | ||
<%= back_button screens_path %> | ||
<h1>Edit Screen</h1> | ||
<% end %> | ||
<%= render 'form' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,5 @@ | ||
<div class="C-full no"> | ||
<div class="C-header"> | ||
<%= back_button screens_path %> | ||
<h1>New Screen</h1> | ||
</div> | ||
<div class="C-cont"> | ||
<div class="C-center column"> | ||
<%= render 'form' %> | ||
</div> | ||
<div class="clear"></div> | ||
</div> | ||
</div> | ||
|
||
<% content_for :header do %> | ||
<%= back_button screens_path %> | ||
<h1>New Screen</h1> | ||
<% end %> | ||
<%= render 'form' %> |