diff --git a/app/assets/javascripts/repositories/index.js b/app/assets/javascripts/repositories/index.js index 8fbf031d3..d9752b1a1 100644 --- a/app/assets/javascripts/repositories/index.js +++ b/app/assets/javascripts/repositories/index.js @@ -47,7 +47,7 @@ destroy: true, columnDefs: [{ targets: 0, - visible: true, + visible: !$('.repositories-index').data('readonly'), searchable: false, orderable: false, render: function() { diff --git a/app/assets/stylesheets/repository/index.scss b/app/assets/stylesheets/repository/index.scss index 19f008d0c..1d90107c0 100644 --- a/app/assets/stylesheets/repository/index.scss +++ b/app/assets/stylesheets/repository/index.scss @@ -1,13 +1,25 @@ .repositories-index { &.active { [data-view-mode="archived"] { - display: none + display: none; } } &.archived { [data-view-mode="active"] { - display: none + display: none; + } + } + + &[data-readonly="true"] { + .main-actions { + .toolbar { + display: none; + } + + .filter-container { + margin-left: auto; + } } } } diff --git a/app/views/repositories/index.html.erb b/app/views/repositories/index.html.erb index fdcd7fa5d..aecd7597e 100644 --- a/app/views/repositories/index.html.erb +++ b/app/views/repositories/index.html.erb @@ -3,7 +3,8 @@ <% if current_team %> <%= render partial: "sidebar", locals: { repositories: @repositories, archived: params[:archived] } %> -
+

<%= t('libraries.index.head_title') %>

<%= t('libraries.index.head_title_archived') %>

@@ -26,8 +27,7 @@