enju_bookmark 0.1.2.pre14 → 0.1.2.pre15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/bookmark_stat_has_manifestations_controller.rb +12 -12
- data/app/controllers/bookmark_stats_controller.rb +13 -13
- data/app/controllers/bookmarks_controller.rb +18 -19
- data/app/controllers/tags_controller.rb +6 -7
- data/app/models/bookmark.rb +12 -12
- data/app/models/bookmark_stat.rb +20 -12
- data/app/models/bookmark_stat_has_manifestation.rb +2 -2
- data/app/models/bookmark_stat_state_machine.rb +13 -0
- data/app/models/bookmark_stat_transition.rb +20 -0
- data/app/models/tag.rb +5 -5
- data/app/views/bookmark_stat_has_manifestations/edit.html.erb +3 -3
- data/app/views/bookmark_stat_has_manifestations/index.html.erb +5 -5
- data/app/views/bookmark_stat_has_manifestations/new.html.erb +3 -3
- data/app/views/bookmark_stat_has_manifestations/show.html.erb +3 -3
- data/app/views/bookmark_stats/edit.html.erb +3 -3
- data/app/views/bookmark_stats/index.html.erb +6 -6
- data/app/views/bookmark_stats/new.html.erb +3 -3
- data/app/views/bookmark_stats/show.html.erb +6 -6
- data/app/views/bookmarks/_index.html.erb +8 -8
- data/app/views/bookmarks/_index_user.html.erb +9 -9
- data/app/views/bookmarks/_tag_cloud.html.erb +1 -1
- data/app/views/bookmarks/edit.html.erb +8 -8
- data/app/views/bookmarks/new.html.erb +7 -7
- data/app/views/bookmarks/show.html.erb +7 -7
- data/app/views/manifestations/_bookmarks_for_this_manifestation.html.erb +3 -3
- data/app/views/manifestations/_show_tag.html.erb +1 -1
- data/app/views/manifestations/_tag_edit.html.erb +8 -8
- data/app/views/manifestations/_tag_list.html.erb +2 -2
- data/app/views/tags/edit.html.erb +5 -5
- data/app/views/tags/index.atom.builder +2 -2
- data/app/views/tags/index.html.erb +8 -8
- data/app/views/tags/index.rss.builder +5 -5
- data/app/views/tags/show.html.erb +6 -6
- data/config/routes.rb +0 -3
- data/db/migrate/20081212151614_create_bookmark_stats.rb +0 -3
- data/db/migrate/20140812093836_add_share_bookmarks_to_profile.rb +5 -0
- data/lib/enju_bookmark.rb +2 -0
- data/lib/enju_bookmark/engine.rb +1 -1
- data/lib/enju_bookmark/profile.rb +13 -0
- data/lib/enju_bookmark/user.rb +2 -0
- data/lib/enju_bookmark/version.rb +1 -1
- data/spec/controllers/bookmark_stat_has_manifestations_controller_spec.rb +21 -21
- data/spec/controllers/bookmark_stats_controller_spec.rb +21 -21
- data/spec/controllers/bookmarks_controller_spec.rb +5 -11
- data/spec/controllers/tags_controller_spec.rb +15 -15
- data/spec/dummy/config/initializers/statesman.rb +3 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/001_create_agents.rb +0 -3
- data/spec/dummy/db/migrate/005_create_manifestations.rb +7 -19
- data/spec/dummy/db/migrate/006_create_items.rb +0 -3
- data/spec/dummy/db/migrate/041_create_roles.rb +13 -0
- data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +0 -2
- data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +1 -3
- data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +0 -1
- data/spec/dummy/db/migrate/{20111201163718_create_user_has_roles.rb → 20100606065209_create_user_has_roles.rb} +2 -0
- data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +0 -2
- data/spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb +6 -0
- data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +1 -11
- data/spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb +7 -0
- data/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb +5 -0
- data/spec/dummy/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb +6 -0
- data/spec/dummy/db/migrate/{20111201121844_create_roles.rb → 20130506175303_create_identifier_types.rb} +2 -2
- data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +15 -0
- data/spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +18 -0
- data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +11 -0
- data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +20 -0
- data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +11 -0
- data/spec/dummy/db/migrate/20140614065404_create_resource_export_files.rb +11 -0
- data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140628073535_add_user_encoding_to_resource_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +11 -0
- data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +14 -0
- data/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb +8 -0
- data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb +5 -0
- data/spec/dummy/db/migrate/{20121119153944_add_manifestation_id_to_item.rb → 20140802082007_add_manifestation_id_to_item.rb} +1 -0
- data/spec/dummy/db/schema.rb +215 -55
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/solr/default/data/index/segments.gen +0 -0
- data/spec/dummy/solr/default/data/index/segments_1bi +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001699 +0 -0
- data/spec/dummy/solr/default/data/tlog/{tlog.0000000000000000905 → tlog.0000000000000001700} +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001701 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001702 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001703 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001704 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001705 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001706 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001707 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000001708 +0 -0
- data/spec/factories/profile.rb +10 -0
- data/spec/factories/user.rb +0 -13
- data/spec/fixtures/agents.yml +0 -12
- data/spec/fixtures/bookmark_stats.yml +0 -4
- data/spec/fixtures/items.yml +60 -21
- data/spec/fixtures/manifestations.yml +42 -178
- data/spec/fixtures/profiles.yml +99 -0
- data/spec/fixtures/users.yml +3 -29
- data/spec/models/bookmark_spec.rb +1 -1
- data/spec/models/bookmark_stat_spec.rb +1 -3
- data/spec/spec_helper.rb +2 -0
- metadata +117 -42
- data/app/models/bookmark_sweeper.rb +0 -21
- data/spec/dummy/db/migrate/20110916053430_rename_manifestation_number_list_to_number_string.rb +0 -13
- data/spec/dummy/db/migrate/20120415060308_rename_resource_import_file_imported_at_to_executed_at.rb +0 -9
- data/spec/dummy/solr/default/data/index/segments_pf +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000904 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000906 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000907 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000908 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000909 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000910 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000911 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000912 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000913 +0 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
class BookmarkStatTransition < ActiveRecord::Base
|
2
|
+
include Statesman::Adapters::ActiveRecordTransition
|
3
|
+
|
4
|
+
|
5
|
+
belongs_to :bookmark_stat, inverse_of: :bookmark_stat_transitions
|
6
|
+
attr_accessible :to_state, :sort_key, :metadata
|
7
|
+
end
|
8
|
+
|
9
|
+
# == Schema Information
|
10
|
+
#
|
11
|
+
# Table name: bookmark_stat_transitions
|
12
|
+
#
|
13
|
+
# id :integer not null, primary key
|
14
|
+
# to_state :string(255)
|
15
|
+
# metadata :text default("{}")
|
16
|
+
# sort_key :integer
|
17
|
+
# bookmark_stat_id :integer
|
18
|
+
# created_at :datetime not null
|
19
|
+
# updated_at :datetime not null
|
20
|
+
#
|
data/app/models/tag.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
class Tag < ActiveRecord::Base
|
2
2
|
attr_accessible :name, :name_transcription
|
3
|
-
has_many :taggings, :
|
4
|
-
validates :name, :
|
3
|
+
has_many :taggings, dependent: :destroy, class_name: 'ActsAsTaggableOn::Tagging'
|
4
|
+
validates :name, presence: true
|
5
5
|
after_save :save_taggings
|
6
6
|
after_destroy :save_taggings
|
7
7
|
|
@@ -13,7 +13,7 @@ class Tag < ActiveRecord::Base
|
|
13
13
|
string :name
|
14
14
|
time :created_at
|
15
15
|
time :updated_at
|
16
|
-
integer :bookmark_ids, :
|
16
|
+
integer :bookmark_ids, multiple: true do
|
17
17
|
tagged(Bookmark).compact.collect(&:id)
|
18
18
|
end
|
19
19
|
integer :taggings_count do
|
@@ -36,7 +36,7 @@ class Tag < ActiveRecord::Base
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def save_taggings
|
39
|
-
|
39
|
+
taggings.collect(&:taggable).each do |t| t.save end
|
40
40
|
end
|
41
41
|
|
42
42
|
def tagged(taggable_type)
|
@@ -53,5 +53,5 @@ end
|
|
53
53
|
# name_transcription :string(255)
|
54
54
|
# created_at :datetime not null
|
55
55
|
# updated_at :datetime not null
|
56
|
+
# taggings_count :integer default(0)
|
56
57
|
#
|
57
|
-
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
2
|
-
<h1 class="title"><%= t('page.editing', :
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
+
<h1 class="title"><%= t('page.editing', model: t('activerecord.models.bookmark_stat_has_manifestation')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<%= render 'form' %>
|
5
5
|
</div>
|
6
6
|
</div>
|
7
7
|
|
8
|
-
<div id="submenu" class="ui-corner-all">
|
8
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
9
9
|
<ul>
|
10
10
|
<li><%= link_to t('page.show'), @bookmark_stat_has_manifestation -%></li>
|
11
11
|
<li><%= link_to t('page.back'), bookmark_stat_has_manifestations_path -%></li>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
2
|
-
<h1 class="title"><%= t('page.listing', :
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
+
<h1 class="title"><%= t('page.listing', model: t('activerecord.models.bookmark_stat_has_manifestation')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
|
5
5
|
<table class="table table-striped index">
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<td><%= bookmark_stat_has_manifestation.bookmarks_count -%></td>
|
17
17
|
<td><%= link_to t('page.show'), bookmark_stat_has_manifestation -%></td>
|
18
18
|
<td><%= link_to t('page.edit'), edit_bookmark_stat_has_manifestation_path(bookmark_stat_has_manifestation) -%></td>
|
19
|
-
<td><%= link_to t('page.destroy'), bookmark_stat_has_manifestation, :
|
19
|
+
<td><%= link_to t('page.destroy'), bookmark_stat_has_manifestation, data: {confirm: t('page.are_you_sure')}, method: :delete -%></td>
|
20
20
|
</tr>
|
21
21
|
<%- end -%>
|
22
22
|
</table>
|
@@ -25,8 +25,8 @@
|
|
25
25
|
</div>
|
26
26
|
</div>
|
27
27
|
|
28
|
-
<div id="submenu" class="ui-corner-all">
|
28
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
29
29
|
<ul>
|
30
|
-
<li><%= link_to t('page.new', :
|
30
|
+
<li><%= link_to t('page.new', model: t('activerecord.models.bookmark_stat_has_manifestation')), new_bookmark_stat_has_manifestation_path -%></li>
|
31
31
|
</ul>
|
32
32
|
</div>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
2
|
-
<h1 class="title"><%= t('page.new', :
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
+
<h1 class="title"><%= t('page.new', model: t('activerecord.models.bookmark_stat_has_manifestation')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<%= render 'form' %>
|
5
5
|
</div>
|
6
6
|
</div>
|
7
7
|
|
8
|
-
<div id="submenu" class="ui-corner-all">
|
8
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
9
9
|
<ul>
|
10
10
|
<li><%= link_to t('page.back'), bookmark_stat_has_manifestations_path -%></li>
|
11
11
|
</ul>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
2
|
-
<h1 class="title"><%= t('page.showing', :
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
+
<h1 class="title"><%= t('page.showing', model: t('activerecord.models.bookmark_stat_has_manifestation')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<p id="notice"><%= notice %></p>
|
5
5
|
|
@@ -21,7 +21,7 @@
|
|
21
21
|
</div>
|
22
22
|
</div>
|
23
23
|
|
24
|
-
<div id="submenu" class="ui-corner-all">
|
24
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
25
25
|
<ul>
|
26
26
|
<li><%= link_to t('page.edit'), edit_bookmark_stat_has_manifestation_path(@bookmark_stat_has_manifestation) -%></li>
|
27
27
|
<li><%= back_to_index(flash[:page_info]) -%></li>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
2
|
-
<h1 class="title"><%= t('page.editing', :
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
+
<h1 class="title"><%= t('page.editing', model: t('activerecord.models.bookmark_stat')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<%= render 'form' %>
|
5
5
|
</div>
|
6
6
|
</div>
|
7
7
|
|
8
|
-
<div id="submenu" class="ui-corner-all">
|
8
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
9
9
|
<ul>
|
10
10
|
<li><%= link_to t('page.show'), @bookmark_stat -%></li>
|
11
11
|
<li><%= link_to t('page.back'), bookmark_stats_path -%></li>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
2
|
-
<h1 class="title"><%= t('page.listing', :
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
+
<h1 class="title"><%= t('page.listing', model: t('activerecord.models.bookmark_stat')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
|
5
5
|
<table class="table table-striped index">
|
@@ -14,11 +14,11 @@
|
|
14
14
|
<tr class="line<%= cycle("0", "1") -%>">
|
15
15
|
<td><%= l(bookmark_stat.start_date) -%></td>
|
16
16
|
<td><%= l(bookmark_stat.end_date) -%></td>
|
17
|
-
<td><%= bookmark_stat.
|
17
|
+
<td><%= bookmark_stat.current_state -%></td>
|
18
18
|
<td>
|
19
19
|
<%= link_to t('page.show'), bookmark_stat -%>
|
20
20
|
<%= link_to t('page.edit'), edit_bookmark_stat_path(bookmark_stat) -%>
|
21
|
-
<%= link_to t('page.destroy'), bookmark_stat, :
|
21
|
+
<%= link_to t('page.destroy'), bookmark_stat, data: {confirm: t('page.are_you_sure')}, method: :delete -%>
|
22
22
|
</td>
|
23
23
|
</tr>
|
24
24
|
<%- end -%>
|
@@ -28,8 +28,8 @@
|
|
28
28
|
</div>
|
29
29
|
</div>
|
30
30
|
|
31
|
-
<div id="submenu" class="ui-corner-all">
|
31
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
32
32
|
<ul>
|
33
|
-
<li><%= link_to t('page.new', :
|
33
|
+
<li><%= link_to t('page.new', model: t('activerecord.models.bookmark_stat')), new_bookmark_stat_path -%></li>
|
34
34
|
</ul>
|
35
35
|
</div>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
2
|
-
<h1 class="title"><%= t('page.new', :
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
+
<h1 class="title"><%= t('page.new', model: t('activerecord.models.bookmark_stat')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<%= render 'form' %>
|
5
5
|
</div>
|
6
6
|
</div>
|
7
7
|
|
8
|
-
<div id="submenu" class="ui-corner-all">
|
8
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
9
9
|
<ul>
|
10
10
|
<li><%= link_to t('page.back'), bookmark_stats_path -%></li>
|
11
11
|
</ul>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
2
|
-
<h1 class="title"><%= t('page.showing', :
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
+
<h1 class="title"><%= t('page.showing', model: t('activerecord.models.bookmark_stat')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<p id="notice"><%= notice %></p>
|
5
5
|
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
<p>
|
17
17
|
<strong><%= t('activerecord.attributes.bookmark_stat.state') -%>:</strong>
|
18
|
-
<%= @bookmark_stat.
|
18
|
+
<%= @bookmark_stat.current_state -%>
|
19
19
|
</p>
|
20
20
|
|
21
21
|
<p>
|
@@ -31,7 +31,7 @@
|
|
31
31
|
<%- @stats.each do |stat| -%>
|
32
32
|
<tr class="line<%= cycle("0", "1") -%>">
|
33
33
|
<td>
|
34
|
-
<%= render 'manifestations/show_index', :
|
34
|
+
<%= render 'manifestations/show_index', manifestation: stat.manifestation if stat.manifestation -%>
|
35
35
|
</td>
|
36
36
|
<td><%= stat.bookmarks_count -%></td>
|
37
37
|
</tr>
|
@@ -43,13 +43,13 @@
|
|
43
43
|
</div>
|
44
44
|
</div>
|
45
45
|
|
46
|
-
<div id="submenu" class="ui-corner-all">
|
46
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
47
47
|
<ul>
|
48
48
|
<li><%= link_to t('page.edit'), edit_bookmark_stat_path(@bookmark_stat) -%></li>
|
49
49
|
<li><%= back_to_index(flash[:page_info]) -%></li>
|
50
50
|
</ul>
|
51
51
|
<h4><%= t('page.export') -%></h4>
|
52
52
|
<ul>
|
53
|
-
<li><%= link_to '
|
53
|
+
<li><%= link_to 'TSV', bookmark_stat_path(@bookmark_stat, format: :txt) -%></li>
|
54
54
|
</ul>
|
55
55
|
</div>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
2
|
-
<h1 class="title"><%= t('page.listing', :
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
+
<h1 class="title"><%= t('page.listing', model: t('activerecord.models.bookmark')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
|
5
5
|
<div class="search_form">
|
6
|
-
<%= form_for :bookmarks, :
|
6
|
+
<%= form_for :bookmarks, url: bookmarks_path, html: {method: 'get'} do -%>
|
7
7
|
<p>
|
8
|
-
<%= label_tag :search_form_top, t('page.search_term') -%>: <%= search_field_tag 'query', h(@query), {:
|
8
|
+
<%= label_tag :search_form_top, t('page.search_term') -%>: <%= search_field_tag 'query', h(@query), {id: 'search_form_top', class: 'search_form', placeholder: t('page.search_term')} -%>
|
9
9
|
<%= submit_tag t('page.search') -%>
|
10
10
|
</p>
|
11
11
|
<%- end -%>
|
@@ -21,15 +21,15 @@
|
|
21
21
|
|
22
22
|
<%- @bookmarks.each do |bookmark| -%>
|
23
23
|
<tr class="line<%= cycle("0", "1") -%>">
|
24
|
-
<td><%= link_to bookmark.user.username, bookmark.user -%></td>
|
24
|
+
<td><%= link_to bookmark.user.username, bookmark.user.username -%></td>
|
25
25
|
<td>
|
26
|
-
<%= render 'manifestations/show_index', :
|
26
|
+
<%= render 'manifestations/show_index', manifestation: bookmark.manifestation -%>
|
27
27
|
</td>
|
28
28
|
<td><%= l(bookmark.created_at) -%></td>
|
29
29
|
<td>
|
30
30
|
<%- if can? :delete, bookmark -%>
|
31
31
|
<%= link_to t('page.show'), bookmark_path(bookmark) -%>
|
32
|
-
<%= link_to t('page.destroy'), bookmark_path(bookmark), :
|
32
|
+
<%= link_to t('page.destroy'), bookmark_path(bookmark), data: {confirm: t('page.are_you_sure')}, method: :delete -%>
|
33
33
|
<%- end -%>
|
34
34
|
</td>
|
35
35
|
</tr>
|
@@ -41,7 +41,7 @@
|
|
41
41
|
</div>
|
42
42
|
</div>
|
43
43
|
|
44
|
-
<div id="submenu" class="ui-corner-all">
|
44
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
45
45
|
<%- if user_signed_in? -%>
|
46
46
|
<h4><%= t('page.bookmarklet') -%></h4>
|
47
47
|
<ul>
|
@@ -1,14 +1,14 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
2
|
-
<h1 class="title"><%= t('page.listing', :
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
+
<h1 class="title"><%= t('page.listing', model: t('activerecord.models.bookmark')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<h2 class="resource_title">
|
5
|
-
<%= t('bookmark.user_bookmark', :
|
5
|
+
<%= t('bookmark.user_bookmark', login_name: @user.username) -%>
|
6
6
|
</h2>
|
7
7
|
|
8
8
|
<div class="search_form">
|
9
|
-
<%= form_for :bookmarks, :
|
9
|
+
<%= form_for :bookmarks, url: bookmarks_path(user_id: @user.username), html: {method: 'get'} do -%>
|
10
10
|
<p>
|
11
|
-
<%= label_tag :search_form_top, t('page.search_term') -%>: <%= search_field_tag 'query', h(@query), {:
|
11
|
+
<%= label_tag :search_form_top, t('page.search_term') -%>: <%= search_field_tag 'query', h(@query), {id: 'search_form_top', class: 'search_form', placeholder: t('page.search_term')} -%>
|
12
12
|
<%= submit_tag t('page.search') -%>
|
13
13
|
</p>
|
14
14
|
<%- end -%>
|
@@ -24,14 +24,14 @@
|
|
24
24
|
|
25
25
|
<%- @bookmarks.each do |bookmark| -%>
|
26
26
|
<tr class="line<%= cycle("0", "1") -%>">
|
27
|
-
<td><%= link_to bookmark.user.username, bookmark.user -%></td>
|
27
|
+
<td><%= link_to bookmark.user.username, bookmark.user.profile -%></td>
|
28
28
|
<td>
|
29
|
-
<%= render 'manifestations/show_index', :
|
29
|
+
<%= render 'manifestations/show_index', manifestation: bookmark.manifestation -%>
|
30
30
|
</td>
|
31
31
|
<td><%= l(bookmark.created_at) -%></td>
|
32
32
|
<td>
|
33
33
|
<%- if can? :delete, bookmark -%>
|
34
|
-
<%= link_to t('page.destroy'), bookmark, :
|
34
|
+
<%= link_to t('page.destroy'), bookmark, data: {confirm: t('page.are_you_sure')}, method: :delete -%>
|
35
35
|
<%- end -%>
|
36
36
|
</td>
|
37
37
|
</tr>
|
@@ -43,7 +43,7 @@
|
|
43
43
|
</div>
|
44
44
|
</div>
|
45
45
|
|
46
|
-
<div id="submenu" class="ui-corner-all">
|
46
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
47
47
|
<%- if user_signed_in? -%>
|
48
48
|
<h4><%= t('page.bookmarklet') -%></h4>
|
49
49
|
<ul>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<ul class="popularity">
|
4
4
|
<%- unless @tags.empty? -%>
|
5
5
|
<%- tag_cloud @tags, ['popular', 'v-popular', 'vv-popular', 'vvv-popular', 'vvvv-popular'] do |tag, css_class| -%>
|
6
|
-
<li><%= link_to tag.name, manifestations_path(:
|
6
|
+
<li><%= link_to tag.name, manifestations_path(tag: tag.name), class: css_class %></li>
|
7
7
|
<% end %>
|
8
8
|
<% end %>
|
9
9
|
</ul>
|
@@ -1,8 +1,8 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
2
|
-
<h1 class="title"><%= t('page.editing', :
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
+
<h1 class="title"><%= t('page.editing', model: t('activerecord.models.bookmark')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
|
5
|
-
<%= form_for(@bookmark, :
|
5
|
+
<%= form_for(@bookmark, url: bookmark_path(@bookmark)) do |f| -%>
|
6
6
|
<%= f.error_messages -%>
|
7
7
|
|
8
8
|
<div class="field">
|
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
<div class="field">
|
18
18
|
<%= f.label t('activerecord.models.tag') -%><br />
|
19
|
-
<%= f.text_field :tag_list, :
|
19
|
+
<%= f.text_field :tag_list, class: 'resource_title' -%>
|
20
20
|
</div>
|
21
21
|
|
22
22
|
<div class="field">
|
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
<div class="field">
|
28
28
|
<%= f.label :note -%><br />
|
29
|
-
<%= f.text_area :note, :
|
29
|
+
<%= f.text_area :note, class: 'resource_textarea' -%>
|
30
30
|
</div>
|
31
31
|
|
32
32
|
<div class="actions">
|
@@ -36,10 +36,10 @@
|
|
36
36
|
</div>
|
37
37
|
</div>
|
38
38
|
|
39
|
-
<div id="submenu" class="ui-corner-all">
|
39
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
40
40
|
<ul>
|
41
|
-
<li><%= link_to t('page.showing', :
|
41
|
+
<li><%= link_to t('page.showing', model: t('activerecord.models.manifestation')), @bookmark.manifestation -%></li>
|
42
42
|
<li><%= link_to t('page.show'), @bookmark -%></li>
|
43
|
-
<li><%= link_to t('page.back'),
|
43
|
+
<li><%= link_to t('page.back'), bookmarks_path(user_id: @bookmark.user.username) -%></li>
|
44
44
|
</ul>
|
45
45
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
2
|
-
<h1 class="title"><%= t('page.new', :
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
+
<h1 class="title"><%= t('page.new', model: t('activerecord.models.bookmark')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
|
5
5
|
<%= form_for(@bookmark) do |f| -%>
|
@@ -7,16 +7,16 @@
|
|
7
7
|
|
8
8
|
<div class="field">
|
9
9
|
<%= f.label t('page.title') -%><br />
|
10
|
-
<%= f.text_field :title, :
|
10
|
+
<%= f.text_field :title, class: 'resource_title' -%>
|
11
11
|
</div>
|
12
12
|
|
13
13
|
<div class="field">
|
14
14
|
<%= f.label :url -%><br />
|
15
15
|
<%- if @bookmark.url -%>
|
16
16
|
<%= link_to @bookmark.url, @bookmark.url -%>
|
17
|
-
<%= f.hidden_field :url, :
|
17
|
+
<%= f.hidden_field :url, class: 'resource_url' -%>
|
18
18
|
<%- else -%>
|
19
|
-
<%= f.url_field :url, :
|
19
|
+
<%= f.url_field :url, class: 'resource_url' -%>
|
20
20
|
<%- end -%>
|
21
21
|
</div>
|
22
22
|
|
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
<div class="field">
|
34
34
|
<%= f.label :note -%><br />
|
35
|
-
<%= f.text_area :note, :
|
35
|
+
<%= f.text_area :note, class: 'resource_textarea' -%>
|
36
36
|
</div>
|
37
37
|
|
38
38
|
<div class="actions">
|
@@ -43,7 +43,7 @@
|
|
43
43
|
</div>
|
44
44
|
</div>
|
45
45
|
|
46
|
-
<div id="submenu" class="ui-corner-all">
|
46
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
47
47
|
<ul>
|
48
48
|
<li><%= link_to t('page.back'), :back -%></li>
|
49
49
|
</ul>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<div id="content_detail" class="ui-corner-all">
|
2
|
-
<h1 class="title"><%= t('page.showing', :
|
1
|
+
<div id="content_detail" class="ui-corner-all ui-widget-content">
|
2
|
+
<h1 class="title"><%= t('page.showing', model: t('activerecord.models.bookmark')) -%></h1>
|
3
3
|
<div id="content_list">
|
4
4
|
<p id="notice"><%= notice %></p>
|
5
5
|
|
6
6
|
<p>
|
7
7
|
<strong><%= t('activerecord.models.user') -%>:</strong>
|
8
|
-
<%= link_to @bookmark.user.username, @bookmark.user -%>
|
8
|
+
<%= link_to @bookmark.user.username, @bookmark.user.profile -%>
|
9
9
|
</p>
|
10
10
|
|
11
11
|
<p>
|
@@ -21,7 +21,7 @@
|
|
21
21
|
<p>
|
22
22
|
<strong><%= t('page.tag') -%>:</strong>
|
23
23
|
<%- @bookmark.tag_counts.collect {|tag| -%>
|
24
|
-
<%= link_to tag.name, manifestations_path(:
|
24
|
+
<%= link_to tag.name, manifestations_path(tag: tag.name) -%>
|
25
25
|
<%- } -%>
|
26
26
|
</p>
|
27
27
|
|
@@ -43,11 +43,11 @@
|
|
43
43
|
</div>
|
44
44
|
</div>
|
45
45
|
|
46
|
-
<div id="submenu" class="ui-corner-all">
|
46
|
+
<div id="submenu" class="ui-corner-all ui-widget-content">
|
47
47
|
<ul>
|
48
48
|
<li><%= link_to t('page.edit'),edit_bookmark_path(@bookmark) -%></li>
|
49
|
-
<li><%= link_to t('page.destroy'), @bookmark, :
|
50
|
-
<li><%= link_to t('page.back_to', :
|
49
|
+
<li><%= link_to t('page.destroy'), @bookmark, data: {confirm: t('page.are_you_sure')}, method: :delete -%></li>
|
50
|
+
<li><%= link_to t('page.back_to', model: t('activerecord.models.manifestation')), @bookmark.manifestation -%></li>
|
51
51
|
<li><%= link_to t('page.back'), bookmarks_url -%></li>
|
52
52
|
</ul>
|
53
53
|
</div>
|