enju_leaf 1.2.0.beta.3 → 1.2.0.beta.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,144 @@
1
+ <div id="navibar">
2
+ <ul id="bar1" class="menubar">
3
+ <% if defined?(EnjuCirculation) %>
4
+ <li>
5
+ <a href="#circulation_menu">
6
+ <% if current_user.try(:has_role?, 'Librarian') %>
7
+ <%= t('page.librarian_circulation') -%>
8
+ <% else %>
9
+ <%= t('page.user_circulation') -%>
10
+ <% end %>
11
+ </a>
12
+ <ul>
13
+ <%- if user_signed_in? -%>
14
+ <%- if current_user.has_role?('Librarian') -%>
15
+ <li><%= link_to t('page.checkout'), new_basket_path -%></li>
16
+ <li><%= link_to t('page.checkin'), new_checkin_path -%></li>
17
+ <% end %>
18
+ <li>
19
+ <%= link_to t('page.listing', model: t('activerecord.models.reserve')), reserves_path -%>
20
+ </li>
21
+ <% if defined?(EnjuInterLibraryLoan) %>
22
+ <% if current_user.has_role?('Librarian') -%>
23
+ <li><%= link_to t('activerecord.models.inter_library_loan'), inter_library_loans_path -%></li>
24
+ <% end %>
25
+ <% end %>
26
+ <li><%= link_to t('page.checkout_history'), checkouts_path -%></li>
27
+ <%- else -%>
28
+ <li><%= link_to t('page.checkout_history'), checkouts_path -%></li>
29
+ <li><%= link_to t('page.listing', model: t('activerecord.models.reserve')), reserves_path -%></li>
30
+ <%- end -%>
31
+ <li><%= link_to t('page.catalog_search'), manifestations_path %></li>
32
+ </ul>
33
+ <% end %>
34
+ </li>
35
+ <%- if user_signed_in? -%>
36
+ <li>
37
+ <a href="#acquisition_menu"><%= t('page.acquisition') -%></a>
38
+ <ul>
39
+ <%- if current_user.has_role?('Librarian') -%>
40
+ <li><%= link_to t('import_request.enter_isbn'), new_import_request_path -%></li>
41
+ <% if defined?(EnjuNdl) %>
42
+ <li><%= link_to t('enju_ndl.import_from_ndl_search'), ndl_books_path -%></li>
43
+ <% end %>
44
+ <% if defined?(EnjuNii) %>
45
+ <li><%= link_to t('enju_nii.import_from_cinii_books'), cinii_books_path -%></li>
46
+ <% end %>
47
+ <% if defined?(EnjuLoc) %>
48
+ <li><%= link_to t('enju_loc.import_from_loc_search'), loc_search_index_path -%></li>
49
+ <% end %>
50
+ <li><%= link_to t('page.add_resource_manually'), new_manifestation_path -%></li>
51
+ <li><%= link_to t('page.serial'), manifestations_path(serial: true) -%></li>
52
+ <li><%= link_to t('page.import_from_file'), new_resource_import_file_path -%></li>
53
+ <li><%= link_to t('activerecord.models.accept'), new_accept_path -%></li>
54
+ <% if defined?(EnjuIr) %>
55
+ <li><%= link_to t('activemodel.models.resource'), resources_path -%></li>
56
+ <% end %>
57
+ <% if defined?(EnjuBookmark) %>
58
+ <li><%= link_to t('page.listing', model: t('activerecord.models.bookmark')), bookmarks_path -%></li>
59
+ <% end %>
60
+ <%- else -%>
61
+ <% if defined?(EnjuBookmark) %>
62
+ <li><%= link_to t('page.listing', model: t('activerecord.models.bookmark')), bookmarks_path -%></li>
63
+ <% end %>
64
+ <%- end -%>
65
+ </ul>
66
+ </li>
67
+ <% end %>
68
+ <% if defined?(EnjuPurchaseRequest) or defined?(EnjuQuestion) %>
69
+ <li>
70
+ <a href="#request_menu"><%= t('page.request') -%></a>
71
+ <ul>
72
+ <%- if user_signed_in? -%>
73
+ <% if defined?(EnjuPurchaseRequest) %>
74
+ <li><%= link_to t('activerecord.models.purchase_request'), purchase_requests_path -%></li>
75
+ <% end %>
76
+ <% if defined?(EnjuQuestion) %>
77
+ <li><%= link_to t('activerecord.models.question'), questions_path -%></li>
78
+ <% end %>
79
+ <%- else -%>
80
+ <% if defined?(EnjuPurchaseRequest) %>
81
+ <li><%= link_to t('activerecord.models.purchase_request'), purchase_requests_path -%></li>
82
+ <% end %>
83
+ <% if defined?(EnjuQuestion) %>
84
+ <li><%= link_to t('activerecord.models.question'), questions_path -%></li>
85
+ <% end %>
86
+ <% end %>
87
+ </ul>
88
+ </li>
89
+ <% end %>
90
+ <% if defined?(EnjuEvent) %>
91
+ <li>
92
+ <a href="#event_menu"><%= t('activerecord.models.event') -%></a>
93
+ <ul>
94
+ <%- unless @library_group.real_libraries.empty? -%>
95
+ <li><%= link_to t('page.calendar'), events_path(mode: 'calendar') -%></li>
96
+ <li><%= link_to t('event.all'), events_path -%></li>
97
+ <%- @library_group.real_libraries.each do |library| -%>
98
+ <li><%= link_to library.display_name.localize, events_path(library_id: library.name) -%></li>
99
+ <%- end -%>
100
+ <%- if can? :create, Event -%>
101
+ <li><%= link_to t('page.import'), new_event_import_file_path -%></li>
102
+ <%- end -%>
103
+ <%- end -%>
104
+ </ul>
105
+ </li>
106
+ <% end %>
107
+ <li>
108
+ <a href="#configuration_menu">
109
+ <% if current_user.try(:has_role?, 'Librarian') %>
110
+ <%= t('page.management') -%>
111
+ <% else %>
112
+ <%= t('page.configuration') -%>
113
+ <% end %>
114
+ </a>
115
+ <ul>
116
+ <%- if user_signed_in? -%>
117
+ <%- if current_user.has_role?('Librarian') -%>
118
+ <li><%= link_to t('user.management'), profiles_path -%></li>
119
+ <li><%= link_to t('page.agent_management'), agents_path -%></li>
120
+ <li><%= link_to t('page.import'), page_import_path -%></li>
121
+ <li><%= link_to t('page.export'), page_export_path -%></li>
122
+ <% if defined?(EnjuPurchaseRequest) %>
123
+ <li><%= link_to t('activerecord.models.order_list'), order_lists_path -%></li>
124
+ <% end %>
125
+ <li><%= link_to t('page.statistics'), page_statistics_path -%></li>
126
+ <% if defined?(EnjuSearchLog) %>
127
+ <li><%= link_to t('activerecord.models.search_history'), search_histories_path %></li>
128
+ <% end %>
129
+ <% if @library_group.settings[:erms_url] %>
130
+ <li><%= link_to t('page.electronic_resource_management'), @library_group.settings[:erms_url] -%></li>
131
+ <% end %>
132
+ <li><%= link_to t('page.configuration'), page_configuration_path -%></li>
133
+ <% else %>
134
+ <ul>
135
+ <li><%= link_to t('user.account_management'), edit_my_account_path -%></li>
136
+ </ul>
137
+ <%- end -%>
138
+ <%- else -%>
139
+ <li><%= link_to t('page.sign_in'), new_user_session_path -%></li>
140
+ <%- end -%>
141
+ </ul>
142
+ </li>
143
+ </ul>
144
+ </div>
@@ -1,2 +1,2 @@
1
- <%= object.first? ? image_tag('icons/stop.png', size: '16x16') : link_to(image_tag('icons/arrow_up.png', size: '16x16', alt: t('page.asc')), {action: 'update', move: 'higher', id: object.id}, method: :put) -%>
2
- <%= object.last? ? image_tag('icons/stop.png', size: '16x16') : link_to(image_tag('icons/arrow_down.png', size: '16x16', alt: t('page.desc')), {action: 'update', move: 'lower', id: object.id}, method: :put) -%>
1
+ <%= object.first? ? image_tag('icons/stop.png', size: '16x16', class: 'enju_icon') : link_to(image_tag('icons/arrow_up.png', size: '16x16', class: 'enju_icon', alt: t('page.asc')), {action: 'update', move: 'higher', id: object.id}, method: :put) -%>
2
+ <%= object.last? ? image_tag('icons/stop.png', size: '16x16', class: 'enju_icon') : link_to(image_tag('icons/arrow_down.png', size: '16x16', class: 'enju_icon', alt: t('page.desc')), {action: 'update', move: 'lower', id: object.id}, method: :put) -%>
@@ -1,3 +1,3 @@
1
1
  module EnjuLeaf
2
- VERSION = "1.2.0.beta.3"
2
+ VERSION = "1.2.0.beta.4"
3
3
  end
@@ -1,3 +1,3 @@
1
1
  solr: bundle exec rake sunspot:solr:run
2
- resque: bundle exec rake environment resque:work QUEUE=enju_leaf TERM_CHILD=1
2
+ resque: bundle exec rake environment resque:work QUEUE=enju_leaf,mailers TERM_CHILD=1
3
3
  web: bundle exec rails s
@@ -72,7 +72,7 @@ describe PageController do
72
72
  it "should get advanced_search" do
73
73
  get :advanced_search
74
74
  expect(response).to be_success
75
- expect(assigns(:libraries)).to eq Library.all
75
+ expect(assigns(:libraries)).to eq Library.order(:position)
76
76
  end
77
77
 
78
78
  it "should get about" do