forked from bofh/fetsite
AutoCommit Don Jul 30 00:03:02 CEST 2015
This commit is contained in:
12
app/views/survey/choices/_form.html.erb
Normal file
12
app/views/survey/choices/_form.html.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
<%= semantic_form_for @choice do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :text %>
|
||||
<%= f.input :question %>
|
||||
<%= f.input :sort %>
|
||||
<%= f.input :picture %>
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
6
app/views/survey/choices/edit.html.erb
Normal file
6
app/views/survey/choices/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing survey_choice</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @survey_choice %> |
|
||||
<%= link_to 'Back', survey_choices_path %>
|
||||
29
app/views/survey/choices/index.html.erb
Normal file
29
app/views/survey/choices/index.html.erb
Normal file
@@ -0,0 +1,29 @@
|
||||
<h1>Listing survey_choices</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Text</th>
|
||||
<th>Question</th>
|
||||
<th>Sort</th>
|
||||
<th>Picture</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @survey_choices.each do |survey_choice| %>
|
||||
<tr>
|
||||
<td><%= survey_choice.text %></td>
|
||||
<td><%= survey_choice.question %></td>
|
||||
<td><%= survey_choice.sort %></td>
|
||||
<td><%= survey_choice.picture %></td>
|
||||
<td><%= link_to 'Show', survey_choice %></td>
|
||||
<td><%= link_to 'Edit', edit_survey_choice_path(survey_choice) %></td>
|
||||
<td><%= link_to 'Destroy', survey_choice, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New Choice', new_survey_choice_path %>
|
||||
5
app/views/survey/choices/new.html.erb
Normal file
5
app/views/survey/choices/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New survey_choice</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', survey_choices_path %>
|
||||
25
app/views/survey/choices/show.html.erb
Normal file
25
app/views/survey/choices/show.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<b>Text:</b>
|
||||
<%= @survey_choice.text %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Question:</b>
|
||||
<%= @survey_choice.question %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Sort:</b>
|
||||
<%= @survey_choice.sort %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Picture:</b>
|
||||
<%= @survey_choice.picture %>
|
||||
</p>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_survey_choice_path(@survey_choice) %> |
|
||||
<%= link_to 'Back', survey_choices_path %>
|
||||
Reference in New Issue
Block a user