Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Bootstrap 4 #3937

Merged
merged 96 commits into from
Apr 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
8034145
Some changes in homepage related to bootstrap 4
Souravirus Nov 15, 2018
b77d7e9
Removed the comments
Souravirus Nov 15, 2018
074cf41
changes in _header.html.erb and style.css
Souravirus Nov 21, 2018
16c6c30
Removed the space on the top of the navbar
Souravirus Nov 24, 2018
6d103ed
Changed bootstrap version
Souravirus Dec 14, 2018
feda621
Changed the dropdowns on left side according to bootstrap 4
Souravirus Dec 17, 2018
62baf08
Changes in navbar bootstrap for large sccreen
Souravirus Dec 17, 2018
ca60ee9
Added spacing before public lab label in large screens
Souravirus Dec 19, 2018
e76c979
Made the dropdowns look more appropriate in large and medium screens
Souravirus Dec 20, 2018
c7d2962
Added padding to body tag
Souravirus Dec 22, 2018
50e4f9a
Corrected the btn-default class of social icons buttons
Souravirus Dec 22, 2018
a6ff52b
Corrected the positioning of the social icons in sign up page
Souravirus Dec 25, 2018
98dae9f
Fixed the login and signup popups in the home screen
Souravirus Dec 25, 2018
4f951d5
Corrected the notes in the home page
Souravirus Dec 26, 2018
314f163
Modified some class
Souravirus Dec 26, 2018
3efa751
Changes in dashboard
Souravirus Dec 26, 2018
b2e7eef
Activity in dashboard sorted
Souravirus Dec 27, 2018
33cc79f
Sidebar sorted
Souravirus Dec 27, 2018
bbfea99
Some changes due to the rebase
Souravirus Dec 27, 2018
e365d68
Some changes in wiki.html of dashboard
Souravirus Dec 28, 2018
bcaf5c9
Some modifications in layouts stylesheets which was missed
Souravirus Dec 29, 2018
3819ec3
Legacy editor sorted
Souravirus Dec 29, 2018
e9f8013
fixed the rich editor for asking questions
Souravirus Dec 30, 2018
cf420bf
Fixed the legacy question form
Souravirus Dec 30, 2018
5202d38
Fixed the header of the wiki page
Souravirus Dec 30, 2018
d12811b
Modifications in wiki show page
Souravirus Jan 1, 2019
f10449e
Modified the comment editor accordingly
Souravirus Jan 1, 2019
5fc862d
Changes in wiki editor
Souravirus Jan 1, 2019
c4587c4
Changed the sizing style of show.html of talk
Souravirus Jan 3, 2019
0a682be
Modified the wiki revision accordingly
Souravirus Jan 3, 2019
4046efb
Modified the well to card in the editors
Souravirus Jan 3, 2019
c3730dc
Some changes after rebasing
Souravirus Jan 4, 2019
77f4a65
Some changes with tagging editor
Souravirus Jan 8, 2019
6b99d8b
Some changes in tag editor
Souravirus Jan 10, 2019
148fba7
modified some features in map
Souravirus Jan 10, 2019
4e46504
made the maps modal look good
Souravirus Jan 12, 2019
1cd7d45
Some modifications
Souravirus Jan 13, 2019
283474a
Some changes in wiki sidebar
Souravirus Jan 14, 2019
c7668cd
Some changes in questions page
Souravirus Jan 14, 2019
f8db22f
Some changes in questions page
Souravirus Jan 15, 2019
db74529
Corrected tag index page
Souravirus Jan 15, 2019
c2604af
Fixed the tag page
Souravirus Jan 15, 2019
3521b73
Corrected the methods page
Souravirus Jan 17, 2019
5e614e0
modified the users page
Souravirus Jan 17, 2019
a4f4e4b
Some changes due to rebase
Souravirus Feb 5, 2019
2eb9d62
Some important changes after rebase
Souravirus Feb 7, 2019
247366e
Some changes in sidebar
Souravirus Feb 8, 2019
6bb8cd4
some changes in views of subscription page
Souravirus Feb 11, 2019
8127896
Changed the subscribe button
Souravirus Feb 11, 2019
f68cfac
Upgraded the bootstrap version to 4.1.0
Souravirus Feb 11, 2019
00f97f3
Some changes in yarn
Souravirus Feb 15, 2019
20e22c1
Some changes in package.json
Souravirus Feb 16, 2019
fe8aabb
Added will_paginate_4 in Gemfile
Souravirus Feb 16, 2019
4f94ec2
Removed the rails errors related to will_paginate bootstrap-4
Souravirus Feb 17, 2019
07f524f
Some minor changes with the home page
Souravirus Feb 18, 2019
2d8fcf0
Added typeahead.js package to the javascript assets
Souravirus Mar 7, 2019
f1271b8
Corrected all the bootstrap classes in admin folder
Souravirus Mar 11, 2019
ca1704d
Corrected the bootstrap class in comment and dashboard folder
Souravirus Mar 12, 2019
48c4e28
Corrected bootstrap in editor folder
Souravirus Mar 12, 2019
8087579
Corrected the bootstrap in features, grids and home folder
Souravirus Mar 13, 2019
edf1f53
Corrected the bootstrap in notes folder
Souravirus Mar 14, 2019
0cc396b
Changed the bootstrap in questions folder and some mistakes related t…
Souravirus Mar 16, 2019
c58d066
Modified the bootstrap class in search class
Souravirus Mar 16, 2019
051180b
Corrected all the bootstrap class in sidebar and stats
Souravirus Mar 16, 2019
b7dedb8
Initially completed correcting all the bootstrap classes
Souravirus Mar 16, 2019
869acf3
Auto-complete worked
Souravirus Mar 17, 2019
54fea3e
Added missing </div> in dashboard.html
Souravirus Mar 17, 2019
c823246
Some views covered
Souravirus Mar 19, 2019
c24c4f1
Some missed views covered
Souravirus Mar 19, 2019
0aedb8a
Changed some views at sidebar/author.html.erb
Souravirus Mar 19, 2019
6718cf0
Some minor changes in header layout
Souravirus Mar 20, 2019
cbb8662
Prevented navbar from folding
Souravirus Mar 21, 2019
bc912e2
Some correction with the min-width of the About us link
Souravirus Mar 21, 2019
d2981cb
Corrected the tags being shown as plain text
Souravirus Mar 21, 2019
0122ee2
Corrected another instance of badge default
Souravirus Mar 21, 2019
905e593
Changes in cross button of the badge
Souravirus Mar 22, 2019
01801d9
some changes in rich editor
Souravirus Mar 22, 2019
43b8246
Corrected the notes page where there were some redundancies
Souravirus Apr 7, 2019
e821404
Corrected the tests
Souravirus Apr 7, 2019
6028cf1
Added some space after the search bar in the navbar
Souravirus Apr 8, 2019
a06534f
semver patch
rexagod Apr 10, 2019
f7c64f3
Corrected the signup page
Souravirus Apr 10, 2019
29f3669
Added spacing between or and login in sign up page
Souravirus Apr 10, 2019
ca1952e
Smoothened the side dropdown in dashboard
Souravirus Apr 10, 2019
13092f8
Corrected the subscribe button
Souravirus Apr 11, 2019
269a191
Made the creation of tag possible
Souravirus Apr 13, 2019
83e2fe1
Corrected the weirdness in comment form
Souravirus Apr 13, 2019
2bcf4fa
Made the map modal larger
Souravirus Apr 14, 2019
5398d73
Added caret-down button in the like button group
Souravirus Apr 15, 2019
b36d43c
Corrected the nav-tabs in questions page
Souravirus Apr 15, 2019
e090c7d
Alligned the dropdowns to the right
Souravirus Apr 18, 2019
d7de5ea
Corrected the well in comment edit section
Souravirus Apr 21, 2019
3c127b1
Removed the emojis from going down in comments
Souravirus Apr 23, 2019
ed2a0eb
Added the eye button to the password field in login modal
Souravirus Apr 23, 2019
528b1ef
Adding the eye button to password field
Souravirus Apr 23, 2019
83b4b69
corrected tests related to search button
Souravirus Apr 24, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ gem 'tzinfo-data', platforms: %i(mingw mswin x64_mingw jruby)
gem 'unicode-emoji'
gem 'whenever', require: false
gem 'will_paginate', '>= 3.0.6'
gem 'will_paginate-bootstrap', '>= 1.0.1'
gem 'will_paginate-bootstrap4'
gem 'jquery-atwho-rails'
gem 'lemmatizer', '~> 0.2.2'
# To implement incoming mail processing microframework
Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,8 @@ GEM
whenever (0.11.0)
chronic (>= 0.6.3)
will_paginate (3.1.7)
will_paginate-bootstrap (1.0.2)
will_paginate (>= 3.0.3)
will_paginate-bootstrap4 (0.2.2)
will_paginate (~> 3.0, >= 3.0.0)
xpath (3.2.0)
nokogiri (~> 1.8)

Expand Down Expand Up @@ -610,7 +610,7 @@ DEPENDENCIES
web-console (>= 3.3.0)
whenever
will_paginate (>= 3.0.6)
will_paginate-bootstrap (>= 1.0.1)
will_paginate-bootstrap4

RUBY VERSION
ruby 2.4.4p296
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//= require jquery
//= require jquery_ujs
//= require debounce/index.js
//= require bootstrap/dist/js/bootstrap.min.js
//= require bootstrap/dist/js/bootstrap.bundle.min.js
//= require bootstrap-3-typeahead/bootstrap3-typeahead.min.js
//= require bootstrap-datepicker/dist/js/bootstrap-datepicker.js
//= require jquery-file-upload/js/vendor/jquery.ui.widget.js
Expand Down
6 changes: 3 additions & 3 deletions app/assets/javascripts/tagging.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ function initTagForm(deletion_path, selector) {
$.each(response['saved'], function(i,tag) {
var tag_name = tag[0];
var tag_id = tag[1];
$('#tags ul:first').append("<li><span id='tag_"+tag_id+"' class='label label-primary'> \
<a href='/tag/"+tag_name+"'>"+tag_name+"</a> <a class='tag-delete' \
data-remote='true' href='"+deletion_path+"/"+tag_id+"' data-tag-id='"+tag_id+"' \
$('#tags ul:first').append("<li><span id='tag_"+tag_id+"' class='badge badge-primary'> \
<a style='color:white;' href='/tag/"+tag_name+"'>"+tag_name+"</a> <a class='tag-delete' \
data-remote='true' href='"+deletion_path+"/"+tag_id+"' style='color:white' data-tag-id='"+tag_id+"' \
data-method='delete'>x</a></span></li> ")
el.find('.tag-input').val("")
el.find('.control-group').removeClass('has-error')
Expand Down
8 changes: 6 additions & 2 deletions app/assets/stylesheets/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,21 @@
}

@media (max-width: 480px) {
.side-dropzone, .profile-dropzone { padding:0; }
.side-dropzone, .profile-dropzone { padding:0; margin-bottom:10px;}
.side-dropzone p, .profile-dropzone p { padding:15px; }
}

@media (max-width: 768px) {
.side-dropzone, .profile-dropzone { padding:0; }
.side-dropzone, .profile-dropzone { padding:0; margin-bottom:10px;}
.side-dropzone p, .profile-dropzone p {
padding:20px 20px 30px;
}
}

@media (max-width: 992px) {
.side-dropzone, .profile-dropzone { margin-bottom: 10px;}
}

@media (max-width: 480px) {
#dropzone textarea {
height:300px;
Expand Down
38 changes: 29 additions & 9 deletions app/assets/stylesheets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ It was originally created by Caroline Hadilaksono: http://www.hadilaksono.com

}

body{
padding-top: 80px;
}

h1,h2,h3 {
font-family:"Junction Light", lucida grande,lucida sans console,sans-serif;
Expand Down Expand Up @@ -59,7 +62,7 @@ h4,h5,h6, h1 small, h3 small {
.pl-content p img,
#comments p img,
#answer-0-comment p img,
.pl-content p iframe {
.pl-content p {
max-width: 100%;
border: none;
}
Expand Down Expand Up @@ -96,13 +99,27 @@ a .fa-white,
display:none;
}

#pl_pad {
width:300%;
}

@media (max-width:992px) {
#pl_pad {
width:250%;
}
}

@media (max-width:400px) {
.hidden-tiny {
display:none;
}
.visible-tiny {
display:inline;
}

#pl_pad {
width: 75%;
}
}

@media (min-width:400px) {
Expand All @@ -112,12 +129,10 @@ a .fa-white,
.visible-tiny {
display:none;
}

}

@media (max-width: 768px) {
.navbar-header {
float: none;
}
.navbar-left,.navbar-right {
float: none !important;
}
Expand All @@ -132,9 +147,9 @@ a .fa-white,
top: 0;
border-width: 0 0 1px;
}
.navbar-collapse.collapse {
/*.navbar-collapse.collapse {
display: none!important;
}
}*/
.navbar-nav {
float: none!important;
margin-top: 7.5px;
Expand All @@ -152,9 +167,11 @@ a .fa-white,
#md-ham {
display: none;
}
#pl_pad {
width:150%;
}
}

body { padding-top: 70px; }

#header .collapse.in .hidden-xs,
#header .collapse.in .hidden-sm,
Expand All @@ -170,7 +187,7 @@ body { padding-top: 70px; }

#header .navbar-brand {
color: white;
padding-top: 19px;
/*padding-top: 19px;*/
font-family: "Junction Light", lucida grande,lucida sans console,sans-serif;
font-size: 22px;
}
Expand All @@ -186,14 +203,17 @@ body { padding-top: 70px; }
@media (max-width: 340px) {
#brand { display:none; }
#header .brand-compact { display:inline; }
#pl_pad {
width: 75%;
}
}

@media (min-width: 340px) {
#brand { display:inline; }
#header .brand-compact { display:none; }
}

.navbar-inverse .navbar-nav > li > a {
.navbar-nav > li > a {
color: #aaa;
}

Expand Down
6 changes: 3 additions & 3 deletions app/views/admin/_comments.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
</td>
<td><div class="btn-toolbar" style="margin:0;">
<div class="btn-group">
<a class="btn btn-default btn-lg <% if comment.status == 0 %>btn-success<% else %>disabled<% end %> publish" href="/admin/publish_comment/<%= comment.id %>"><i class="fa fa-ok-circle fa fa-white"></i> Publish</a>
<a class="btn btn-outline-secondary btn-lg <% if comment.status == 0 %>btn-success<% else %>disabled<% end %> publish" href="/admin/publish_comment/<%= comment.id %>"><i class="fa fa-ok-circle fa fa-white"></i> Publish</a>

<% if comment.author.status == 0 %>
<a class="btn btn-default btn-lg ban a<%= comment.author.id %>" href="/ban/<%= comment.author.id %>">Ban</a>
<a class="btn btn-outline-secondary btn-lg ban a<%= comment.author.id %>" href="/ban/<%= comment.author.id %>">Ban</a>
<% elsif comment.author.status == 1 %>
<a class="btn btn-default btn-lg unban a-unban<%= comment.author.id %>" href="/unban/<%= comment.author.id %>">Unban</a>
<a class="btn btn-outline-seconday btn-lg unban a-unban<%= comment.author.id %>" href="/unban/<%= comment.author.id %>">Unban</a>
<% end %>
</div>
</div></td>
Expand Down
8 changes: 4 additions & 4 deletions app/views/admin/_nodes.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
</td>
<td><div class="btn-toolbar" style="margin:0;">
<div class="btn-group">
<a class="btn btn-default btn-lg <% if node.status == 0 %>btn-success<% else %>disabled<% end %> publish" data-remote="true" href="/moderate/publish/<%= node.id %>"><i class="fa fa-ok-circle fa fa-white"></i> Publish</a>
<a class="btn btn-outline-secondary btn-lg <% if node.status == 0 %>btn-success<% else %>disabled<% end %> publish" data-remote="true" href="/moderate/publish/<%= node.id %>"><i class="fa fa-ok-circle fa fa-white"></i> Publish</a>

<a class="btn btn-default btn-lg ban a<%= node.author.id %>" <% if node.author.status == 0 %>style="display:none;"<% end %> data-remote="true" href="/ban/<%= node.author.id %>">Ban</a>
<a class="btn btn-default btn-lg unban a-unban<%= node.author.id %>" <% if node.author.status == 1 %>style="display:none;"<% end %> data-remote="true" href="/unban/<%= node.author.id %>">Unban</a>
<%= link_to "/notes/delete/"+node.id.to_s, data: { confirm: 'Are you sure you want to delete "'+node.path+'"?' }, :remote => true, :class => "btn btn-default btn-lg delete" do %>
<a class="btn btn-outline-secondary btn-lg ban a<%= node.author.id %>" <% if node.author.status == 0 %>style="display:none;"<% end %> data-remote="true" href="/ban/<%= node.author.id %>">Ban</a>
<a class="btn btn-outline-secondary btn-lg unban a-unban<%= node.author.id %>" <% if node.author.status == 1 %>style="display:none;"<% end %> data-remote="true" href="/unban/<%= node.author.id %>">Unban</a>
<%= link_to "/notes/delete/"+node.id.to_s, data: { confirm: 'Are you sure you want to delete "'+node.path+'"?' }, :remote => true, :class => "btn btn-outline-secondary btn-lg delete" do %>
<i class="fa fa-trash"></i>
<% end %>
</div>
Expand Down
6 changes: 3 additions & 3 deletions app/views/admin/_revisions.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
</td>
<td><div class="btn-toolbar" style="margin:0;">
<div class="btn-group">
<a class="btn btn-default btn-lg <% if revision.status == 0 %>btn-success<% else %>disabled<% end %> publish" href="/moderate/revision/publish/<%= revision.vid %>"><i class="fa fa-ok-circle fa fa-white"></i> Publish</a>
<a class="btn btn-outline-secondary btn-lg <% if revision.status == 0 %>btn-success<% else %>disabled<% end %> publish" href="/moderate/revision/publish/<%= revision.vid %>"><i class="fa fa-ok-circle fa fa-white"></i> Publish</a>

<% if revision.author.status == 0 %>
<a class="btn btn-default btn-lg ban a<%= revision.author.id %>" href="/ban/<%= revision.author.id %>">Ban</a>
<a class="btn btn-outline-secondary btn-lg ban a<%= revision.author.id %>" href="/ban/<%= revision.author.id %>">Ban</a>
<% elsif revision.author.status == 1 %>
<a class="btn btn-default btn-lg unban a-unban<%= revision.author.id %>" href="/unban/<%= revision.author.id %>">Unban</a>
<a class="btn btn-outline-secondary btn-lg unban a-unban<%= revision.author.id %>" href="/unban/<%= revision.author.id %>">Unban</a>
<% end %>
</div>
</div></td>
Expand Down
16 changes: 8 additions & 8 deletions app/views/admin/spam.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="col-md-3">
<div class="col-lg-3">

<h3>Spam moderation:</h3>

Expand All @@ -8,24 +8,24 @@

</div>

<div class="col-md-9">
<div class="col-lg-9">

<h3>Moderate potential spam</h3>

<ul class="nav nav-tabs">
<li <% unless params[:type] && params[:action] == "spam_revisions" %>class="active"<% end %>><a href="/spam">Filtered</a></li>
<li <% if params[:type] == "wiki" %>class="active"<% end %>><a href="/spam/wiki"><i class="fa fa-book"></i><span class="hidden-sm"> Wiki</span></a></li>
<li <% if params[:action] == "spam_revisions" %>class="active"<% end %>><a href="/spam/revisions"><i class="fa fa-list"></i><span class="hidden-sm"> Revisions</span></a></li>
<li <% if params[:action] == "spam_comments" %>class="active"<% end %>><a href="/spam/comments"><i class="fa fa-comment"></i><span class="hidden-sm"> Comments</span></a></li>
<li <a href="/people"><i class="fa fa-user"></i><span class="hidden-sm"> Active Users</span></a></li>
<li class="nav-item"><a class="nav-link <% unless params[:type] && params[:action] == "spam_revisions" %> active <% end %>" href="/spam">Filtered</a></li>
<li class="nav-item"><a class="nav-link <% if params[:type] == "wiki" %> active <% end %>" href="/spam/wiki"><i class="fa fa-book"></i><span class="d-xs-inline d-md-none d-lg-inline"> Wiki</span></a></li>
<li class="nav-item"><a class="nav-link <% if params[:action] == "spam_revisions" %> active <% end %>" href="/spam/revisions"><i class="fa fa-list"></i><span class="d-xs-inline d-md-none d-lg-inline"> Revisions</span></a></li>
<li class="nav-item"><a class="nav-link <% if params[:action] == "spam_comments" %> active <% end %>" href="/spam/comments"><i class="fa fa-comment"></i><span class="d-xs-inline d-md-none d-lg-inline"> Comments</span></a></li>
<li class="nav-item"><a class="nav-link" href="/people"><i class="fa fa-user"></i><span class="d-xs-inline d-md-none d-lg-inline"> Active Users</span></a></li>
</ul>

<br />

<% if params[:action] != "spam_revisions" && params[:action] != "spam_comments" %>
<div class="btn-toolbar">
<div class="btn-group">
<a class="btn btn-default" id="batch-delete" href="javascript:void();"><i class="fa fa-ban-circle"></i> Spam all checked and ban authors</a>
<a class="btn btn-outline-secondary" id="batch-delete" href="javascript:void();"><i class="fa fa-ban-circle"></i> Spam all checked and ban authors</a>
</div>
</div>
<br />
Expand Down
4 changes: 2 additions & 2 deletions app/views/admin/useremail.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="col-md-3">&nbsp;</div>
<div class="col-md-9">
<div class="col-lg-3">&nbsp;</div>
<div class="col-lg-9">

<h3>User lookup by email:</h3>

Expand Down
8 changes: 4 additions & 4 deletions app/views/admin/users.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="col-md-3">
<div class="col-lg-3">

<h3>User moderation:</h3>

Expand All @@ -8,7 +8,7 @@

</div>

<div class="col-md-9">
<div class="col-lg-9">

<h3>Moderate users</h3>

Expand All @@ -23,9 +23,9 @@
<td><div class="btn-toolbar" style="margin:0;">
<div class="btn-group">
<% if user.status == 0 %>
<a class="btn btn-default btn-lg btn-success unban" data-remote="true" href="/unban/<%= user.id %>"><i class="fa fa-ok-circle fa fa-white"></i> Unban</a>
<a class="btn btn-outline-secondary btn-lg btn-success unban" data-remote="true" href="/unban/<%= user.id %>"><i class="fa fa-ok-circle fa fa-white"></i> Unban</a>
<% else %>
<%= link_to "/ban/"+user.id.to_s, :confirm => 'Are you sure?', :remote => true, :class => "btn btn-lg btn-error ban" do %>
<%= link_to "/ban/"+user.id.to_s, :confirm => 'Are you sure?', :remote => true, :class => "btn btn-lg btn-danger ban" do %>
<i class="fa fa-circle-ban"></i> Ban
<% end %>
<% end %>
Expand Down
12 changes: 6 additions & 6 deletions app/views/comments/_comments.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1>Comments </h1>
<table class="table">
<tr>
<th class="visible-sm visible-xs"></th>
<th class="d-lg-none"></th>
<th><%= t('users.list.comment') %></th>
<th><%= t('users.list.last_activity') %></th>

Expand All @@ -23,14 +23,14 @@
<td><%= distance_of_time_in_words(comment.created_at, Time.current, { include_seconds: false, scope: 'datetime.time_ago_in_words' }) %></td>
<td>
<% if comment.status == 4 && current_user &. can_moderate? %>
<a class="btn btn-default btn-xs" href="/admin/publish_comment/<%= comment.id %>"><%= t('dashboard.moderate.approve') %></a>
<a class="btn btn-default btn-xs" href="/admin/mark_comment_spam/<%= comment.id %>"><%= t('dashboard.moderate.spam') %></a>
<a class="btn btn-outline-secondary btn-sm" href="/admin/publish_comment/<%= comment.id %>"><%= t('dashboard.moderate.approve') %></a>
<a class="btn btn-outline-secondary btn-sm" href="/admin/mark_comment_spam/<%= comment.id %>"><%= t('dashboard.moderate.spam') %></a>
<% elsif current_user &. can_moderate? %>
<a rel="tooltip" title="Mark as spam" class="btn btn-sm btn-default btn-flag-spam-<%= comment.id %>" data-confirm="Are you sure? The user will no longer be able to log in or publish, and their content will be hidden except comments." href="/admin/mark_comment_spam/<%= comment.id %>">
<a rel="tooltip" title="Mark as spam" class="btn btn-sm btn-outline-secondary btn-flag-spam-<%= comment.id %>" data-confirm="Are you sure? The user will no longer be able to log in or publish, and their content will be hidden except comments." href="/admin/mark_comment_spam/<%= comment.id %>">
<i class="fa fa-ban"></i>
</a>
<% else %>
<a rel="tooltip" title="Flag as spam" class="btn btn-sm btn-default btn-flag-spam-<%= comment.id %>" href="mailto:moderators@publiclab.org?subject=Reporting+spam+on+Public+Lab&body=Hi,+I+found+this+comment+that+looks+like+spam+or+needs+to+be+moderated:+https://publiclab.org/<%= comment.parent.path %>#c<%= comment.cid %>+by+https://publiclab.org/profile/<% if comment.author %><%= comment.author.name %><% end %>+Thanks!">
<a rel="tooltip" title="Flag as spam" class="btn btn-sm btn-outline-secondary btn-flag-spam-<%= comment.id %>" href="mailto:moderators@publiclab.org?subject=Reporting+spam+on+Public+Lab&body=Hi,+I+found+this+comment+that+looks+like+spam+or+needs+to+be+moderated:+https://publiclab.org/<%= comment.parent.path %>#c<%= comment.cid %>+by+https://publiclab.org/profile/<% if comment.author %><%= comment.author.name %><% end %>+Thanks!">
<i class="fa fa-flag"></i>
</a>
<% end %>
Expand All @@ -39,4 +39,4 @@
<% end %>
</table>

<%= will_paginate comments, :renderer => BootstrapPagination::Rails %>
<%= will_paginate comments, renderer: WillPaginate::ActionView::BootstrapLinkRenderer %>
Loading