hyrax 2.2.4 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +75 -0
  3. data/README.md +7 -2
  4. data/app/assets/javascripts/hyrax/batch_select_all.js +5 -0
  5. data/app/assets/stylesheets/hyrax/_forms.scss +7 -0
  6. data/app/assets/stylesheets/hyrax/_header.scss +4 -0
  7. data/app/presenters/hyrax/dashboard/user_presenter.rb +1 -1
  8. data/app/services/hyrax/admin_set_service.rb +12 -7
  9. data/app/views/_controls.html.erb +6 -6
  10. data/app/views/catalog/_search_form.html.erb +35 -30
  11. data/app/views/hyrax/batch_select/_add_button.html.erb +2 -2
  12. data/app/views/hyrax/dashboard/_index_partials/_current_proxy_rights.html.erb +12 -14
  13. data/app/views/hyrax/dashboard/_repository_growth.html.erb +30 -0
  14. data/app/views/hyrax/dashboard/_repository_objects.html.erb +28 -0
  15. data/app/views/hyrax/dashboard/_sidebar.html.erb +17 -15
  16. data/app/views/hyrax/dashboard/_user_activity.html.erb +28 -0
  17. data/app/views/hyrax/dashboard/show_admin.html.erb +15 -37
  18. data/app/views/hyrax/dashboard/show_user.html.erb +1 -1
  19. data/app/views/hyrax/embargoes/_list_expired_active_embargoes.html.erb +2 -2
  20. data/app/views/hyrax/my/_search_form.html.erb +15 -10
  21. data/app/views/hyrax/my/_search_header.html.erb +2 -2
  22. data/config/locales/hyrax.de.yml +15 -10
  23. data/config/locales/hyrax.en.yml +15 -10
  24. data/config/locales/hyrax.es.yml +15 -10
  25. data/config/locales/hyrax.fr.yml +15 -10
  26. data/config/locales/hyrax.it.yml +15 -10
  27. data/config/locales/hyrax.pt-BR.yml +15 -10
  28. data/config/locales/hyrax.zh.yml +15 -10
  29. data/hyrax.gemspec +5 -1
  30. data/lib/hyrax/version.rb +1 -1
  31. data/spec/factories/generic_works.rb +2 -2
  32. data/spec/features/admin_spec.rb +5 -5
  33. data/spec/services/hyrax/admin_set_service_spec.rb +95 -46
  34. data/template.rb +1 -1
  35. metadata +34 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a9306e4b4844dbd7eeca0918cc90bbd199bb3ed
4
- data.tar.gz: 4872c02a907df3571ecc9e4d906fa73fcb516919
3
+ metadata.gz: 0df96c169892214d2f731b444c3035513aff1695
4
+ data.tar.gz: 929e779d5ef621a5beae5765230ff1428833dd8a
5
5
  SHA512:
6
- metadata.gz: 88598e671c211babf2a3ecbb20832c5d31599f5d7d2bc1023ff09728850733313bf838c4f1ef79204aa4ee0d05327b61b9299f5c43bee69d1883973e87d83895
7
- data.tar.gz: 58b7bc88ffac9e2202b22f4c3e27af8817733a99522a479d5d565d816240e4b9f86f066ac4e3f3a80c9e8f4aa08c1e0f08754b649a7f4c17bf08b9551dd97fe0
6
+ metadata.gz: deeaf9148d5313e84849d68e129600deb7ea9d84098c504d30f8125793cfaf971e07c6284f5efea1cfbd4425e723a75d46100a2abf9ddc13d61b46f3b5c76786
7
+ data.tar.gz: ecab45fc775aff812ceef8377a9d3f57bf76029b115b648a0ac99dacd02cf304f47351680601e0f113ddcd76cce97823ae9cdd3e6856aaea8eb5c098956b75a4
@@ -0,0 +1,75 @@
1
+ # Ruby CircleCI 2.0 configuration file
2
+ #
3
+ # Check https://circleci.com/docs/2.0/language-ruby/ for more details
4
+ #
5
+ version: 2
6
+ jobs:
7
+ build:
8
+ docker:
9
+ # legacy needed for phantomjs
10
+ - image: circleci/ruby:2.5.1-node-browsers-legacy
11
+ environment:
12
+ RAILS_ENV: test
13
+ RACK_ENV: test
14
+ BUNDLE_JOBS: 4
15
+ BUNDLE_RETRY: 3
16
+ NOKOGIRI_USE_SYSTEM_LIBRARIES: true
17
+ ENGINE_CART_RAILS_OPTIONS: --skip-git --skip-bundle --skip-listen --skip-spring --skip-yarn --skip-keeps --skip-action-cable --skip-coffee --skip-puma --skip-test
18
+ SPEC_OPTS: --format progress --format RspecJunitFormatter --out /tmp/test-results/rspec.xml --format progress
19
+ - image: circleci/redis:4
20
+ # - image: yinlinchen/fcrepo4-docker:4.7.5
21
+ # - image: solr:7
22
+
23
+ # Specify service dependencies here if necessary
24
+ # CircleCI maintains a library of pre-built images
25
+ # documented at https://circleci.com/docs/2.0/circleci-images/
26
+ # - image: circleci/postgres:9.4
27
+
28
+ working_directory: ~/repo
29
+
30
+ steps:
31
+ - run:
32
+ name: Setup Interpolated ENV Variables
33
+ command: |
34
+ echo 'export BUNDLE_PATH="$CIRCLE_WORKING_DIRECTORY/vendor/bundle"' >> $BASH_ENV
35
+
36
+ - checkout
37
+
38
+ # Download and cache dependencies
39
+ - restore_cache:
40
+ keys:
41
+ - v1-dependencies-
42
+
43
+ - run:
44
+ name: install dependencies
45
+ command: |
46
+ gem update --system
47
+ bundle install
48
+ bundle exec rake engine_cart:generate
49
+
50
+ - save_cache:
51
+ paths:
52
+ - ./Gemfile.lock
53
+ - ./vendor/bundle
54
+ - ./.internal_test_app
55
+ key: v1-dependencies-{{ checksum "./.internal_test_app/.generated_engine_cart" }}
56
+
57
+ - run:
58
+ name: Start headless Chrome
59
+ command: google-chrome-stable --headless --disable-gpu --no-sandbox --remote-debugging-port=9222 http://localhost
60
+ background: true
61
+
62
+ - run:
63
+ name: Run tests
64
+ command: |
65
+ mkdir /tmp/test-results
66
+ TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
67
+
68
+ bundle exec rake ci
69
+
70
+ # collect reports
71
+ - store_test_results:
72
+ path: /tmp/test-results
73
+ - store_artifacts:
74
+ path: /tmp/test-results
75
+ destination: test-results
data/README.md CHANGED
@@ -41,6 +41,7 @@ Jump in: [![Slack Status](http://slack.samvera.org/badge.svg)](http://slack.samv
41
41
  * [License](#license)
42
42
  * [Contributing](#contributing)
43
43
  * [Development](#development)
44
+ * [Security](#reporting-security-issues)
44
45
  * [Workflow Relationship Diagram](#workflow-relationship-diagram)
45
46
  * [Release process](#release-process)
46
47
  * [Acknowledgments](#acknowledgments)
@@ -62,7 +63,7 @@ The Samvera community is here to help. Please see our [support guide](./.github/
62
63
  # Getting started
63
64
 
64
65
  This document contains instructions specific to setting up an app with __Hyrax
65
- v2.2.4__. If you are looking for instructions on installing a different
66
+ v2.3.0__. If you are looking for instructions on installing a different
66
67
  version, be sure to select the appropriate branch or tag from the drop-down
67
68
  menu above.
68
69
 
@@ -161,7 +162,7 @@ NOTE: The steps need to be done in order to create a new Hyrax based app.
161
162
  Generate a new Rails application using the template.
162
163
 
163
164
  ```
164
- rails _5.1.6_ new my_app -m https://raw.githubusercontent.com/samvera/hyrax/v2.2.4/template.rb
165
+ rails _5.1.6_ new my_app -m https://raw.githubusercontent.com/samvera/hyrax/v2.3.0/template.rb
165
166
  ```
166
167
 
167
168
  Generating a new Rails application using Hyrax's template above takes cares of a number of steps for you, including:
@@ -326,6 +327,10 @@ If you'd like to help the development effort and you're not sure where to get st
326
327
 
327
328
  The [Hyrax Development Guide](https://github.com/samvera/hyrax/wiki/Hyrax-Development-Guide) is for people who want to modify Hyrax itself, not an application that uses Hyrax.
328
329
 
330
+ ## Reporting Security Issues
331
+
332
+ To report a security vulnerability, email [samvera-steering@googlegroups.com](mailto:samvera-steering@googlegroups.com) and the Steering Group will coordinate the community response. In your message, please document to the best of your ability cases (relevant software versions, conditions, etc.) where the vulnerability is applicable, the potential negative effects, and any known workarounds or fixes to mitigate the risk. Steering will communicate this to the Partners and the rest of the community in a timely fashion.
333
+
329
334
  ## Workflow Relationship Diagram
330
335
 
331
336
  * [Entity Relationship Diagram](./artifacts/entity-relationship-diagram.pdf)
@@ -75,6 +75,11 @@ Blacklight.onLoad(function() {
75
75
 
76
76
  // check all check boxes
77
77
  $("#check_all").bind('click', check_all_page);
78
+
79
+ // select/deselect all check boxes
80
+ $("#checkAllBox").change(function () {
81
+ $("input:checkbox").prop('checked', $(this).prop("checked"));
82
+ });
78
83
 
79
84
  // toggle button on or off based on boxes being clicked
80
85
  $(".batch_document_selector").bind('click', function(e) {
@@ -164,3 +164,10 @@ form.button-to {
164
164
  margin-bottom: 0;
165
165
  padding: 7px 15px;
166
166
  }
167
+
168
+ .search-form {
169
+
170
+ .form-group {
171
+ margin: 0;
172
+ }
173
+ }
@@ -17,6 +17,10 @@ header > .navbar {
17
17
 
18
18
  .searchbar-right {
19
19
  margin-right: 0;
20
+
21
+ label {
22
+ color: #ffffff;
23
+ }
20
24
  }
21
25
 
22
26
  // We need these ancestor selectors to override Bootstrap and push
@@ -42,7 +42,7 @@ module Hyrax
42
42
  end
43
43
 
44
44
  def link_to_manage_proxies
45
- link_to t('hyrax.dashboard.manage_proxies'), hyrax.depositors_path
45
+ link_to t('hyrax.dashboard.manage_proxies'), hyrax.depositors_path, aria: { label: t('hyrax.dashboard.manage_proxies') }
46
46
  end
47
47
 
48
48
  private
@@ -33,10 +33,11 @@ module Hyrax
33
33
  results = ActiveFedora::SolrService.instance.conn.get(
34
34
  ActiveFedora::SolrService.select_path,
35
35
  params: { fq: query,
36
+ rows: 0,
36
37
  'facet.field' => join_field }
37
38
  )
38
39
  counts = results['facet_counts']['facet_fields'][join_field].each_slice(2).to_h
39
- file_counts = count_files(results)
40
+ file_counts = count_files(admin_sets)
40
41
  admin_sets.map do |admin_set|
41
42
  SearchResultForWorkCount.new(admin_set, counts[admin_set.id].to_i, file_counts[admin_set.id].to_i)
42
43
  end
@@ -50,14 +51,18 @@ module Hyrax
50
51
  end
51
52
 
52
53
  # Count number of files from admin set works
53
- # @param [Array] results Solr search result
54
+ # @param [Array] AdminSets to count files in
54
55
  # @return [Hash] admin set id keys and file count values
55
- def count_files(results)
56
+ def count_files(admin_sets)
56
57
  file_counts = Hash.new(0)
57
- results['response']['docs'].each do |doc|
58
- doc['isPartOf_ssim'].each do |id|
59
- file_counts[id] += doc.fetch('file_set_ids_ssim', []).length
60
- end
58
+ admin_sets.each do |admin_set|
59
+ query = "{!join from=file_set_ids_ssim to=id}isPartOf_ssim:#{admin_set.id}"
60
+ file_results = ActiveFedora::SolrService.instance.conn.get(
61
+ ActiveFedora::SolrService.select_path,
62
+ params: { fq: [query, "has_model_ssim:FileSet"],
63
+ rows: 0 }
64
+ )
65
+ file_counts[admin_set.id] = file_results['response']['numFound']
61
66
  end
62
67
  file_counts
63
68
  end
@@ -1,17 +1,17 @@
1
1
  <nav class="navbar navbar-default navbar-static-top" role="navigation">
2
2
  <div class="container-fluid">
3
3
  <div class="row">
4
- <ul class="nav navbar-nav col-sm-5 col-md-6">
4
+ <ul class="nav navbar-nav col-sm-5">
5
5
  <li <%= 'class=active' if current_page?(hyrax.root_path) %>>
6
- <%= link_to t(:'hyrax.controls.home'), hyrax.root_path %></li>
6
+ <%= link_to t(:'hyrax.controls.home'), hyrax.root_path, aria: current_page?(hyrax.root_path) ? {current: 'page'} : nil %></li>
7
7
  <li <%= 'class=active' if current_page?(hyrax.about_path) %>>
8
- <%= link_to t(:'hyrax.controls.about'), hyrax.about_path %></li>
8
+ <%= link_to t(:'hyrax.controls.about'), hyrax.about_path, aria: current_page?(hyrax.about_path) ? {current: 'page'} : nil %></li>
9
9
  <li <%= 'class=active' if current_page?(hyrax.help_path) %>>
10
- <%= link_to t(:'hyrax.controls.help'), hyrax.help_path %></li>
10
+ <%= link_to t(:'hyrax.controls.help'), hyrax.help_path, aria: current_page?(hyrax.help_path) ? {current: 'page'} : nil %></li>
11
11
  <li <%= 'class=active' if current_page?(hyrax.contact_path) %>>
12
- <%= link_to t(:'hyrax.controls.contact'), hyrax.contact_path %></li>
12
+ <%= link_to t(:'hyrax.controls.contact'), hyrax.contact_path, aria: current_page?(hyrax.contact_path) ? {current: 'page'} : nil %></li>
13
13
  </ul><!-- /.nav -->
14
- <div class="searchbar-right navbar-right col-sm-7 col-md-6">
14
+ <div class="searchbar-right navbar-right col-sm-7">
15
15
  <%= render partial: 'catalog/search_form' %>
16
16
  </div>
17
17
  </div>
@@ -1,40 +1,45 @@
1
- <%= form_tag search_form_action, method: :get, id: "search-form-header", role: "search" do %>
1
+ <%= form_tag search_form_action, method: :get, class: "form-horizontal search-form", id: "search-form-header", role: "search" do %>
2
2
  <%= render_hash_as_hidden_fields(search_state.params_for_search.except(:q, :search_field, :qt, :page, :utf8)) %>
3
3
  <%= hidden_field_tag :search_field, 'all_fields' %>
4
- <div class="input-group">
4
+ <div class="form-group">
5
5
 
6
- <label class="sr-only" for="search-field-header"><%= t("hyrax.search.form.q.label", application_name: application_name) %></label>
7
- <%= text_field_tag :q, current_search_parameters , class: "q form-control", id: "search-field-header", placeholder: t("hyrax.search.form.q.placeholder") %>
6
+ <label class="control-label col-sm-3" for="search-field-header">
7
+ <%= t("hyrax.search.form.q.label", application_name: application_name) %>
8
+ </label>
8
9
 
9
- <div class="input-group-btn">
10
- <button type="submit" class="btn btn-primary" id="search-submit-header">
11
- <%= t('hyrax.search.button.html') %>
12
- </button>
13
- <% if current_user %>
14
- <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false">
10
+ <div class="input-group">
11
+ <%= text_field_tag :q, current_search_parameters , class: "q form-control", id: "search-field-header", placeholder: t("hyrax.search.form.q.placeholder") %>
15
12
 
16
- <span class="sr-only" data-search-element="label"><%= t("hyrax.search.form.option.all.label_long", application_name: application_name) %></span>
17
- <span aria-hidden="true"><%= t("hyrax.search.form.option.all.label_short") %></span>
18
- <span class="caret"></span>
13
+ <div class="input-group-btn">
14
+ <button type="submit" class="btn btn-primary" id="search-submit-header">
15
+ <%= t('hyrax.search.button.html') %>
19
16
  </button>
17
+ <% if current_user %>
18
+ <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false">
20
19
 
21
- <ul class="dropdown-menu pull-right">
22
- <li>
23
- <%= link_to t("hyrax.search.form.option.all.label_long", application_name: application_name), "#",
24
- data: { "search-option" => main_app.search_catalog_path, "search-label" => t("hyrax.search.form.option.all.label_short") } %>
25
- </li>
26
- <li>
27
- <%= link_to t("hyrax.search.form.option.my_works.label_long"), "#",
28
- data: { "search-option" => hyrax.my_works_path, "search-label" => t("hyrax.search.form.option.my_works.label_short") } %>
29
- </li>
30
- <li>
31
- <%= link_to t("hyrax.search.form.option.my_collections.label_long"), "#",
32
- data: { "search-option" => hyrax.my_collections_path, "search-label" => t("hyrax.search.form.option.my_collections.label_short") } %>
33
- </li>
34
- <% end %>
20
+ <span class="sr-only" data-search-element="label"><%= t("hyrax.search.form.option.all.label_long", application_name: application_name) %></span>
21
+ <span aria-hidden="true"><%= t("hyrax.search.form.option.all.label_short") %></span>
22
+ <span class="caret"></span>
23
+ </button>
35
24
 
36
- </ul>
37
- </div><!-- /.input-group-btn -->
25
+ <ul class="dropdown-menu pull-right">
26
+ <li>
27
+ <%= link_to t("hyrax.search.form.option.all.label_long", application_name: application_name), "#",
28
+ data: { "search-option" => main_app.search_catalog_path, "search-label" => t("hyrax.search.form.option.all.label_short") } %>
29
+ </li>
30
+ <li>
31
+ <%= link_to t("hyrax.search.form.option.my_works.label_long"), "#",
32
+ data: { "search-option" => hyrax.my_works_path, "search-label" => t("hyrax.search.form.option.my_works.label_short") } %>
33
+ </li>
34
+ <li>
35
+ <%= link_to t("hyrax.search.form.option.my_collections.label_long"), "#",
36
+ data: { "search-option" => hyrax.my_collections_path, "search-label" => t("hyrax.search.form.option.my_collections.label_short") } %>
37
+ </li>
38
+ <% end %>
38
39
 
39
- </div><!-- /.input-group -->
40
+ </ul>
41
+ </div><!-- /.input-group-btn -->
42
+ </div><!-- /.input-group -->
43
+
44
+ </div><!-- /.form-group -->
40
45
  <% end %>
@@ -1,3 +1,3 @@
1
1
  <div data-behavior="batch-add-button">
2
- <%= check_box_tag "batch_document_ids[]", document.id, true, class:"batch_document_selector", id: "batch_document_#{document.id}" %>
3
- </div>
2
+ <%= check_box_tag "batch_document_ids[]", document.id, false, class:"batch_document_selector", id: "batch_document_#{document.id}" %>
3
+ </div>
@@ -1,17 +1,15 @@
1
- <div class="clearfix proxy-rights">
2
- <div class="row">
3
- <div class="col-xs-6">
4
- <table class="table table-condensed table-striped" id="authorizedProxies">
5
- <tbody>
6
- <% if user.can_receive_deposits_from.count == 0 %>
7
- <%= t('hyrax.dashboard.no_proxies') %>
8
- <% else %>
9
- <% user.can_receive_deposits_from.each do |depositor| %>
10
- <tr><td class="depositor-name"><%= depositor.name %></td></tr>
11
- <% end %>
1
+ <div class="row proxy-rights">
2
+ <div class="col-xs-6">
3
+ <table class="table table-condensed table-striped" id="authorizedProxies">
4
+ <tbody>
5
+ <% if user.can_receive_deposits_from.count == 0 %>
6
+ <%= t('hyrax.dashboard.no_proxies') %>
7
+ <% else %>
8
+ <% user.can_receive_deposits_from.each do |depositor| %>
9
+ <tr><td class="depositor-name"><%= depositor.name %></td></tr>
12
10
  <% end %>
13
- </tbody>
14
- </table>
15
- </div>
11
+ <% end %>
12
+ </tbody>
13
+ </table>
16
14
  </div>
17
15
  </div>
@@ -0,0 +1,30 @@
1
+ <div class="panel-heading">
2
+ <h3 class="panel-title"><%= t('.title') %></h3>
3
+ <div><%= t('.subtitle') %></div>
4
+ </div>
5
+ <div class="panel-body text-center">
6
+ <% repository_growth = @presenter.repository_growth.to_json %>
7
+ <div id="dashboard-growth" aria-hidden="true" style="height: 200px"><script>
8
+ //<![CDATA[
9
+ Hyrax.statistics.repositoryGrowth = <%== repository_growth %>
10
+ //]]>
11
+ </script></div>
12
+ <table aria-label="<%= t('.title') %>, <%= t('.subtitle') %>" class="table table-striped sr-only text-left">
13
+ <thead>
14
+ <tr>
15
+ <th><%= t('.date') %></th>
16
+ <th><%= t('.objects') %></th>
17
+ <th><%= t('.collections') %></th>
18
+ </tr>
19
+ </thead>
20
+ <tbody>
21
+ <% JSON.parse(repository_growth).each do |row| %>
22
+ <tr>
23
+ <td><%= row["y"] %></td>
24
+ <td><%= row["a"] %></td>
25
+ <td><%= row["b"] %></td>
26
+ </tr>
27
+ <% end %>
28
+ </tbody>
29
+ </table>
30
+ </div>
@@ -0,0 +1,28 @@
1
+ <div class="panel-heading">
2
+ <h3 class="panel-title"><%= t('.title') %></h3>
3
+ <div><%= t('.subtitle') %></div>
4
+ </div>
5
+ <div class="panel-body text-center">
6
+ <% repository_objects = @presenter.repository_objects.to_json %>
7
+ <div id="dashboard-repository-objects" aria-hidden="true" style="height: 200px"><script>
8
+ //<![CDATA[
9
+ Hyrax.statistics.repositoryObjects = <%== repository_objects %>
10
+ //]]>
11
+ </script></div>
12
+ <table aria-label="<%= t('.title') %>, <%= t('.subtitle') %>" class="table table-striped sr-only text-left">
13
+ <thead>
14
+ <tr>
15
+ <th><%= t('.status') %></th>
16
+ <th></th>
17
+ </tr>
18
+ </thead>
19
+ <tbody>
20
+ <% JSON.parse(repository_objects).each do |row| %>
21
+ <tr>
22
+ <td><%= row["label"] %></td>
23
+ <td><%= row["value"] %></td>
24
+ </tr>
25
+ <% end %>
26
+ </tbody>
27
+ </table>
28
+ </div>
@@ -1,19 +1,21 @@
1
1
  <% menu = Hyrax::MenuPresenter.new(self) %>
2
2
  <div class="sidebar-toggle"><span class="fa fa-chevron-circle-right"></span></div>
3
- <ul class="nav nav-pills nav-stacked">
4
- <li>
5
- <div class="profile">
6
- <div class="profile-image">
7
- <%= image_tag current_user.avatar.url(:thumb), width: 100 if current_user.avatar.present? %>
3
+ <nav>
4
+ <ul class="nav nav-pills nav-stacked">
5
+ <li>
6
+ <div class="profile">
7
+ <div class="profile-image">
8
+ <%= image_tag current_user.avatar.url(:thumb), width: 100 if current_user.avatar.present? %>
9
+ </div>
10
+ <div class="profile-data">
11
+ <div class="profile-data-name"><%= current_user.name %></div>
12
+ </div>
8
13
  </div>
9
- <div class="profile-data">
10
- <div class="profile-data-name"><%= current_user.name %></div>
11
- </div>
12
- </div>
13
- </li>
14
+ </li>
14
15
 
15
- <%= render 'hyrax/dashboard/sidebar/activity', menu: menu %>
16
- <%= render 'hyrax/dashboard/sidebar/repository_content', menu: menu %>
17
- <%= render 'hyrax/dashboard/sidebar/tasks', menu: menu %>
18
- <%= render 'hyrax/dashboard/sidebar/configuration', menu: menu %>
19
- </ul>
16
+ <%= render 'hyrax/dashboard/sidebar/activity', menu: menu %>
17
+ <%= render 'hyrax/dashboard/sidebar/repository_content', menu: menu %>
18
+ <%= render 'hyrax/dashboard/sidebar/tasks', menu: menu %>
19
+ <%= render 'hyrax/dashboard/sidebar/configuration', menu: menu %>
20
+ </ul>
21
+ </nav>
@@ -0,0 +1,28 @@
1
+ <div class="panel-heading">
2
+ <h3 class="panel-title"><%= t('.title') %></h3>
3
+ <div><%= t('.subtitle') %></div>
4
+ </div>
5
+ <div class="panel-body text-center">
6
+ <% user_activity = @presenter.user_activity.to_json %>
7
+ <div id="user-activity" aria-hidden="true" style="height: 200px"><script>
8
+ //<![CDATA[
9
+ Hyrax.statistics.userActivity = <%== user_activity %>
10
+ //]]>
11
+ </script></div>
12
+ <table aria-label="<%= t('.title') %>, <%= t('.subtitle') %>" class="table table-striped sr-only text-left">
13
+ <thead>
14
+ <tr>
15
+ <th><%= t('.date') %></th>
16
+ <th><%= t('.new_users') %></th>
17
+ </tr>
18
+ </thead>
19
+ <tbody>
20
+ <% JSON.parse(user_activity).each do |row| %>
21
+ <tr>
22
+ <td><%= row["y"] %></td>
23
+ <td><%= row["a"] %></td>
24
+ </tr>
25
+ <% end %>
26
+ </tbody>
27
+ </table>
28
+ </div>