Update new topic form layout

The same way we did with debates and proposals, we move recommendations
before the form.
This commit is contained in:
Javi Martín
2021-07-10 18:18:11 +02:00
parent cb800d0f38
commit 932da00f8d
4 changed files with 20 additions and 25 deletions

View File

@@ -71,7 +71,9 @@ main {
&.debate-new,
&.proposal-new,
&.sdg-goals-index,
&.sdg-goal-show {
&.sdg-goal-show,
&.topic-edit,
&.topic-new {
@include grid-column-gutter;
}
}

View File

@@ -2,13 +2,8 @@
<%= render "shared/errors", resource: @topic %>
<div class="row">
<div class="small-12 column">
<%= f.text_field :title %>
<%= f.text_area :description, rows: "5" %>
<%= f.submit(class: "button", value: t("community.topic.form.#{action_name}.submit_button")) %>
</div>
</div>
<%= f.text_field :title %>
<%= f.text_area :description, rows: "5" %>
<%= f.submit(class: "button", value: t("community.topic.form.#{action_name}.submit_button")) %>
<% end %>

View File

@@ -1,8 +1,7 @@
<div class="row">
<main class="topic-edit">
<%= back_link_to community_path(@community) %>
<div class="small-12 medium-9 column">
<%= back_link_to community_path(@community) %>
<h1><%= t("community.topic.edit") %></h1>
<%= render "form" %>
</div>
</div>
<h1><%= t("community.topic.edit") %></h1>
<%= render "form" %>
</main>

View File

@@ -1,12 +1,9 @@
<div class="row">
<main class="topic-new">
<%= back_link_to community_path(@community) %>
<div class="small-12 medium-9 column">
<%= back_link_to community_path(@community) %>
<h1><%= t("community.topic.create") %></h1>
<%= render "form" %>
</div>
<h1><%= t("community.topic.create") %></h1>
<div class="small-12 medium-3 column">
<aside>
<h2><%= t("community.topic.sidebar.recommendations_title") %></h2>
<ul class="recommendations">
@@ -14,5 +11,7 @@
<li><%= t("community.topic.sidebar.recommendation_two") %></li>
<li><%= t("community.topic.sidebar.recommendation_three") %></li>
</ul>
</div>
</div>
</aside>
<%= render "form" %>
</main>