diff --git a/Gemfile b/Gemfile index 80ef9f99a19..d93dc24426d 100644 --- a/Gemfile +++ b/Gemfile @@ -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 diff --git a/Gemfile.lock b/Gemfile.lock index 3ff6accf8ab..a002bf2e05f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -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 diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index ab79c28ff54..423323284a4 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -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 diff --git a/app/assets/javascripts/tagging.js b/app/assets/javascripts/tagging.js index 806bc4bb405..0aed92cae20 100644 --- a/app/assets/javascripts/tagging.js +++ b/app/assets/javascripts/tagging.js @@ -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("
  • \ - "+tag_name+" \ + "+tag_name+" x
  • ") el.find('.tag-input').val("") el.find('.control-group').removeClass('has-error') diff --git a/app/assets/stylesheets/editor.css b/app/assets/stylesheets/editor.css index 70d2188d50a..0285df1c2cc 100644 --- a/app/assets/stylesheets/editor.css +++ b/app/assets/stylesheets/editor.css @@ -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; diff --git a/app/assets/stylesheets/style.css b/app/assets/stylesheets/style.css index d4802b263b5..c555ba290d2 100644 --- a/app/assets/stylesheets/style.css +++ b/app/assets/stylesheets/style.css @@ -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; @@ -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; } @@ -96,6 +99,16 @@ 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; @@ -103,6 +116,10 @@ a .fa-white, .visible-tiny { display:inline; } + + #pl_pad { + width: 75%; + } } @media (min-width:400px) { @@ -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; } @@ -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; @@ -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, @@ -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; } @@ -186,6 +203,9 @@ body { padding-top: 70px; } @media (max-width: 340px) { #brand { display:none; } #header .brand-compact { display:inline; } + #pl_pad { + width: 75%; + } } @media (min-width: 340px) { @@ -193,7 +213,7 @@ body { padding-top: 70px; } #header .brand-compact { display:none; } } -.navbar-inverse .navbar-nav > li > a { +.navbar-nav > li > a { color: #aaa; } diff --git a/app/views/admin/_comments.html.erb b/app/views/admin/_comments.html.erb index 86be12f6df8..ab698393c88 100644 --- a/app/views/admin/_comments.html.erb +++ b/app/views/admin/_comments.html.erb @@ -22,12 +22,12 @@
    - Publish + Publish <% if comment.author.status == 0 %> - Ban + Ban <% elsif comment.author.status == 1 %> - Unban + Unban <% end %>
    diff --git a/app/views/admin/_nodes.html.erb b/app/views/admin/_nodes.html.erb index 1f41b4300c1..007eb2f9e2a 100644 --- a/app/views/admin/_nodes.html.erb +++ b/app/views/admin/_nodes.html.erb @@ -28,11 +28,11 @@
    - Publish + Publish - style="display:none;"<% end %> data-remote="true" href="/ban/<%= node.author.id %>">Ban - style="display:none;"<% end %> data-remote="true" href="/unban/<%= node.author.id %>">Unban - <%= 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 %> + style="display:none;"<% end %> data-remote="true" href="/ban/<%= node.author.id %>">Ban + style="display:none;"<% end %> data-remote="true" href="/unban/<%= node.author.id %>">Unban + <%= 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 %> <% end %>
    diff --git a/app/views/admin/_revisions.html.erb b/app/views/admin/_revisions.html.erb index 7651bb2f6ba..8c28d393f84 100644 --- a/app/views/admin/_revisions.html.erb +++ b/app/views/admin/_revisions.html.erb @@ -20,12 +20,12 @@
    - Publish + Publish <% if revision.author.status == 0 %> - Ban + Ban <% elsif revision.author.status == 1 %> - Unban + Unban <% end %>
    diff --git a/app/views/admin/spam.html.erb b/app/views/admin/spam.html.erb index e8829bab658..3965972d567 100644 --- a/app/views/admin/spam.html.erb +++ b/app/views/admin/spam.html.erb @@ -1,4 +1,4 @@ -
    +

    Spam moderation:

    @@ -8,16 +8,16 @@
    -
    +

    Moderate potential spam


    @@ -25,7 +25,7 @@ <% if params[:action] != "spam_revisions" && params[:action] != "spam_comments" %>
    diff --git a/app/views/admin/useremail.html.erb b/app/views/admin/useremail.html.erb index 2cc2e03ea84..14546a10a62 100644 --- a/app/views/admin/useremail.html.erb +++ b/app/views/admin/useremail.html.erb @@ -1,5 +1,5 @@ -
     
    -
    +
     
    +

    User lookup by email:

    diff --git a/app/views/admin/users.html.erb b/app/views/admin/users.html.erb index 3e04b3e8375..cc606878364 100644 --- a/app/views/admin/users.html.erb +++ b/app/views/admin/users.html.erb @@ -1,4 +1,4 @@ -
    +

    User moderation:

    @@ -8,7 +8,7 @@
    -
    +

    Moderate users

    @@ -23,9 +23,9 @@
    <% if user.status == 0 %> - Unban + Unban <% 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 %> Ban <% end %> <% end %> diff --git a/app/views/comments/_comments.html.erb b/app/views/comments/_comments.html.erb index 39ba7fd076d..55083c5f7de 100644 --- a/app/views/comments/_comments.html.erb +++ b/app/views/comments/_comments.html.erb @@ -1,7 +1,7 @@

    Comments

    - + @@ -23,14 +23,14 @@
    <%= t('users.list.comment') %> <%= t('users.list.last_activity') %><%= distance_of_time_in_words(comment.created_at, Time.current, { include_seconds: false, scope: 'datetime.time_ago_in_words' }) %> <% if comment.status == 4 && current_user &. can_moderate? %> - <%= t('dashboard.moderate.approve') %> - <%= t('dashboard.moderate.spam') %> + <%= t('dashboard.moderate.approve') %> + <%= t('dashboard.moderate.spam') %> <% elsif current_user &. can_moderate? %> - + <% else %> - + <% end %> @@ -39,4 +39,4 @@ <% end %>
    -<%= will_paginate comments, :renderer => BootstrapPagination::Rails %> +<%= will_paginate comments, renderer: WillPaginate::ActionView::BootstrapLinkRenderer %> diff --git a/app/views/comments/_edit.html.erb b/app/views/comments/_edit.html.erb index 412339e3f61..479b45ff8d8 100644 --- a/app/views/comments/_edit.html.erb +++ b/app/views/comments/_edit.html.erb @@ -1,152 +1,154 @@ - @@ -87,7 +84,7 @@ <% cache('trending-tags', expires_in: 24.hours, skip_digest: true) do %> <% Tag.trending.each do |i| %> - <%= i.name %> + <%= i.name %> <% end %> <% end %> @@ -114,7 +111,7 @@
    - <%= will_paginate notes, :renderer => BootstrapPagination::Rails if notes %> + <%= will_paginate notes, renderer: WillPaginate::ActionView::BootstrapLinkRenderer if notes %>
    diff --git a/app/views/dashboard/_comment_moderate.html.erb b/app/views/dashboard/_comment_moderate.html.erb index c826e70d737..d2ee97fe437 100644 --- a/app/views/dashboard/_comment_moderate.html.erb +++ b/app/views/dashboard/_comment_moderate.html.erb @@ -2,8 +2,8 @@

    <% if logged_in_as(['admin','moderator']) %> <%= t('dashboard._comment_moderate.first_time_post') %> - <%= t('dashboard.moderate.approve') %> - <%= t('dashboard.moderate.spam') %> + <%= t('dashboard.moderate.approve') %> + <%= t('dashboard.moderate.spam') %> <% else %> <%= raw t('dashboard.moderate.pending_approval', :url => '/wiki/moderation') %> <% end %> diff --git a/app/views/dashboard/_header.html.erb b/app/views/dashboard/_header.html.erb index 03298198333..3f69959e616 100644 --- a/app/views/dashboard/_header.html.erb +++ b/app/views/dashboard/_header.html.erb @@ -9,13 +9,13 @@

    -

    +

    <% if current_user %> - + <%= t('dashboard._header.welcome') %>, <%= current_user.username %>! <%= current_user.new_contributor %> <%= @note_count %> <% if @note_count === 1 %> <%= t('dashboard._header.note') %><% else %> <%= t('dashboard._header.notes') %><% end %> <%= t('dashboard._header.and') %> <%= @wiki_count %> <%= t('dashboard._header.wiki_edits') %> <%= t('dashboard._header.posted_past_week') %> <%= t('dashboard._header.you_shared') %> <%= @user_note_count %> <% if @user_note_count === 1 %><%= t('dashboard._header.research_note') %><% else %><%= t('dashboard._header.research_notes') %><% end %>. <% else %> - + <%= t('dashboard._header.welcome') %>! <%= t('dashboard._header.this_could_be_dashboard') %> <%= t('dashboard._header.joined_public_lab') %> <% end %>

    diff --git a/app/views/dashboard/_node_comment.html.erb b/app/views/dashboard/_node_comment.html.erb index 824c2858fff..ccf929d013b 100644 --- a/app/views/dashboard/_node_comment.html.erb +++ b/app/views/dashboard/_node_comment.html.erb @@ -1,4 +1,4 @@ -
    +
    diff --git a/app/views/dashboard/_node_default.html.erb b/app/views/dashboard/_node_default.html.erb index 117fc1b835e..72abf63bfa5 100644 --- a/app/views/dashboard/_node_default.html.erb +++ b/app/views/dashboard/_node_default.html.erb @@ -1,4 +1,4 @@ -
    +
    <%= render partial: 'dashboard/node_moderate', locals: { node: node } %> @@ -9,7 +9,7 @@ <% end %> -

    <%= node.title %> <% if node.status == 3 %>Draft<% end %>

    +

    <%= node.title %> <% if node.status == 3 %>Draft<% end %>

    <%= render partial: "dashboard/node_meta", locals: { node: node } %>

    diff --git a/app/views/dashboard/_node_event.html.erb b/app/views/dashboard/_node_event.html.erb index be514942508..58be9a8b40d 100644 --- a/app/views/dashboard/_node_event.html.erb +++ b/app/views/dashboard/_node_event.html.erb @@ -1,4 +1,4 @@ -
    +
    @@ -15,7 +15,7 @@

    <%= node.title %>

    - RSVP + RSVP

    Event <%= render partial: "dashboard/node_meta", locals: { node: node } %>

    diff --git a/app/views/dashboard/_node_meta.html.erb b/app/views/dashboard/_node_meta.html.erb index ec78f4e6e75..125438d3a96 100644 --- a/app/views/dashboard/_node_meta.html.erb +++ b/app/views/dashboard/_node_meta.html.erb @@ -17,13 +17,13 @@ <% end %> | <%= node.fetch_comments(current_user).length %> | - + | <%= number_with_delimiter(node.views) %> | <%= node.likes %> <% if params[:mod] %>| <% end %> <% if current_user %> -
    ' data-html="true" data-content="sample" > +
    ' data-html="true" data-content="sample" > <% else %> - + <% end %> diff --git a/app/views/dashboard/_node_moderate.html.erb b/app/views/dashboard/_node_moderate.html.erb index 5c82ea89611..aa57199235a 100644 --- a/app/views/dashboard/_node_moderate.html.erb +++ b/app/views/dashboard/_node_moderate.html.erb @@ -2,8 +2,8 @@

    <% if logged_in_as(['admin','moderator']) %> <%= t('dashboard._node_moderate.first_time_post') %> - <%= t('dashboard.moderate.approve') %> - <%= t('dashboard.moderate.spam') %> + <%= t('dashboard.moderate.approve') %> + <%= t('dashboard.moderate.spam') %> <% else %> <%= raw t('dashboard.moderate.pending_approval', :url => '/wiki/moderation') %> <% end %> diff --git a/app/views/dashboard/_node_question.html.erb b/app/views/dashboard/_node_question.html.erb index 794c94be012..ea0749aae56 100644 --- a/app/views/dashboard/_node_question.html.erb +++ b/app/views/dashboard/_node_question.html.erb @@ -1,4 +1,4 @@ -

    +
    @@ -16,10 +16,10 @@

    <%= node.title %>

    <% if node.answers.collect(&:accepted).include?(true) %> -

    Answered

    +

    Answered

    <% end %> - <%= t('dashboard._node_question.post_answer') %> + <%= t('dashboard._node_question.post_answer') %>

    <%= t('dashboard._node_question.question') %> <%= render partial: "dashboard/node_meta", locals: { node: node } %>

    diff --git a/app/views/dashboard/_node_wiki.html.erb b/app/views/dashboard/_node_wiki.html.erb index ca40795a71e..5bf3c3c0b41 100644 --- a/app/views/dashboard/_node_wiki.html.erb +++ b/app/views/dashboard/_node_wiki.html.erb @@ -1,4 +1,4 @@ -
    +
    <% if node.is_a?(Node) %> @@ -27,13 +27,16 @@ <% if node.is_a?(Revision) && node.previous %> - <%= t('dashboard._node_wiki.changes') %> » + <%= t('dashboard._node_wiki.changes') %> » <% end %>

    <%= render partial: "dashboard/node_meta", locals: { node: node } %>

    <% if node.is_a?(Revision) && node.previous %> - + +
    + +
    <% end %>
    diff --git a/app/views/dashboard/_wiki.html.erb b/app/views/dashboard/_wiki.html.erb index bc9822a99ae..ae2f6ce2d93 100644 --- a/app/views/dashboard/_wiki.html.erb +++ b/app/views/dashboard/_wiki.html.erb @@ -1,20 +1,20 @@

    <%= raw t('dashboard._wiki.shared_knowledge_base', :url => '/wiki') %>

    -
    +
    -
    - diff --git a/app/views/dashboard/dashboard.html.erb b/app/views/dashboard/dashboard.html.erb index cb74b08bbc4..81c417f3620 100644 --- a/app/views/dashboard/dashboard.html.erb +++ b/app/views/dashboard/dashboard.html.erb @@ -10,7 +10,7 @@ To get started at Public Lab, try:

    - + Asking a question @@ -26,7 +26,7 @@

    -
    +
    <%= render partial: "dashboard/header" %> @@ -43,14 +43,17 @@

    - + <%=raw translation('dashboard.dashboard.from_blog', :url => '/blog') %> <%= @blog.title %> <%= t('dashboard.dashboard.by') %> <%= @blog.author.username %>

    + + <% if @blog.main_image || @blog.scraped_image %> +
    + <% end %> -
    <% end %> <%= render partial: "dashboard/activity", locals: { activity: @activity, notes: @notes } %> @@ -59,7 +62,7 @@
    -
    +
    <%= feature('dashboard-feature') %> diff --git a/app/views/editor/_editor.html.erb b/app/views/editor/_editor.html.erb index d5b179a1ba8..c001c928db9 100644 --- a/app/views/editor/_editor.html.erb +++ b/app/views/editor/_editor.html.erb @@ -13,15 +13,15 @@ -
    diff --git a/app/views/editor/_images.html.erb b/app/views/editor/_images.html.erb index 3d83fdaa165..198b4185194 100644 --- a/app/views/editor/_images.html.erb +++ b/app/views/editor/_images.html.erb @@ -14,7 +14,7 @@ <% if current_user %> <% current_user.images.reverse[0..3].each do |image| %> - <%= image_tag image.photo.url(:thumb), :class => "img-rounded" %> + <%= image_tag image.photo.url(:thumb), :class => "rounded" %> <%= image.photo_file_name %> <%= time_ago_in_words(image.created_at) %> ago Use as main diff --git a/app/views/editor/_main_image.html.erb b/app/views/editor/_main_image.html.erb index efe1cd83b86..3aeed051b9f 100644 --- a/app/views/editor/_main_image.html.erb +++ b/app/views/editor/_main_image.html.erb @@ -1,8 +1,8 @@ -