[Logilogi-svn] SF.net SVN: logilogi:[1630] trunk/app
Status: Beta
Brought to you by:
wybow
|
From: <wy...@us...> - 2009-10-28 21:38:50
|
Revision: 1630
http://logilogi.svn.sourceforge.net/logilogi/?rev=1630&view=rev
Author: wybow
Date: 2009-10-28 21:38:23 +0000 (Wed, 28 Oct 2009)
Log Message:
-----------
Added anchors for easy reading
Modified Paths:
--------------
trunk/app/helpers/application_helper.rb
trunk/app/views/logis/_logi.html.erb
trunk/app/views/logis/_steps.html.erb
Modified: trunk/app/helpers/application_helper.rb
===================================================================
--- trunk/app/helpers/application_helper.rb 2009-10-26 23:00:49 UTC (rev 1629)
+++ trunk/app/helpers/application_helper.rb 2009-10-28 21:38:23 UTC (rev 1630)
@@ -691,7 +691,7 @@
else
text = self.pre_truncate_options(logi.to_s(:for => :show), options)
end
- link_to text, @controller.logi_ll_url(logi), html_options
+ link_to text, @controller.logi_ll_url(logi, :anchor => options[:anchor]), html_options
end
def logi_extended_link(logi, options = {}, html_options = {})
Modified: trunk/app/views/logis/_logi.html.erb
===================================================================
--- trunk/app/views/logis/_logi.html.erb 2009-10-26 23:00:49 UTC (rev 1629)
+++ trunk/app/views/logis/_logi.html.erb 2009-10-28 21:38:23 UTC (rev 1630)
@@ -1,3 +1,4 @@
+<a name="logi_top"></a>
<div id="<%= id %>" class="box logi logi_body logi_current">
<%= (local_assigns[:action] == :view ?
button_to('Insert into logi',
@@ -10,13 +11,15 @@
</div>
<% if local_assigns[:action] == :view and @path
index = @path.steps.index(@path.steps.detect {|s| s.logi == @logi})
- next_logi = @path.steps[index + 1].logi %>
- <div class="next_step">
- <%= button_to 'Next', logi_ll_url(next_logi),
- :class => 'next_button' %>
- <span class="link">Next on read-path: <%= logi_ll_link(
- next_logi, :show => :title, :length => 38) %></span>
- <div class="spacer"></div>
- </div>
+ if index + 1 < @path.steps.size
+ next_logi = @path.steps[index + 1].logi %>
+ <div class="next_step">
+ <%= button_to 'Next', logi_ll_url(next_logi, :anchor => 'logi_top'),
+ :class => 'next_button' %>
+ <span class="link">Next on read-path: <%= logi_ll_link(
+ next_logi, :show => :title, :length => 38, :anchor => 'logi_top') %></span>
+ <div class="spacer"></div>
+ </div>
+ <% end %>
<% end %>
</div>
Modified: trunk/app/views/logis/_steps.html.erb
===================================================================
--- trunk/app/views/logis/_steps.html.erb 2009-10-26 23:00:49 UTC (rev 1629)
+++ trunk/app/views/logis/_steps.html.erb 2009-10-28 21:38:23 UTC (rev 1630)
@@ -16,7 +16,7 @@
puts steps.size
%>
<% if index > 1 %>
- <%= button_to 'Previous', logi_ll_url(steps[index - 1].logi),
+ <%= button_to 'Previous', logi_ll_url(steps[index - 1].logi, :anchor => 'logi_top'),
:class => 'up_button' %>
<div class="spacer"></div>
<% end %>
@@ -34,7 +34,7 @@
<div class="step step_current">
<div class="panel_content_padding">
<div class="level<%= step.level %>">
- <%= logi_ll_link(step.logi, :show => :title, :length => 52) %>
+ <%= logi_ll_link(step.logi, :anchor => 'logi_top', :show => :title, :length => 52) %>
</div>
<div class="spacer"></div>
</div>
@@ -42,7 +42,7 @@
<% else %>
<div class="step">
<div class="level<%= step.level %>">
- <%= logi_ll_link(step.logi, :show => :title, :length => 52) %>
+ <%= logi_ll_link(step.logi, :anchor => 'logi_top', :show => :title, :length => 52) %>
</div>
</div>
<% end %>
@@ -57,7 +57,7 @@
<% end %>
<% if index + 1 < steps.size %>
<div class="spacer"></div>
- <%= button_to 'Next', logi_ll_url(steps[index + 1].logi),
+ <%= button_to 'Next', logi_ll_url(steps[index + 1].logi, :anchor => 'logi_top'),
:class => 'down_button' %>
<% end %>
<% end %>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|