Add missing spec. Improve readability on topics files
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
|
||||
<ul class="tabs" data-tabs id="topics-tabs">
|
||||
|
||||
<li class="tabs-title is-active">
|
||||
<%= link_to "#tab-comments" do %>
|
||||
<h3>
|
||||
@@ -9,6 +11,8 @@
|
||||
</h3>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<%= render 'shared/errors', resource: @topic %>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= f.label :title, t("community.topic.form.topic_title") %>
|
||||
<%= f.text_field :title, label: false %>
|
||||
@@ -13,6 +14,7 @@
|
||||
<div class="actions small-12 column">
|
||||
<%= f.submit(class: "button", value: t("community.topic.form.#{action_name}.submit_button")) %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<% end %>
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
<div class="small-12 medium-3 column">
|
||||
|
||||
<span class="icon-proposals float-right"></span>
|
||||
|
||||
<h2><%= t("community.topic.sidebar.recommendations_title") %></h2>
|
||||
|
||||
<ul class="recommendations">
|
||||
<li><%= t("community.topic.sidebar.recommendation_one") %></li>
|
||||
<li><%= t("community.topic.sidebar.recommendation_two") %></li>
|
||||
<li><%= t("community.topic.sidebar.recommendation_three") %></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<% if topics.any? %>
|
||||
|
||||
<div class="row column">
|
||||
<div class="order">
|
||||
<%= render 'shared/wide_order_selector', i18n_namespace: "comments" %>
|
||||
@@ -6,9 +7,12 @@
|
||||
</div>
|
||||
|
||||
<% topics.each do |topic| %>
|
||||
|
||||
<div id="<%= dom_id(topic) %>" class="panel column">
|
||||
<div class="small-10 column">
|
||||
|
||||
<h3><%= link_to topic.title, community_topic_path(@community, topic) %></h3>
|
||||
|
||||
<p class="topic-info">
|
||||
<span class="icon-comments"></span>
|
||||
<%= link_to t("community.show.topic.comments", count: topic.comments_count), community_topic_path(@community, topic, anchor: "comments") %>
|
||||
@@ -17,14 +21,19 @@
|
||||
<span class="bullet"> • </span>
|
||||
<%= topic.author.name %>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="small-2 column text-right">
|
||||
<% if topic.author == current_user %>
|
||||
<%= link_to t("community.show.topic.edit_button"), edit_community_topic_path(@community.id, topic), class: 'button small hollow' %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% else %>
|
||||
<h4><%= t("community.show.create_first_community_topic") %></h4>
|
||||
<% end %>
|
||||
|
||||
@@ -7,4 +7,5 @@
|
||||
</div>
|
||||
|
||||
<%= render "recommendations" %>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<div class="topic-new row">
|
||||
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= back_link_to community_path(@community) %>
|
||||
<h1><%= t("community.topic.create") %></h1>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<div class="row topic-show">
|
||||
<div class="small-12 medium-12 column">
|
||||
|
||||
<%= back_link_to community_path(@community) %>
|
||||
<br>
|
||||
|
||||
@@ -21,5 +22,6 @@
|
||||
<%= render "topics/comments" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -327,6 +327,7 @@ feature 'Budget Investments' do
|
||||
within("#investment_code") do
|
||||
expect(page).to have_content(investment.id)
|
||||
end
|
||||
expect(page).to have_content "Access the community"
|
||||
end
|
||||
|
||||
scenario "Don't display flaggable buttons" do
|
||||
|
||||
Reference in New Issue
Block a user