Use svg icons in previous/next element version links
This commit is contained in:
parent
b685f6eb2e
commit
d430cfb627
4 changed files with 25 additions and 7 deletions
|
@ -41,7 +41,7 @@ module SvgHelper
|
||||||
|
|
||||||
# returns "<" shape if side == -1; ">" if side == 1
|
# returns "<" shape if side == -1; ">" if side == 1
|
||||||
def adjacent_page_svg_tag(side, **options)
|
def adjacent_page_svg_tag(side, **options)
|
||||||
height = 15
|
height = options[:height] || 15
|
||||||
pad = 2
|
pad = 2
|
||||||
segment = (0.5 * height) - pad
|
segment = (0.5 * height) - pad
|
||||||
width = (segment + (2 * pad)).ceil
|
width = (segment + (2 * pad)).ceil
|
||||||
|
|
|
@ -14,12 +14,18 @@
|
||||||
|
|
||||||
<div class='secondary-actions'>
|
<div class='secondary-actions'>
|
||||||
<% if @feature.version > 1 %>
|
<% if @feature.version > 1 %>
|
||||||
<%= link_to "<< #{t('browse.version')} ##{@feature.version - 1}", old_node_path(@feature.node_id, @feature.version - 1) %>
|
<%= link_to old_node_path(@feature.node_id, @feature.version - 1), :class => "icon-link" do %>
|
||||||
|
<%= previous_page_svg_tag :height => 11 %>
|
||||||
|
<%= "#{t('browse.version')} ##{@feature.version - 1}" %>
|
||||||
|
<% end %>
|
||||||
·
|
·
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= link_to t("browse.view_history"), node_history_path(@feature.node_id) %>
|
<%= link_to t("browse.view_history"), node_history_path(@feature.node_id) %>
|
||||||
<% if @feature.version < @feature.current_node.version %>
|
<% if @feature.version < @feature.current_node.version %>
|
||||||
·
|
·
|
||||||
<%= link_to "#{t('browse.version')} ##{@feature.version + 1} >>", old_node_path(@feature.node_id, @feature.version + 1) %>
|
<%= link_to old_node_path(@feature.node_id, @feature.version + 1), :class => "icon-link" do %>
|
||||||
|
<%= "#{t('browse.version')} ##{@feature.version + 1}" %>
|
||||||
|
<%= next_page_svg_tag :height => 11 %>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -14,12 +14,18 @@
|
||||||
|
|
||||||
<div class='secondary-actions'>
|
<div class='secondary-actions'>
|
||||||
<% if @feature.version > 1 %>
|
<% if @feature.version > 1 %>
|
||||||
<%= link_to "<< #{t('browse.version')} ##{@feature.version - 1}", old_relation_path(@feature.relation_id, @feature.version - 1) %>
|
<%= link_to old_relation_path(@feature.relation_id, @feature.version - 1), :class => "icon-link" do %>
|
||||||
|
<%= previous_page_svg_tag :height => 11 %>
|
||||||
|
<%= "#{t('browse.version')} ##{@feature.version - 1}" %>
|
||||||
|
<% end %>
|
||||||
·
|
·
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= link_to t("browse.view_history"), relation_history_path(@feature.relation_id) %>
|
<%= link_to t("browse.view_history"), relation_history_path(@feature.relation_id) %>
|
||||||
<% if @feature.version < @feature.current_relation.version %>
|
<% if @feature.version < @feature.current_relation.version %>
|
||||||
·
|
·
|
||||||
<%= link_to "#{t('browse.version')} ##{@feature.version + 1} >>", old_relation_path(@feature.relation_id, @feature.version + 1) %>
|
<%= link_to old_relation_path(@feature.relation_id, @feature.version + 1), :class => "icon-link" do %>
|
||||||
|
<%= "#{t('browse.version')} ##{@feature.version + 1}" %>
|
||||||
|
<%= next_page_svg_tag :height => 11 %>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -14,12 +14,18 @@
|
||||||
|
|
||||||
<div class='secondary-actions'>
|
<div class='secondary-actions'>
|
||||||
<% if @feature.version > 1 %>
|
<% if @feature.version > 1 %>
|
||||||
<%= link_to "<< #{t('browse.version')} ##{@feature.version - 1}", old_way_path(@feature.way_id, @feature.version - 1) %>
|
<%= link_to old_way_path(@feature.way_id, @feature.version - 1), :class => "icon-link" do %>
|
||||||
|
<%= previous_page_svg_tag :height => 11 %>
|
||||||
|
<%= "#{t('browse.version')} ##{@feature.version - 1}" %>
|
||||||
|
<% end %>
|
||||||
·
|
·
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= link_to t("browse.view_history"), way_history_path(@feature.way_id) %>
|
<%= link_to t("browse.view_history"), way_history_path(@feature.way_id) %>
|
||||||
<% if @feature.version < @feature.current_way.version %>
|
<% if @feature.version < @feature.current_way.version %>
|
||||||
·
|
·
|
||||||
<%= link_to "#{t('browse.version')} ##{@feature.version + 1} >>", old_way_path(@feature.way_id, @feature.version + 1) %>
|
<%= link_to old_way_path(@feature.way_id, @feature.version + 1), :class => "icon-link" do %>
|
||||||
|
<%= "#{t('browse.version')} ##{@feature.version + 1}" %>
|
||||||
|
<%= next_page_svg_tag :height => 11 %>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue