sufia 4.0.0.beta3 → 4.0.0.beta4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/SUFIA_VERSION +1 -1
- data/app/assets/javascripts/sufia/search.js +4 -6
- data/app/assets/stylesheets/dashboard.css.scss +26 -0
- data/app/assets/stylesheets/header.css.scss +21 -12
- data/app/controllers/batch_controller.rb +0 -1
- data/app/controllers/collections_controller.rb +0 -1
- data/app/controllers/concerns/sufia/catalog.rb +0 -9
- data/app/controllers/concerns/sufia/controller.rb +4 -0
- data/app/controllers/concerns/sufia/dashboard_controller_behavior.rb +24 -74
- data/app/controllers/concerns/sufia/downloads_controller_behavior.rb +0 -3
- data/app/controllers/concerns/sufia/files_controller_behavior.rb +4 -13
- data/app/controllers/concerns/sufia/my_controller_behavior.rb +87 -0
- data/app/controllers/{dashboard → my}/collections_controller.rb +3 -2
- data/app/controllers/{dashboard → my}/files_controller.rb +3 -2
- data/app/controllers/{dashboard → my}/highlights_controller.rb +3 -2
- data/app/controllers/{dashboard → my}/shares_controller.rb +3 -2
- data/app/controllers/my_controller.rb +3 -0
- data/app/controllers/single_use_links_controller.rb +0 -2
- data/app/helpers/dashboard_helper.rb +3 -0
- data/app/helpers/generic_file_helper.rb +4 -4
- data/app/helpers/sufia/dashboard_helper_behavior.rb +25 -0
- data/app/helpers/sufia/sufia_helper_behavior.rb +44 -0
- data/app/jobs/content_delete_event_job.rb +2 -2
- data/app/models/concerns/sufia/solr_document_behavior.rb +5 -0
- data/app/views/_user_util_links.html.erb +5 -5
- data/app/views/catalog/_results_pagination.html.erb +1 -1
- data/app/views/catalog/_search_form.html.erb +56 -28
- data/app/views/collections/_dashboard_document_list.html.erb +1 -1
- data/app/views/collections/_document_list.html.erb +1 -1
- data/app/views/collections/edit.html.erb +8 -11
- data/app/views/collections/show.html.erb +2 -2
- data/app/views/collections/show_fields/_creator.html.erb +11 -0
- data/app/views/collections/show_fields/_description.html.erb +8 -0
- data/app/views/collections/show_fields/_title.html.erb +8 -0
- data/app/views/dashboard/_index_partials/_stats.html.erb +16 -0
- data/app/views/dashboard/_index_partials/_user_info.html.erb +18 -0
- data/app/views/dashboard/index.html.erb +51 -19
- data/app/views/generic_files/_show_descriptions.html.erb +11 -10
- data/app/views/generic_files/show.html.erb +1 -1
- data/app/views/generic_files/show_fields/_based_near.html.erb +7 -0
- data/app/views/generic_files/show_fields/_contributor.html.erb +7 -0
- data/app/views/generic_files/show_fields/_creator.html.erb +7 -0
- data/app/views/generic_files/show_fields/_date_created.html.erb +7 -0
- data/app/views/generic_files/show_fields/_default.html.erb +6 -12
- data/app/views/generic_files/show_fields/_description.html.erb +7 -0
- data/app/views/generic_files/show_fields/_identifier.html.erb +4 -0
- data/app/views/generic_files/show_fields/_language.html.erb +4 -0
- data/app/views/generic_files/show_fields/_publisher.html.erb +7 -0
- data/app/views/generic_files/show_fields/_related_url.html.erb +6 -0
- data/app/views/generic_files/show_fields/_resource_type.html.erb +4 -0
- data/app/views/generic_files/show_fields/_rights.html.erb +4 -0
- data/app/views/generic_files/show_fields/_subject.html.erb +7 -0
- data/app/views/generic_files/show_fields/_tag.html.erb +4 -0
- data/app/views/generic_files/show_fields/_title.html.erb +7 -0
- data/app/views/generic_files/upload/_form_fields.html.erb +4 -5
- data/app/views/generic_files/upload/_script_templates.html.erb +1 -2
- data/app/views/layouts/sufia-dashboard.html.erb +16 -30
- data/app/views/mailbox/_notifications.html.erb +21 -0
- data/app/views/mailbox/index.html.erb +2 -23
- data/app/views/{dashboard → my}/_action_menu.html.erb +0 -0
- data/app/views/{dashboard → my}/_batch_edits_actions.html.erb +0 -0
- data/app/views/{dashboard → my}/_collection_action_menu.html.erb +0 -0
- data/app/views/{dashboard → my}/_did_you_mean.html.erb +0 -0
- data/app/views/my/_document_list.html.erb +4 -0
- data/app/views/{dashboard → my}/_facet_layout.html.erb +0 -0
- data/app/views/{dashboard → my}/_facet_limit.html.erb +0 -0
- data/app/views/{dashboard → my}/_facet_pagination.html.erb +0 -0
- data/app/views/{dashboard → my}/_facet_selected.html.erb +0 -0
- data/app/views/{dashboard → my}/_facets.html.erb +0 -0
- data/app/views/{dashboard → my}/_index_partials/_default_group.html.erb +2 -2
- data/app/views/{dashboard → my}/_index_partials/_list_collections.html.erb +0 -0
- data/app/views/{dashboard → my}/_index_partials/_list_files.html.erb +0 -0
- data/app/views/{dashboard → my}/_results_pagination.html.erb +0 -0
- data/app/views/my/_scripts.js.erb +11 -0
- data/app/views/{dashboard → my}/_sort_and_per_page.html.erb +0 -0
- data/app/views/{dashboard → my}/facet.html.erb +0 -0
- data/app/views/{dashboard/lists → my}/index.html.erb +4 -20
- data/app/views/users/_user_info.html.erb +1 -1
- data/config/initializers/sufia_events.rb +19 -2
- data/config/locales/sufia.en.yml +27 -2
- data/config/routes.rb +7 -11
- data/lib/generators/sufia/sufia_generator.rb +15 -0
- data/lib/generators/sufia/templates/catalog_controller.rb +14 -14
- data/lib/sufia.rb +1 -0
- data/lib/sufia/version.rb +1 -1
- data/spec/controllers/catalog_controller_spec.rb +7 -16
- data/spec/controllers/dashboard_controller_spec.rb +63 -30
- data/spec/controllers/generic_files_controller_spec.rb +1 -1
- data/spec/controllers/{dashboard → my}/collections_controller_spec.rb +1 -15
- data/spec/controllers/my/files_controller_spec.rb +68 -0
- data/spec/controllers/{dashboard → my}/highlights_controller_spec.rb +1 -15
- data/spec/controllers/{dashboard → my}/shares_controller_spec.rb +1 -15
- data/spec/controllers/my_controller_spec.rb +9 -0
- data/spec/features/browse_dashboard_files_spec.rb +72 -26
- data/spec/features/collection_spec.rb +2 -4
- data/spec/features/display_dashboard_spec.rb +20 -26
- data/spec/features/search_spec.rb +25 -13
- data/spec/helpers/dashboard_helper_spec.rb +41 -0
- data/spec/helpers/sufia_helper_spec.rb +104 -3
- data/spec/jobs/event_jobs_spec.rb +1 -1
- data/spec/models/generic_file/web_form_spec.rb +3 -4
- data/spec/models/generic_file_spec.rb +47 -43
- data/spec/routing/route_spec.rb +10 -14
- data/spec/views/batch_edits/check_all_spec.rb +4 -4
- data/spec/views/catalog/sort_and_per_pange.html.erb_spec.rb +27 -0
- data/spec/views/dashboard/index_spec.rb +105 -0
- data/spec/views/{dashboard → my}/facet_limit.html.erb_spec.rb +2 -2
- data/sufia-models/app/actors/sufia/generic_file/actor.rb +23 -3
- data/sufia-models/app/models/concerns/sufia/generic_file.rb +0 -5
- data/sufia-models/app/models/concerns/sufia/generic_file/metadata.rb +9 -2
- data/sufia-models/app/models/concerns/sufia/generic_file/web_form.rb +2 -2
- data/sufia-models/app/models/datastreams/generic_file_rdf_datastream.rb +1 -1
- data/sufia-models/app/services/sufia/noid.rb +21 -16
- data/sufia-models/lib/generators/sufia/models/install_generator.rb +2 -16
- data/sufia-models/lib/generators/sufia/models/templates/config/sufia.rb +23 -0
- data/sufia-models/lib/sufia/models/version.rb +1 -1
- data/sufia-models/sufia-models.gemspec +1 -1
- data/vendor/assets/javascripts/fileupload/jquery.fileupload-ui.js +18 -10
- metadata +68 -45
- data/app/assets/images/glyphicons-halflings-white.png +0 -0
- data/app/assets/images/glyphicons-halflings.png +0 -0
- data/app/controllers/dashboard/lists_controller.rb +0 -13
- data/app/views/dashboard/_constraints.html.erb +0 -6
- data/app/views/dashboard/_document_list.html.erb +0 -4
- data/app/views/dashboard/_heading.html.erb +0 -1
- data/app/views/dashboard/_search_form.html.erb +0 -14
- data/app/views/dashboard/_show_partials/_default.html.erb +0 -20
- data/app/views/dashboard/_show_partials/_default_details.html.erb +0 -15
- data/app/views/dashboard/_show_partials/_facets.html.erb +0 -87
- data/app/views/generic_files/_field_display.html.erb +0 -12
- data/spec/controllers/dashboard/files_controller_spec.rb +0 -71
|
@@ -8,6 +8,10 @@ module GenericFileHelper
|
|
|
8
8
|
[:title, :creator, :tag, :rights].include?(key)
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
+
def render_show_field_partial(key, locals)
|
|
12
|
+
render_show_field_partial_with_action('generic_files', key, locals)
|
|
13
|
+
end
|
|
14
|
+
|
|
11
15
|
def render_edit_field_partial(key, locals)
|
|
12
16
|
render_edit_field_partial_with_action('generic_files', key, locals)
|
|
13
17
|
end
|
|
@@ -16,10 +20,6 @@ module GenericFileHelper
|
|
|
16
20
|
render_edit_field_partial_with_action('batch_edit', key, locals)
|
|
17
21
|
end
|
|
18
22
|
|
|
19
|
-
def render_show_field_partial(key, locals)
|
|
20
|
-
render_show_field_partial_with_action('generic_files', key, locals)
|
|
21
|
-
end
|
|
22
|
-
|
|
23
23
|
def render_download_icon title = nil
|
|
24
24
|
if title.nil?
|
|
25
25
|
link_to download_image_tag, sufia.download_path(@generic_file.id), { target: "_blank", title: "Download the document", id: "file_download", data: { label: @generic_file.id } }
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Sufia
|
|
2
|
+
module DashboardHelperBehavior
|
|
3
|
+
|
|
4
|
+
def render_recent_activity
|
|
5
|
+
if @activity.empty?
|
|
6
|
+
"User has no recent activity"
|
|
7
|
+
else
|
|
8
|
+
render partial: 'users/activity_log', locals: {events: @activity}
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def render_recent_notifications
|
|
13
|
+
if @notifications.empty?
|
|
14
|
+
"User has no notifications"
|
|
15
|
+
else
|
|
16
|
+
render partial: "mailbox/notifications", locals: { messages: @notifications }
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def on_the_dashboard?
|
|
21
|
+
params[:controller].match(/^dashboard|my/)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -94,6 +94,11 @@ module Sufia
|
|
|
94
94
|
end
|
|
95
95
|
end
|
|
96
96
|
|
|
97
|
+
def link_to_telephone(user = nil)
|
|
98
|
+
@user ||= user
|
|
99
|
+
link_to @user.telephone, "wtai://wp/mc;#{@user.telephone}" if @user.telephone
|
|
100
|
+
end
|
|
101
|
+
|
|
97
102
|
# Create a link back to the index screen, keeping the user's facet, query and paging choices intact by using session.
|
|
98
103
|
# We should be able to do away with this method in Blacklight 5
|
|
99
104
|
# @example
|
|
@@ -105,5 +110,44 @@ module Sufia
|
|
|
105
110
|
opts[:label] ||= t('blacklight.back_to_search')
|
|
106
111
|
link_to opts[:label], link_url
|
|
107
112
|
end
|
|
113
|
+
|
|
114
|
+
# Only display the current search parameters if the user is not in the dashboard.
|
|
115
|
+
# If they are in the dashboard, then the search defaults to the user's files and not
|
|
116
|
+
# all of Sufia.
|
|
117
|
+
def current_search_parameters
|
|
118
|
+
if on_the_dashboard?
|
|
119
|
+
return nil
|
|
120
|
+
else
|
|
121
|
+
return params[:q]
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Depending on which page we're landed on, we'll need to set the appropriate action url for
|
|
126
|
+
# our search form.
|
|
127
|
+
def search_form_action
|
|
128
|
+
if on_the_dashboard?
|
|
129
|
+
search_action_for_dashboard
|
|
130
|
+
else
|
|
131
|
+
catalog_index_path
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
private
|
|
136
|
+
|
|
137
|
+
def search_action_for_dashboard
|
|
138
|
+
case params[:controller]
|
|
139
|
+
when "my/files"
|
|
140
|
+
sufia.dashboard_files_path
|
|
141
|
+
when "my/collections"
|
|
142
|
+
sufia.dashboard_collections_path
|
|
143
|
+
when "my/shares"
|
|
144
|
+
sufia.dashboard_shares_path
|
|
145
|
+
when "my/highlights"
|
|
146
|
+
sufia.dashboard_highlights_path
|
|
147
|
+
else
|
|
148
|
+
sufia.dashboard_files_path
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
|
|
108
152
|
end
|
|
109
153
|
end
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
class ContentDeleteEventJob < EventJob
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
def run
|
|
5
|
-
|
|
4
|
+
noid = Sufia::Noid.noidify(generic_file_id)
|
|
5
|
+
action = "User #{link_to_profile depositor_id} has deleted file '#{noid}'"
|
|
6
6
|
timestamp = Time.now.to_i
|
|
7
7
|
depositor = User.find_by_user_key(depositor_id)
|
|
8
8
|
# Create the event
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
|
2
2
|
module Sufia
|
|
3
3
|
module SolrDocumentBehavior
|
|
4
|
+
# Add a schema.org itemtype
|
|
5
|
+
def itemtype
|
|
6
|
+
Sufia.config.resource_types_to_schema[resource_type.first] || 'http://schema.org/CreativeWork'
|
|
7
|
+
end
|
|
8
|
+
|
|
4
9
|
def title_or_label
|
|
5
10
|
title || label
|
|
6
11
|
end
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<% if user_signed_in? %>
|
|
2
2
|
<div class="btn-group" id="user_utility_links">
|
|
3
3
|
<%= render partial: 'users/notify_link' %>
|
|
4
|
-
<a href="<%= sufia.profile_path(current_user) %>" class="btn btn-default " id="profile_link" title="click for User Profile"><
|
|
4
|
+
<a href="<%= sufia.profile_path(current_user) %>" class="btn btn-default " id="profile_link" title="click for User Profile"><span class="glyphicon glyphicon-user"> </span><%= current_user.name %>
|
|
5
5
|
</a>
|
|
6
6
|
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret" title="click for additional menu options"></span></a>
|
|
7
7
|
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
|
8
|
-
<li><%= link_to raw('<
|
|
9
|
-
<li><%= link_to raw('<
|
|
10
|
-
<li><%= link_to raw('<
|
|
8
|
+
<li><%= link_to raw('<span class="glyphicon glyphicon-dashboard"></span> my dashboard'), sufia.dashboard_index_path, id: 'dashboard_nav_link' %></li>
|
|
9
|
+
<li><%= link_to raw('<span class="glyphicon glyphicon-upload"></span> upload'), sufia.new_generic_file_path, id: 'upload_nav_link' %></li>
|
|
10
|
+
<li><%= link_to raw('<span class="glyphicon glyphicon-cog"></span> edit profile'), sufia.edit_profile_path(current_user), id: 'upload_nav_link' %></li>
|
|
11
11
|
<li class="divider"></li>
|
|
12
|
-
<li><%= link_to raw('<
|
|
12
|
+
<li><%= link_to raw('<span class="glyphicon glyphicon-signout"></span> log out'), destroy_user_session_path, id: 'logout_nav_link' %></li>
|
|
13
13
|
</ul>
|
|
14
14
|
</div><!-- /.btn-group -->
|
|
15
15
|
<% else %>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<% if @response.total_pages > 1 %>
|
|
2
2
|
<div class="pager">
|
|
3
|
-
<%= paginate @response, outer_window: 2, theme: 'blacklight'
|
|
3
|
+
<%= paginate @response, outer_window: 2, theme: 'blacklight' %>
|
|
4
4
|
<div class="clearfix"></div>
|
|
5
5
|
</div><!-- /pager -->
|
|
6
6
|
<% end %>
|
|
@@ -1,31 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<%= form_tag search_form_action, method: :get, id: "search-form-header", role: "search" do %>
|
|
2
|
+
<%= render_hash_as_hidden_fields(params_for_search.except(:q, :search_field, :qt, :page, :utf8)) %>
|
|
3
|
+
<div class="container-fluid">
|
|
4
|
+
<div class="row">
|
|
5
5
|
|
|
6
|
-
<div class="
|
|
7
|
-
<div class="
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<%= text_field_tag :q, q, class: "q form-control", id: "search-field-header", placeholder: t('sufia.search.form.q.placeholder') %>
|
|
11
|
-
<%# if this label goes before the search field, it'll mess up the rounded corners %>
|
|
12
|
-
<label class="sr-only" for="search-field-header"><%= t('sufia.search.form.q.label') %></label>
|
|
6
|
+
<div class="col-xs-10">
|
|
7
|
+
<div class="input-group">
|
|
8
|
+
<%= text_field_tag :q, current_search_parameters , class: "q form-control", id: "search-field-header",
|
|
9
|
+
placeholder: t("sufia.search.form.q.placeholder") %>
|
|
13
10
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<ul class="dropdown-menu pull-right">
|
|
17
|
-
<li><a href="#" data-search-option="all" data-search-label="<%= t('sufia.search.form.option.all.label_short') %>"><%= t('sufia.search.form.option.all.label_long') %></a></li>
|
|
18
|
-
<li><a href="#" data-search-option="mine" data-search-label="<%= t('sufia.search.form.option.mine.label_short') %>"><%= t('sufia.search.form.option.mine.label_long') %></a></li>
|
|
19
|
-
</ul>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
<div class="col-lg-2">
|
|
24
|
-
<button type="submit" class="btn btn-primary" id="search-submit-header">
|
|
25
|
-
<i class="glyphicon glyphicon-search"></i> Go
|
|
26
|
-
</button>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
<% end %>
|
|
11
|
+
<%# if this label goes before the search field, it"ll mess up the rounded corners %>
|
|
12
|
+
<label class="sr-only" for="search-field-header"><%= t("sufia.search.form.q.label") %></label>
|
|
30
13
|
|
|
31
|
-
|
|
14
|
+
<div class="input-group-btn">
|
|
15
|
+
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
|
16
|
+
<span data-search-element="label"><%= t("sufia.search.form.option.all.label_long") %></span>
|
|
17
|
+
<span class="caret"></span>
|
|
18
|
+
</button>
|
|
19
|
+
|
|
20
|
+
<ul class="dropdown-menu pull-right">
|
|
21
|
+
<li>
|
|
22
|
+
<%= link_to t("sufia.search.form.option.all.label_long"), "#",
|
|
23
|
+
data: { "search-option" => catalog_index_path, "search-label" => t("sufia.search.form.option.all.label_short") } %>
|
|
24
|
+
</li>
|
|
25
|
+
|
|
26
|
+
<% if current_user %>
|
|
27
|
+
<li>
|
|
28
|
+
<%= link_to t("sufia.search.form.option.my_files.label_long"), "#",
|
|
29
|
+
data: { "search-option" => sufia.dashboard_files_path, "search-label" => t("sufia.search.form.option.my_files.label_short") } %>
|
|
30
|
+
</li>
|
|
31
|
+
<li>
|
|
32
|
+
<%= link_to t("sufia.search.form.option.my_collections.label_long"), "#",
|
|
33
|
+
data: { "search-option" => sufia.dashboard_collections_path, "search-label" => t("sufia.search.form.option.my_collections.label_short") } %>
|
|
34
|
+
</li>
|
|
35
|
+
<li>
|
|
36
|
+
<%= link_to t("sufia.search.form.option.my_highlights.label_long"), "#",
|
|
37
|
+
data: { "search-option" => sufia.dashboard_highlights_path, "search-label" => t("sufia.search.form.option.my_highlights.label_short") } %>
|
|
38
|
+
</li>
|
|
39
|
+
<li>
|
|
40
|
+
<%= link_to t("sufia.search.form.option.my_shares.label_long"), "#",
|
|
41
|
+
data: { "search-option" => sufia.dashboard_shares_path, "search-label" => t("sufia.search.form.option.my_shares.label_short") } %>
|
|
42
|
+
</li>
|
|
43
|
+
<% end %>
|
|
44
|
+
|
|
45
|
+
</ul>
|
|
46
|
+
</div><!-- /.input-group-btn -->
|
|
47
|
+
|
|
48
|
+
</div><!-- /.input-group -->
|
|
49
|
+
</div><!-- /text field dropdown -->
|
|
50
|
+
|
|
51
|
+
<div class="col-xs-2">
|
|
52
|
+
<button type="submit" class="btn btn-primary" id="search-submit-header">
|
|
53
|
+
<span class="glyphicon glyphicon-search"></span> Go
|
|
54
|
+
</button>
|
|
55
|
+
</div><!-- /.go -->
|
|
56
|
+
|
|
57
|
+
</div><!-- /.row -->
|
|
58
|
+
</div><!-- /.container-fluid -->
|
|
59
|
+
<% end %>
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
<% @all_checked = false %>
|
|
4
4
|
<% @max_batch_size = 100 %>
|
|
5
5
|
<% @user = current_user %>
|
|
6
|
-
<%= render partial:
|
|
6
|
+
<%= render partial: "my/_index_partials/default_group", locals: { docs: documents } %>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<% @max_batch_size = 100 %>
|
|
5
5
|
<% @user = current_user %>
|
|
6
6
|
<% if params[:action] == "edit" %>
|
|
7
|
-
<%= render partial:'
|
|
7
|
+
<%= render partial:'my/_index_partials/default_group', locals:{documents: documents, docs:documents} %>
|
|
8
8
|
<% else %>
|
|
9
9
|
<%= render partial:'catalog/_index_partials/default_group', locals:{documents: documents, docs:documents} %>
|
|
10
10
|
<% end %>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<% @page_title = "Edit Collection #{display_title(@collection)} - #{application_name}" %>
|
|
2
2
|
<%= render partial: 'generic_files/breadcrumbs', locals: {
|
|
3
|
-
|
|
3
|
+
include_file: false, generic_file: GenericFile.new(title: @collection.title)
|
|
4
|
+
} %>
|
|
4
5
|
|
|
5
6
|
<h1>Edit Collection: <%= display_title(@collection) %></h1>
|
|
6
7
|
|
|
@@ -15,16 +16,12 @@
|
|
|
15
16
|
</div><!-- /columns second -->
|
|
16
17
|
</div> <!-- /columns two-b -->
|
|
17
18
|
<% end %>
|
|
18
|
-
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<%= render 'collections/sort_and_per_page' %>
|
|
28
|
-
<%= render partial:'document_list', locals: { documents: @member_docs, document_list_format: "dashboard" } %>
|
|
20
|
+
<h2>Manage Items in this Collection</h2>
|
|
21
|
+
<%= render partial: 'search_collection_dashboard_form'%>
|
|
22
|
+
<%= render partial: 'my/did_you_mean' %>
|
|
23
|
+
<%= render partial: 'my/facet_selected' %>
|
|
24
|
+
<%= render 'collections/sort_and_per_page' %>
|
|
25
|
+
<%= render partial:'document_list', locals: { documents: @member_docs, document_list_format: "dashboard" } %>
|
|
29
26
|
|
|
30
27
|
<%= render partial:'paginate' %>
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
<h3><%=@collection.description%> </h3>
|
|
9
9
|
|
|
10
10
|
<% unless has_collection_search_parameters? %>
|
|
11
|
-
<div class="row">
|
|
11
|
+
<div itemscope itemtype="http://schema.org/CollectionPage" class="row">
|
|
12
12
|
<div class="col-xs-12 col-sm-4">
|
|
13
13
|
<%= render partial: 'collections/media_display', locals: { generic_file: @collection } %>
|
|
14
14
|
</div>
|
|
15
15
|
<div class="col-xs-12 col-sm-8"><!-- class="column second"> -->
|
|
16
16
|
<%= render partial: 'collections/show_actions' %>
|
|
17
|
-
<%= render partial: '
|
|
17
|
+
<%= render partial: 'collections/show_descriptions', locals: { generic_file: @collection } %>
|
|
18
18
|
</div><!-- /columns second -->
|
|
19
19
|
</div> <!-- /columns two-b -->
|
|
20
20
|
<% end %>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<tr>
|
|
2
|
+
<th>Creator</th>
|
|
3
|
+
<td>
|
|
4
|
+
<% @collection.creator.each do |creator| %>
|
|
5
|
+
<span itemprop="creator" itemscope itemtype="http://schema.org/Thing">
|
|
6
|
+
<span itemprop="name"><%= link_to_facet(creator, Solrizer.solr_name("properties__creator", :facetable)) %></span>
|
|
7
|
+
</span>
|
|
8
|
+
<br />
|
|
9
|
+
<% end %>
|
|
10
|
+
</td>
|
|
11
|
+
</tr>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<h3><%= t("sufia.dashboard.stats.heading") %></h3>
|
|
2
|
+
|
|
3
|
+
<table class="table table-condensed">
|
|
4
|
+
<tr>
|
|
5
|
+
<td><span class="label label-default"><%= number_of_deposits(@user) %></span></td>
|
|
6
|
+
<td><%= t("sufia.dashboard.stats.deposits") %></td>
|
|
7
|
+
</tr>
|
|
8
|
+
<tr>
|
|
9
|
+
<td><span class="label label-default"><%= @user.all_following.count %></span></td>
|
|
10
|
+
<td><%= t("sufia.dashboard.stats.following") %></td>
|
|
11
|
+
</tr>
|
|
12
|
+
<tr>
|
|
13
|
+
<td><span class="label label-default"><%= @user.followers.count %></span></td>
|
|
14
|
+
<td><%= t("sufia.dashboard.stats.followers") %></td>
|
|
15
|
+
</tr>
|
|
16
|
+
</table>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<div class="row">
|
|
2
|
+
<div class="col-xs-12">
|
|
3
|
+
<h3><%= @user.name %></h3>
|
|
4
|
+
<h5><%= @user.title %></h5>
|
|
5
|
+
<h5><%= @user.department %></h5>
|
|
6
|
+
<h6><%= link_to_telephone %></h6>
|
|
7
|
+
<h6><%= @user.email %></h6>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div class="row">
|
|
12
|
+
<div class="col-xs-6">
|
|
13
|
+
<%= link_to t("sufia.view_profile"), sufia.profile_path(@user), class: "btn btn-info" %>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="col-xs-6">
|
|
16
|
+
<%= link_to t("sufia.edit_profile"), sufia.edit_profile_path(@user), class: "btn btn-info" %>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
@@ -1,21 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<%= content_for :heading do %>
|
|
2
|
+
|
|
3
|
+
<div class="col-xs-12 heading-row">
|
|
4
|
+
<div class="col-xs-3 heading-tile">
|
|
5
|
+
<h1><%= t("sufia.dashboard.title") %></h1>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="col-xs-9 heading-tile">
|
|
8
|
+
<h1><%= t("sufia.dashboard.greeting") + current_user.name %></h1>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<div class="col-xs-12 heading-row">
|
|
13
|
+
<div class="col-xs-4 heading-tile">
|
|
14
|
+
<span class="glyphicon glyphicon-open"></span>
|
|
15
|
+
<%= link_to t("sufia.dashboard.upload"), sufia.new_generic_file_path %>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="col-xs-4 heading-tile">
|
|
18
|
+
<span class="glyphicon glyphicon-folder-open"></span>
|
|
19
|
+
<%= link_to t("sufia.dashboard.create_collection"), collections.new_collection_path %>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="col-xs-4 heading-tile">
|
|
22
|
+
<span class="glyphicon glyphicon-eye-open"></span>
|
|
23
|
+
<%= link_to t("sufia.dashboard.view_files"), sufia.dashboard_files_path %>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<% end %>
|
|
28
|
+
|
|
29
|
+
<%= content_for :sidebar do %>
|
|
30
|
+
|
|
31
|
+
<div class="row">
|
|
32
|
+
<div class="portal"><%= render partial: "dashboard/_index_partials/user_info" %></div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div class="row">
|
|
36
|
+
<div class="portal"><%= render partial: "dashboard/_index_partials/stats" %></div>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
4
39
|
<% end %>
|
|
5
40
|
|
|
6
|
-
<
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
</ul>
|
|
20
|
-
|
|
21
|
-
Totally awesome new dashboard goes here!<br/>
|
|
41
|
+
<div class="row">
|
|
42
|
+
<div class="portal">
|
|
43
|
+
<h3><%= t("sufia.dashboard.user_activity") %></h3>
|
|
44
|
+
<%= render_recent_activity %>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<div class="row">
|
|
49
|
+
<div class="portal">
|
|
50
|
+
<h3><%= t("sufia.dashboard.user_notifications") %></h3>
|
|
51
|
+
<%= render_recent_notifications %>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|