-
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.
Style views and redirect to questionnaire when answers is created.
- Loading branch information
1 parent
be0fb3d
commit 1b2becb
Showing
7 changed files
with
21 additions
and
27 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
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,6 @@ | ||
<% content_for :title, "New answer" %> | ||
|
||
<h1>New answer</h1> | ||
<%= render "form", answer: @answer, question: @question, questionnaire: @questionnaire %> | ||
|
||
<%= link_to "Back to questionnaire", questionnaire_path(@questionnaire.id), class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %> | ||
<div class="w-1/3 mx-auto flex flex-col justify-center gap-4"> | ||
<h1 class="text-3xl font-semibold text-gray-800">Answer</h1> | ||
<%= render "form", answer: @answer, question: @question, questionnaire: @questionnaire %> | ||
</div> |
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
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,4 +1,13 @@ | ||
<p style="color: green"><%= notice %></p> | ||
<div class="flex flex-col gap-4 my-4"> | ||
<p style="color: green"><%= notice %></p> | ||
|
||
<%= render @questionnaire %> | ||
<%= render @questionnaire %> | ||
|
||
<div class="flex flex-col gap-4"> | ||
<h1 class="text-xl">Questions: <%= @questionnaire.questions.count %></h1> | ||
|
||
<div id="questions" class="min-w-full grid grid-cols-3 gap-4"> | ||
<%= render partial: "oodle/questions/question", collection: @questionnaire.questions, as: :question %> | ||
</div> | ||
</div> | ||
</div> |
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