Add missing spec. Improve readability on topics files

This commit is contained in:
taitus
2017-08-29 13:20:06 +02:00
parent ec309de273
commit 8f7356f7a4
8 changed files with 25 additions and 1 deletions

View File

@@ -1,6 +1,8 @@
<div class="row"> <div class="row">
<div class="small-12 column"> <div class="small-12 column">
<ul class="tabs" data-tabs id="topics-tabs"> <ul class="tabs" data-tabs id="topics-tabs">
<li class="tabs-title is-active"> <li class="tabs-title is-active">
<%= link_to "#tab-comments" do %> <%= link_to "#tab-comments" do %>
<h3> <h3>
@@ -9,6 +11,8 @@
</h3> </h3>
<% end %> <% end %>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@@ -3,6 +3,7 @@
<%= render 'shared/errors', resource: @topic %> <%= render 'shared/errors', resource: @topic %>
<div class="row"> <div class="row">
<div class="small-12 column"> <div class="small-12 column">
<%= f.label :title, t("community.topic.form.topic_title") %> <%= f.label :title, t("community.topic.form.topic_title") %>
<%= f.text_field :title, label: false %> <%= f.text_field :title, label: false %>
@@ -13,6 +14,7 @@
<div class="actions small-12 column"> <div class="actions small-12 column">
<%= f.submit(class: "button", value: t("community.topic.form.#{action_name}.submit_button")) %> <%= f.submit(class: "button", value: t("community.topic.form.#{action_name}.submit_button")) %>
</div> </div>
</div> </div>
<% end %> <% end %>

View File

@@ -1,9 +1,13 @@
<div class="small-12 medium-3 column"> <div class="small-12 medium-3 column">
<span class="icon-proposals float-right"></span> <span class="icon-proposals float-right"></span>
<h2><%= t("community.topic.sidebar.recommendations_title") %></h2> <h2><%= t("community.topic.sidebar.recommendations_title") %></h2>
<ul class="recommendations"> <ul class="recommendations">
<li><%= t("community.topic.sidebar.recommendation_one") %></li> <li><%= t("community.topic.sidebar.recommendation_one") %></li>
<li><%= t("community.topic.sidebar.recommendation_two") %></li> <li><%= t("community.topic.sidebar.recommendation_two") %></li>
<li><%= t("community.topic.sidebar.recommendation_three") %></li> <li><%= t("community.topic.sidebar.recommendation_three") %></li>
</ul> </ul>
</div> </div>

View File

@@ -1,4 +1,5 @@
<% if topics.any? %> <% if topics.any? %>
<div class="row column"> <div class="row column">
<div class="order"> <div class="order">
<%= render 'shared/wide_order_selector', i18n_namespace: "comments" %> <%= render 'shared/wide_order_selector', i18n_namespace: "comments" %>
@@ -6,9 +7,12 @@
</div> </div>
<% topics.each do |topic| %> <% topics.each do |topic| %>
<div id="<%= dom_id(topic) %>" class="panel column"> <div id="<%= dom_id(topic) %>" class="panel column">
<div class="small-10 column"> <div class="small-10 column">
<h3><%= link_to topic.title, community_topic_path(@community, topic) %></h3> <h3><%= link_to topic.title, community_topic_path(@community, topic) %></h3>
<p class="topic-info"> <p class="topic-info">
<span class="icon-comments"></span>&nbsp; <span class="icon-comments"></span>&nbsp;
<%= link_to t("community.show.topic.comments", count: topic.comments_count), community_topic_path(@community, topic, anchor: "comments") %> <%= 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">&nbsp;&bull;&nbsp;</span> <span class="bullet">&nbsp;&bull;&nbsp;</span>
<%= topic.author.name %> <%= topic.author.name %>
</p> </p>
</div> </div>
<div class="small-2 column text-right"> <div class="small-2 column text-right">
<% if topic.author == current_user %> <% if topic.author == current_user %>
<%= link_to t("community.show.topic.edit_button"), edit_community_topic_path(@community.id, topic), class: 'button small hollow' %> <%= link_to t("community.show.topic.edit_button"), edit_community_topic_path(@community.id, topic), class: 'button small hollow' %>
<% end %> <% end %>
</div> </div>
</div> </div>
<% end %> <% end %>
<% else %> <% else %>
<h4><%= t("community.show.create_first_community_topic") %></h4> <h4><%= t("community.show.create_first_community_topic") %></h4>
<% end %> <% end %>

View File

@@ -7,4 +7,5 @@
</div> </div>
<%= render "recommendations" %> <%= render "recommendations" %>
</div> </div>

View File

@@ -1,4 +1,5 @@
<div class="topic-new row"> <div class="topic-new row">
<div class="small-12 medium-9 column"> <div class="small-12 medium-9 column">
<%= back_link_to community_path(@community) %> <%= back_link_to community_path(@community) %>
<h1><%= t("community.topic.create") %></h1> <h1><%= t("community.topic.create") %></h1>

View File

@@ -1,5 +1,6 @@
<div class="row topic-show"> <div class="row topic-show">
<div class="small-12 medium-12 column"> <div class="small-12 medium-12 column">
<%= back_link_to community_path(@community) %> <%= back_link_to community_path(@community) %>
<br> <br>
@@ -21,5 +22,6 @@
<%= render "topics/comments" %> <%= render "topics/comments" %>
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -327,6 +327,7 @@ feature 'Budget Investments' do
within("#investment_code") do within("#investment_code") do
expect(page).to have_content(investment.id) expect(page).to have_content(investment.id)
end end
expect(page).to have_content "Access the community"
end end
scenario "Don't display flaggable buttons" do scenario "Don't display flaggable buttons" do