forked from bofh/fetsite
AutoCommit Don Jul 30 00:03:02 CEST 2015
This commit is contained in:
10
app/views/survey/answers/_form.html.erb
Normal file
10
app/views/survey/answers/_form.html.erb
Normal file
@@ -0,0 +1,10 @@
|
||||
<%= semantic_form_for @answer do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :choice %>
|
||||
<%= f.input :user %>
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
6
app/views/survey/answers/edit.html.erb
Normal file
6
app/views/survey/answers/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing survey_answer</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @survey_answer %> |
|
||||
<%= link_to 'Back', survey_answers_path %>
|
||||
25
app/views/survey/answers/index.html.erb
Normal file
25
app/views/survey/answers/index.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<h1>Listing survey_answers</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Choice</th>
|
||||
<th>User</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @survey_answers.each do |survey_answer| %>
|
||||
<tr>
|
||||
<td><%= survey_answer.choice %></td>
|
||||
<td><%= survey_answer.user %></td>
|
||||
<td><%= link_to 'Show', survey_answer %></td>
|
||||
<td><%= link_to 'Edit', edit_survey_answer_path(survey_answer) %></td>
|
||||
<td><%= link_to 'Destroy', survey_answer, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New Answer', new_survey_answer_path %>
|
||||
5
app/views/survey/answers/new.html.erb
Normal file
5
app/views/survey/answers/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New survey_answer</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', survey_answers_path %>
|
||||
15
app/views/survey/answers/show.html.erb
Normal file
15
app/views/survey/answers/show.html.erb
Normal file
@@ -0,0 +1,15 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<b>Choice:</b>
|
||||
<%= @survey_answer.choice %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>User:</b>
|
||||
<%= @survey_answer.user %>
|
||||
</p>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_survey_answer_path(@survey_answer) %> |
|
||||
<%= link_to 'Back', survey_answers_path %>
|
||||
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 %>
|
||||
13
app/views/survey/questions/_form.html.erb
Normal file
13
app/views/survey/questions/_form.html.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
<%= semantic_form_for @survey_question do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :title %>
|
||||
<%= f.input :text %>
|
||||
|
||||
|
||||
<%= f.input :typ %>
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
2
app/views/survey/questions/_question.html.erb
Normal file
2
app/views/survey/questions/_question.html.erb
Normal file
@@ -0,0 +1,2 @@
|
||||
<b><%= question.title%></b>
|
||||
<%= form_for %>
|
||||
6
app/views/survey/questions/edit.html.erb
Normal file
6
app/views/survey/questions/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing survey_question</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @survey_question %> |
|
||||
<%= link_to 'Back', survey_questions_path %>
|
||||
27
app/views/survey/questions/index.html.erb
Normal file
27
app/views/survey/questions/index.html.erb
Normal file
@@ -0,0 +1,27 @@
|
||||
<h1>Listing survey_questions</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Text</th>
|
||||
<th>Typ</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @survey_questions.each do |survey_question| %>
|
||||
<tr>
|
||||
<td><%= survey_question.title %></td>
|
||||
<td><%= survey_question.text %></td>
|
||||
<td><%= survey_question.typ %></td>
|
||||
<td><%= link_to 'Show', survey_question %></td>
|
||||
<td><%= link_to 'Edit', edit_survey_question_path(survey_question) %></td>
|
||||
<td><%= link_to 'Destroy', survey_question, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New Question', new_survey_question_path %>
|
||||
5
app/views/survey/questions/new.html.erb
Normal file
5
app/views/survey/questions/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New survey_question</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', survey_questions_path %>
|
||||
21
app/views/survey/questions/show.html.erb
Normal file
21
app/views/survey/questions/show.html.erb
Normal file
@@ -0,0 +1,21 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<b>Title:</b>
|
||||
<%= @survey_question.title %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Text:</b>
|
||||
<%= @survey_question.text %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Typ:</b>
|
||||
<%= @survey_question.typ %>
|
||||
</p>
|
||||
|
||||
<%= render @survey_question %>
|
||||
|
||||
<%= link_to 'Edit', edit_survey_question_path(@survey_question) %> |
|
||||
<%= link_to 'Back', survey_questions_path %>
|
||||
Reference in New Issue
Block a user