Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
836 additions
and
26 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
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,28 +1,22 @@ | ||
<%= form_for(@tour) do |f| %> | ||
<% if @tour.errors.any? %> | ||
<div id="error_explanation"> | ||
<h2><%= pluralize(@tour.errors.count, "error") %> prohibited this tour from being saved:</h2> | ||
|
||
<ul> | ||
<% @tour.errors.full_messages.each do |msg| %> | ||
<li><%= msg %></li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<% end %> | ||
<h1>For now, tours may contain up to 5 items</h1> | ||
<% 5.times do%> | ||
<div class="field"> | ||
<%= f.label :artwork_id %><br /> | ||
<%= f.text_field :artwork_id %> | ||
</div> | ||
<div class="field"> | ||
<%= f.label :position %><br /> | ||
<%= f.text_field :position %> | ||
</div> | ||
<% end %> | ||
<div class="actions"> | ||
<%= f.submit %> | ||
</div> | ||
<%= semantic_form_for @tour, do |form| %> | ||
<% if @tour.errors.any? %> | ||
<div id="error_explanation"> | ||
<h2><%= pluralize(@tour.errors.count, "error") %> prohibited this exhibition from being saved:</h2> | ||
|
||
<ul> | ||
<% @tour.errors.full_messages.each do |msg| %> | ||
<li><%= msg %></li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<% end %> | ||
<%= form.inputs do %> | ||
<%= form.input :name, :required => true, :wrapper_html => { :title => "Name of the Tour" } %> | ||
<%= form.input :desc, :required => true, :wrapper_html => { :title => "Description of the tour" } %> | ||
<% end %> | ||
<%= form.buttons do %> | ||
<%= form.commit_button :button_html => { :class => "primary" } %> | ||
<% 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<%= semantic_form_for @touritem, :url=>arts_path do |f| %> | ||
<% if @touritem.errors.any? %> | ||
<div id="error_explanation"> | ||
<h2><%= pluralize(@touritem.errors.count, "error") %> prohibited this artwork from being saved:</h2> | ||
|
||
<ul> | ||
<% @touritem.errors.full_messages.each do |msg| %> | ||
<li><%= msg %></li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<% end %> | ||
<%= f.inputs do %> | ||
<%= f.input :tour_id, :required => true, :as => :select, :collection => @tours, :wrapper_html => { :title => "Tour ID" } %> | ||
<%= f.input :artwork_id, :required => true, :as => :select, :collection => @artworks, :wrapper_html => { :title => "Artist ID" } %> | ||
<% end %> | ||
<%= f.buttons do %> | ||
<%= f.commit_button :button_html => { :class => "primary" } %> | ||
<% 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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<h2>Edit a Tour Item</h2> | ||
|
||
<%= render "tour_items" %> | ||
<%= link_to 'Back', tours_path %> | ||
<style type="text/css"> | ||
div#navbar a:nth-child(5){ | ||
background-color:#CEF6F5; | ||
} | ||
</style> |
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
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.