To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / common / _tabs.html.erb @ 1531:ae8145b28b2b
History | View | Annotate | Download (1.05 KB)
| 1 |
<div class="tabs"> |
|---|---|
| 2 |
<ul>
|
| 3 |
<% tabs.each do |tab| -%>
|
| 4 |
<li><%= link_to l(tab[:label]), { :tab => tab[:name] }, |
| 5 |
:id => "tab-#{tab[:name]}",
|
| 6 |
:class => (tab[:name] != selected_tab ? nil : 'selected'),
|
| 7 |
:onclick => "showTab('#{tab[:name]}', this.href); this.blur(); return false;" %></li> |
| 8 |
<% end -%>
|
| 9 |
</ul>
|
| 10 |
<div class="tabs-buttons" style="display:none;"> |
| 11 |
<button class="tab-left" onclick="moveTabLeft(this); return false;"></button> |
| 12 |
<button class="tab-right" onclick="moveTabRight(this); return false;"></button> |
| 13 |
</div>
|
| 14 |
</div>
|
| 15 |
|
| 16 |
<script>
|
| 17 |
$(document).ready(displayTabsButtons);
|
| 18 |
$(window).resize(displayTabsButtons);
|
| 19 |
</script>
|
| 20 |
|
| 21 |
<% tabs.each do |tab| -%>
|
| 22 |
<%= content_tag('div', render(:partial => tab[:partial], :locals => {:tab => tab} ),
|
| 23 |
:id => "tab-content-#{tab[:name]}",
|
| 24 |
:style => (tab[:name] != selected_tab ? 'display:none' : nil),
|
| 25 |
:class => 'tab-content') %>
|
| 26 |
<% end -%>
|