width: 100%;
}
-/* Rules for the diary list page */
-
-.diary_post {
- position: relative;
- padding-top: $lineheight;
- padding-bottom: $lineheight/2;
- border-top: 1px solid $grey;
-
- &.deleted {
- background-color: #fee;
- }
-}
-
/* Rules for the diary entry page */
.diary_entries {
#map {
height: 400px;
display: none;
- margin-bottom: $lineheight;
}
.comments {
max-width: 740px;
}
.diary-comment {
border-top: 1px dashed $grey;
- padding-top: $lineheight/2;
- padding-bottom: $lineheight/2;
&:first-child {
- margin-top: $lineheight/2;
- padding-top: $lineheight;
border-top: 1px solid $grey;
}
- &.deleted {
- background-color: #fee;
- }
p {
margin-bottom: $lineheight/2;
}
- .comment-heading {
- margin-bottom: 0;
- margin-top: 0;
- }
}
}
-<div class="row diary-comment<%= " text-muted deleted" unless diary_comment.visible? %>">
+<div class="row diary-comment py-3<%= " text-muted bg-danger bg-opacity-10" unless diary_comment.visible? %>">
<div class="col-auto">
<%= user_thumbnail diary_comment.user %>
</div>
<div class="col">
- <p class="text-muted comment-heading" id="comment<%= diary_comment.id %>"><%= t(".comment_from_html", :link_user => (link_to diary_comment.user.display_name, user_path(diary_comment.user)), :comment_created_at => link_to(l(diary_comment.created_at, :format => :friendly), :anchor => "comment#{diary_comment.id}")) %>
+ <p class="text-muted m-0" id="comment<%= diary_comment.id %>"><%= t(".comment_from_html", :link_user => (link_to diary_comment.user.display_name, user_path(diary_comment.user)), :comment_created_at => link_to(l(diary_comment.created_at, :format => :friendly), :anchor => "comment#{diary_comment.id}")) %>
<% if current_user and diary_comment.user.id != current_user.id %>
| <%= report_link(t(".report"), diary_comment) %>
<% end %>
<fieldset>
<legend><%= t ".location" -%></legend>
- <%= tag.div "", :id => "map", :class => "border border-grey rounded", :data => { :lat => @lat, :lon => @lon, :zoom => @zoom } %>
+ <%= tag.div "", :id => "map", :class => "border border-grey rounded mb-3", :data => { :lat => @lat, :lon => @lon, :zoom => @zoom } %>
<div class="row mb-3">
<%= f.text_field :latitude, :wrapper_class => "col-sm-4", :id => "latitude" %>
<%= f.text_field :longitude, :wrapper_class => "col-sm-4", :id => "longitude" %>
- <div class="col-sm-4">
- <label><a href="#" id="usemap"><%= t ".use_map_link" -%></a></label>
+ <div class="col-sm-4 align-self-end pt-2">
+ <button type="button" id="usemap" class="btn btn-outline-primary"><%= t ".use_map_link" -%></button>
</div>
</div>
</fieldset>
# Try and get the index
get diary_entries_path
assert_response :success
- assert_select "div.diary_post", :count => 20
+ assert_select "article.diary_post", :count => 20
assert_select "li.page-item a.page-link", :text => "Older Entries", :count => 1
assert_select "li.page-item.disabled span.page-link", :text => "Newer Entries", :count => 1
# Try and get the second page
get css_select("li.page-item a.page-link").first["href"]
assert_response :success
- assert_select "div.diary_post", :count => 20
+ assert_select "article.diary_post", :count => 20
assert_select "li.page-item a.page-link", :text => "Older Entries", :count => 1
assert_select "li.page-item a.page-link", :text => "Newer Entries", :count => 1
# Try and get the third page
get css_select("li.page-item a.page-link").first["href"]
assert_response :success
- assert_select "div.diary_post", :count => 10
+ assert_select "article.diary_post", :count => 10
assert_select "li.page-item.disabled span.page-link", :text => "Older Entries", :count => 1
assert_select "li.page-item a.page-link", :text => "Newer Entries", :count => 1
# Go back to the second page
get css_select("li.page-item a.page-link").last["href"]
assert_response :success
- assert_select "div.diary_post", :count => 20
+ assert_select "article.diary_post", :count => 20
assert_select "li.page-item a.page-link", :text => "Older Entries", :count => 1
assert_select "li.page-item a.page-link", :text => "Newer Entries", :count => 1
# Go back to the first page
get css_select("li.page-item a.page-link").last["href"]
assert_response :success
- assert_select "div.diary_post", :count => 20
+ assert_select "article.diary_post", :count => 20
assert_select "li.page-item a.page-link", :text => "Older Entries", :count => 1
assert_select "li.page-item.disabled span.page-link", :text => "Newer Entries", :count => 1
end
assert_response :success
assert_template "index"
assert_no_missing_translations
- assert_select "div.diary_post", entries.count
+ assert_select "article.diary_post", entries.count
entries.each do |entry|
assert_select "a[href=?]", "/user/#{ERB::Util.u(entry.user.display_name)}/diary/#{entry.id}"