@@ -154,11 +154,11 module Redmine | |||||
154 | # :per_page_links if set to false, the "Per page" links are not rendered |
|
154 | # :per_page_links if set to false, the "Per page" links are not rendered | |
155 | # |
|
155 | # | |
156 | def pagination_links_full(*args) |
|
156 | def pagination_links_full(*args) | |
157 | pagination_links_each(*args) do |text, parameters| |
|
157 | pagination_links_each(*args) do |text, parameters, options| | |
158 | if block_given? |
|
158 | if block_given? | |
159 | yield text, parameters |
|
159 | yield text, parameters, options | |
160 | else |
|
160 | else | |
161 | link_to text, params.merge(parameters) |
|
161 | link_to text, params.merge(parameters), options | |
162 | end |
|
162 | end | |
163 | end |
|
163 | end | |
164 | end |
|
164 | end | |
@@ -175,18 +175,19 module Redmine | |||||
175 | html = '' |
|
175 | html = '' | |
176 | if paginator.previous_page |
|
176 | if paginator.previous_page | |
177 | # \xc2\xab(utf-8) = « |
|
177 | # \xc2\xab(utf-8) = « | |
178 | html << yield("\xc2\xab " + l(:label_previous), page_param => paginator.previous_page) + ' ' |
|
178 | text = "\xc2\xab " + l(:label_previous) | |
|
179 | html << yield(text, {page_param => paginator.previous_page}, :class => 'previous') + ' ' | |||
179 | end |
|
180 | end | |
180 |
|
181 | |||
181 | previous = nil |
|
182 | previous = nil | |
182 | paginator.linked_pages.each do |page| |
|
183 | paginator.linked_pages.each do |page| | |
183 | if previous && previous != page - 1 |
|
184 | if previous && previous != page - 1 | |
184 | html << '... ' |
|
185 | html << content_tag('span', '...', :class => 'spacer') + ' ' | |
185 | end |
|
186 | end | |
186 | if page == paginator.page |
|
187 | if page == paginator.page | |
187 | html << page.to_s |
|
188 | html << content_tag('span', page.to_s, :class => 'current page') | |
188 | else |
|
189 | else | |
189 | html << yield(page.to_s, page_param => page) |
|
190 | html << yield(page.to_s, {page_param => page}, :class => 'page') | |
190 | end |
|
191 | end | |
191 | html << ' ' |
|
192 | html << ' ' | |
192 | previous = page |
|
193 | previous = page | |
@@ -194,13 +195,14 module Redmine | |||||
194 |
|
195 | |||
195 | if paginator.next_page |
|
196 | if paginator.next_page | |
196 | # \xc2\xbb(utf-8) = » |
|
197 | # \xc2\xbb(utf-8) = » | |
197 | html << yield(l(:label_next) + " \xc2\xbb", page_param => paginator.next_page) + ' ' |
|
198 | text = l(:label_next) + " \xc2\xbb" | |
|
199 | html << yield(text, {page_param => paginator.next_page}, :class => 'next') + ' ' | |||
198 | end |
|
200 | end | |
199 |
|
201 | |||
200 |
html << "(#{paginator.first_item}-#{paginator.last_item}/#{paginator.item_count}) |
|
202 | html << content_tag('span', "(#{paginator.first_item}-#{paginator.last_item}/#{paginator.item_count})", :class => 'items') + ' ' | |
201 |
|
203 | |||
202 | if per_page_links != false && links = per_page_links(paginator, &block) |
|
204 | if per_page_links != false && links = per_page_links(paginator, &block) | |
203 | html << "| #{links}" |
|
205 | html << content_tag('span', links.to_s, :class => 'per-page') | |
204 | end |
|
206 | end | |
205 |
|
207 | |||
206 | html.html_safe |
|
208 | html.html_safe | |
@@ -211,9 +213,13 module Redmine | |||||
211 | values = per_page_options(paginator.per_page, paginator.item_count) |
|
213 | values = per_page_options(paginator.per_page, paginator.item_count) | |
212 | if values.any? |
|
214 | if values.any? | |
213 | links = values.collect do |n| |
|
215 | links = values.collect do |n| | |
214 | n == paginator.per_page ? n : yield(n, :per_page => n, paginator.page_param => nil) |
|
216 | if n == paginator.per_page | |
|
217 | content_tag('span', n.to_s) | |||
|
218 | else | |||
|
219 | yield(n, :per_page => n, paginator.page_param => nil) | |||
|
220 | end | |||
215 | end |
|
221 | end | |
216 | l(:label_display_per_page, links.join(', ')) |
|
222 | l(:label_display_per_page, links.join(', ')).html_safe | |
217 | end |
|
223 | end | |
218 | end |
|
224 | end | |
219 |
|
225 |
@@ -456,8 +456,7 table.fields_permissions td.required {background:#d88;} | |||||
456 | textarea#custom_field_possible_values {width: 99%} |
|
456 | textarea#custom_field_possible_values {width: 99%} | |
457 | input#content_comments {width: 99%} |
|
457 | input#content_comments {width: 99%} | |
458 |
|
458 | |||
459 | .pagination {font-size: 90%} |
|
459 | p.pagination {margin-top:8px; font-size: 90%} | |
460 | p.pagination {margin-top:8px;} |
|
|||
461 |
|
460 | |||
462 | /***** Tabular forms ******/ |
|
461 | /***** Tabular forms ******/ | |
463 | .tabular p{ |
|
462 | .tabular p{ |
General Comments 0
You need to be logged in to leave comments.
Login now