enju_bookmark 0.0.17 → 0.0.18
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.
- data/app/views/manifestations/_bookmarks_for_this_manifestation.html.erb +24 -0
- data/app/views/manifestations/_show_tag.html.erb +5 -0
- data/lib/enju_bookmark/version.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/segments_1 +0 -0
- data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
- data/spec/requests/bookmarks_spec.rb +1 -1
- metadata +6 -26
- data/spec/dummy/app/models/item_has_use_restriction.rb +0 -27
- data/spec/dummy/app/models/use_restriction.rb +0 -22
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/solr/data/test/index/_0.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_0.fdx +0 -0
- data/spec/dummy/solr/data/test/index/_0.fnm +0 -3
- data/spec/dummy/solr/data/test/index/_0.frq +0 -0
- data/spec/dummy/solr/data/test/index/_0.nrm +0 -1
- data/spec/dummy/solr/data/test/index/_0.prx +0 -0
- data/spec/dummy/solr/data/test/index/_0.tii +0 -0
- data/spec/dummy/solr/data/test/index/_0.tis +0 -0
- data/spec/dummy/solr/data/test/index/segments_2 +0 -0
@@ -0,0 +1,24 @@
|
|
1
|
+
<%- if manifestation.bookmarks.exists? -%>
|
2
|
+
<ul>
|
3
|
+
<%- manifestation.bookmarks.each do |bookmark| -%>
|
4
|
+
<% if bookmark.shared? %>
|
5
|
+
<li><%= link_to bookmark.user.username, bookmark -%>
|
6
|
+
<%- bookmark.tags.each do |tag| -%>
|
7
|
+
[<%= link_to tag.name, manifestations_path(:tag => tag.name) -%>]
|
8
|
+
<%- end -%>
|
9
|
+
<%= bookmark.note -%>
|
10
|
+
<%- if user_signed_in? and current_user == bookmark.user -%>
|
11
|
+
<%= link_to image_tag('icons/page_edit.png', :alt => t('page.edit')), edit_bookmark_path(bookmark) -%>
|
12
|
+
<%- end -%>
|
13
|
+
</li>
|
14
|
+
<%- end -%>
|
15
|
+
<%- end -%>
|
16
|
+
</ul>
|
17
|
+
<%- else -%>
|
18
|
+
<p>
|
19
|
+
<%= t('bookmark.not_bookmarked') -%>
|
20
|
+
<%- if user_signed_in? -%>
|
21
|
+
<%= link_to t('bookmark.add_to_my_bookmark'), new_bookmark_path(:bookmark => {:url => manifestation_url(manifestation)}) -%>
|
22
|
+
<%- end -%>
|
23
|
+
</p>
|
24
|
+
<%- end -%>
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enju_bookmark
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.18
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -301,6 +301,8 @@ files:
|
|
301
301
|
- app/views/bookmarks/index.html.erb
|
302
302
|
- app/views/bookmarks/new.html.erb
|
303
303
|
- app/views/bookmarks/show.html.erb
|
304
|
+
- app/views/manifestations/_bookmarks_for_this_manifestation.html.erb
|
305
|
+
- app/views/manifestations/_show_tag.html.erb
|
304
306
|
- app/views/manifestations/_tag_cloud.html.erb
|
305
307
|
- app/views/manifestations/_tag_edit.html.erb
|
306
308
|
- app/views/manifestations/_tag_list.html.erb
|
@@ -343,7 +345,6 @@ files:
|
|
343
345
|
- spec/dummy/app/models/circulation_status.rb
|
344
346
|
- spec/dummy/app/models/exemplify.rb
|
345
347
|
- spec/dummy/app/models/item.rb
|
346
|
-
- spec/dummy/app/models/item_has_use_restriction.rb
|
347
348
|
- spec/dummy/app/models/language.rb
|
348
349
|
- spec/dummy/app/models/library.rb
|
349
350
|
- spec/dummy/app/models/library_group.rb
|
@@ -354,7 +355,6 @@ files:
|
|
354
355
|
- spec/dummy/app/models/series_has_manifestation.rb
|
355
356
|
- spec/dummy/app/models/series_statement.rb
|
356
357
|
- spec/dummy/app/models/shelf.rb
|
357
|
-
- spec/dummy/app/models/use_restriction.rb
|
358
358
|
- spec/dummy/app/models/user.rb
|
359
359
|
- spec/dummy/app/models/user_group.rb
|
360
360
|
- spec/dummy/app/models/user_has_role.rb
|
@@ -382,7 +382,6 @@ files:
|
|
382
382
|
- spec/dummy/config/locales/en.yml
|
383
383
|
- spec/dummy/config/routes.rb
|
384
384
|
- spec/dummy/config.ru
|
385
|
-
- spec/dummy/db/development.sqlite3
|
386
385
|
- spec/dummy/db/migrate/001_create_patrons.rb
|
387
386
|
- spec/dummy/db/migrate/005_create_manifestations.rb
|
388
387
|
- spec/dummy/db/migrate/006_create_items.rb
|
@@ -441,16 +440,8 @@ files:
|
|
441
440
|
- spec/dummy/solr/conf/spellings.txt
|
442
441
|
- spec/dummy/solr/conf/stopwords.txt
|
443
442
|
- spec/dummy/solr/conf/synonyms.txt
|
444
|
-
- spec/dummy/solr/data/test/index/_0.fdt
|
445
|
-
- spec/dummy/solr/data/test/index/_0.fdx
|
446
|
-
- spec/dummy/solr/data/test/index/_0.fnm
|
447
|
-
- spec/dummy/solr/data/test/index/_0.frq
|
448
|
-
- spec/dummy/solr/data/test/index/_0.nrm
|
449
|
-
- spec/dummy/solr/data/test/index/_0.prx
|
450
|
-
- spec/dummy/solr/data/test/index/_0.tii
|
451
|
-
- spec/dummy/solr/data/test/index/_0.tis
|
452
443
|
- spec/dummy/solr/data/test/index/segments.gen
|
453
|
-
- spec/dummy/solr/data/test/index/
|
444
|
+
- spec/dummy/solr/data/test/index/segments_1
|
454
445
|
- spec/dummy/solr/data/test/spellchecker/segments.gen
|
455
446
|
- spec/dummy/solr/data/test/spellchecker/segments_1
|
456
447
|
- spec/factories/bookmark.rb
|
@@ -529,7 +520,6 @@ test_files:
|
|
529
520
|
- spec/dummy/app/models/circulation_status.rb
|
530
521
|
- spec/dummy/app/models/exemplify.rb
|
531
522
|
- spec/dummy/app/models/item.rb
|
532
|
-
- spec/dummy/app/models/item_has_use_restriction.rb
|
533
523
|
- spec/dummy/app/models/language.rb
|
534
524
|
- spec/dummy/app/models/library.rb
|
535
525
|
- spec/dummy/app/models/library_group.rb
|
@@ -540,7 +530,6 @@ test_files:
|
|
540
530
|
- spec/dummy/app/models/series_has_manifestation.rb
|
541
531
|
- spec/dummy/app/models/series_statement.rb
|
542
532
|
- spec/dummy/app/models/shelf.rb
|
543
|
-
- spec/dummy/app/models/use_restriction.rb
|
544
533
|
- spec/dummy/app/models/user.rb
|
545
534
|
- spec/dummy/app/models/user_group.rb
|
546
535
|
- spec/dummy/app/models/user_has_role.rb
|
@@ -568,7 +557,6 @@ test_files:
|
|
568
557
|
- spec/dummy/config/locales/en.yml
|
569
558
|
- spec/dummy/config/routes.rb
|
570
559
|
- spec/dummy/config.ru
|
571
|
-
- spec/dummy/db/development.sqlite3
|
572
560
|
- spec/dummy/db/migrate/001_create_patrons.rb
|
573
561
|
- spec/dummy/db/migrate/005_create_manifestations.rb
|
574
562
|
- spec/dummy/db/migrate/006_create_items.rb
|
@@ -627,16 +615,8 @@ test_files:
|
|
627
615
|
- spec/dummy/solr/conf/spellings.txt
|
628
616
|
- spec/dummy/solr/conf/stopwords.txt
|
629
617
|
- spec/dummy/solr/conf/synonyms.txt
|
630
|
-
- spec/dummy/solr/data/test/index/_0.fdt
|
631
|
-
- spec/dummy/solr/data/test/index/_0.fdx
|
632
|
-
- spec/dummy/solr/data/test/index/_0.fnm
|
633
|
-
- spec/dummy/solr/data/test/index/_0.frq
|
634
|
-
- spec/dummy/solr/data/test/index/_0.nrm
|
635
|
-
- spec/dummy/solr/data/test/index/_0.prx
|
636
|
-
- spec/dummy/solr/data/test/index/_0.tii
|
637
|
-
- spec/dummy/solr/data/test/index/_0.tis
|
638
618
|
- spec/dummy/solr/data/test/index/segments.gen
|
639
|
-
- spec/dummy/solr/data/test/index/
|
619
|
+
- spec/dummy/solr/data/test/index/segments_1
|
640
620
|
- spec/dummy/solr/data/test/spellchecker/segments.gen
|
641
621
|
- spec/dummy/solr/data/test/spellchecker/segments_1
|
642
622
|
- spec/factories/bookmark.rb
|
@@ -1,27 +0,0 @@
|
|
1
|
-
class ItemHasUseRestriction < ActiveRecord::Base
|
2
|
-
attr_accessible
|
3
|
-
attr_accessible :item_id, :use_restriction_id, :as => :admin
|
4
|
-
belongs_to :item, :validate => true
|
5
|
-
belongs_to :use_restriction, :validate => true
|
6
|
-
accepts_nested_attributes_for :use_restriction
|
7
|
-
|
8
|
-
validates_associated :item, :use_restriction
|
9
|
-
validates_presence_of :use_restriction
|
10
|
-
validates_presence_of :item, :on => :update
|
11
|
-
|
12
|
-
def self.per_page
|
13
|
-
10
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
# == Schema Information
|
18
|
-
#
|
19
|
-
# Table name: item_has_use_restrictions
|
20
|
-
#
|
21
|
-
# id :integer not null, primary key
|
22
|
-
# item_id :integer not null
|
23
|
-
# use_restriction_id :integer not null
|
24
|
-
# created_at :datetime
|
25
|
-
# updated_at :datetime
|
26
|
-
#
|
27
|
-
|
@@ -1,22 +0,0 @@
|
|
1
|
-
class UseRestriction < ActiveRecord::Base
|
2
|
-
attr_accessible :name, :display_name, :note
|
3
|
-
include MasterModel
|
4
|
-
default_scope :order => 'use_restrictions.position'
|
5
|
-
scope :available, where(:name => ['Not For Loan', 'Limited Circulation, Normal Loan Period'])
|
6
|
-
has_many :item_has_use_restrictions
|
7
|
-
has_many :items, :through => :item_has_use_restrictions
|
8
|
-
end
|
9
|
-
|
10
|
-
# == Schema Information
|
11
|
-
#
|
12
|
-
# Table name: use_restrictions
|
13
|
-
#
|
14
|
-
# id :integer not null, primary key
|
15
|
-
# name :string(255) not null
|
16
|
-
# display_name :text
|
17
|
-
# note :text
|
18
|
-
# position :integer
|
19
|
-
# created_at :datetime
|
20
|
-
# updated_at :datetime
|
21
|
-
#
|
22
|
-
|
File without changes
|
Binary file
|
Binary file
|
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
NRM�ttrtt
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|