diff --git a/app/assets/javascripts/repository_columns/index.js.erb b/app/assets/javascripts/repository_columns/index.js.erb index 55fac90c4..77d34f5d1 100644 --- a/app/assets/javascripts/repository_columns/index.js.erb +++ b/app/assets/javascripts/repository_columns/index.js.erb @@ -43,6 +43,10 @@ }); }); }); + }).fail(function(error) { + HelperModule.flashAlertMsg( + "<%= I18n.t("libraries.repository_columns.no_permissions") %>", + 'danger'); }); }); } @@ -58,6 +62,10 @@ modal_html.modal('show'); _initSubmitAction(modal_html, $(modal_html.find('form'))); }); + }).fail(function(error) { + HelperModule.flashAlertMsg( + "<%= I18n.t("libraries.repository_columns.no_permissions") %>", + 'danger'); }); }); } diff --git a/app/assets/javascripts/sidebar_toggle.js.erb b/app/assets/javascripts/sidebar_toggle.js.erb index a265f3d2a..a288929c3 100644 --- a/app/assets/javascripts/sidebar_toggle.js.erb +++ b/app/assets/javascripts/sidebar_toggle.js.erb @@ -5,10 +5,7 @@ function show() { $('#sideBarLeft').show(); $('#sideBarRight').hide(); - $('#sidebar-wrapper').show( - 'slide', { direction: 'right', easing: 'linear' }, 400 - ); - $('#wrapper').css('paddingLeft', '280px'); + $('#wrapper').removeClass('hidden2'); $('.navbar-secondary').css( { 'margin-left': '-280px', 'padding-left': '294px' } ); @@ -17,10 +14,7 @@ function hide() { $('#sideBarLeft').hide(); $('#sideBarRight').show(); - $('#sidebar-wrapper').hide( - 'slide', { direction: 'left', easing: 'linear'}, 400 - ); - $('#wrapper').css('paddingLeft', '0'); + $('#wrapper').addClass('hidden2'); $('.navbar-secondary').css({ 'margin-left': '0', 'padding-left': '14px' diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 2e84dd2ab..0198a2b85 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -51,6 +51,7 @@

<%=t 'general.no_teams.text' %>

<% else %> + <%= yield :flash_messages_div %> <%= yield :content %> <% end %> diff --git a/app/views/reports/new/_report_sidebar.html.erb b/app/views/reports/new/_report_sidebar.html.erb deleted file mode 100644 index 808a3fb89..000000000 --- a/app/views/reports/new/_report_sidebar.html.erb +++ /dev/null @@ -1,22 +0,0 @@ -<% content_for :sidebar do %> -
- - - - -
- -
-
-<% end %> - -<%= javascript_include_tag("sidebar") %> diff --git a/app/views/repository_columns/index.html.erb b/app/views/repository_columns/index.html.erb index c81d22c72..46b8d13e8 100644 --- a/app/views/repository_columns/index.html.erb +++ b/app/views/repository_columns/index.html.erb @@ -1,5 +1,7 @@ <% provide(:head_title, t('libraries.repository_columns.head_title', repository: @repository.name)) %> - +<% provide(:flash_messages_div) do %> +
+<% end %>
diff --git a/app/views/users/sessions/new.html.erb b/app/views/users/sessions/new.html.erb index 6c5ac4936..9f87fcf33 100644 --- a/app/views/users/sessions/new.html.erb +++ b/app/views/users/sessions/new.html.erb @@ -26,7 +26,7 @@ <% end -%>
- <%= f.submit t("devise.sessions.new.submit"), class: "btn btn-default" %> + <%= f.submit t("devise.sessions.new.submit"), class: "btn btn-primary" %>
<% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 082bf5022..594af44f4 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -323,7 +323,7 @@ en: global_sort: "Sorting whole report will undo any custom sorting you might have done. Proceed?" unsaved_work: "Are you sure you want to leave this page? All unsaved data will be lost." no_content_for_PDF_html: "

No content

" - no_permissions: "You don't have permissions on that repository" + no_permissions: "You don't have permission to manage this column" save_PDF_to_inventory_modal: description_one: "Here you can save PDF report to an inventory item." description_two: "First select an inventory, then a column and finally the item within the inventory to which you would like to save the PDF report to. Note that the column has to be of type \"file\"." @@ -1038,6 +1038,7 @@ en: repository_columns: head_title: '%{repository} | Manage Columns' repository_list_items_limit: "Dropdown items limit reached max. %{limit}" + no_permissions: "You don't have permissions on that repository" update: success_flash: "Column %{name} was successfully updated." create: