Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <% unless @projects.empty? %>
- <table>
- <% number_of_columns = 5 %>
- <% @projects.each_with_index do |project, project_index| %>
- <% if (project_index == 0)%>
- <tr>
- <% end %>
- <% if (project_index % number_of_columns == 0) %>
- </tr>
- <tr>
- <% end %>
- <td>
- <% project_link_dom_id = "project_link_" + project.id.to_s %>
- <a href="<%= project_path(project) %>" class="invisible_link">
- <%=
- image_tag(
- project.icon.url(:thumbnail),
- {
- :class => "project_icon",
- :onmouseover => "toggle_css_class(document.getElementById('#{ project_link_dom_id }'), 'link', 'link_hover');",
- :onmouseout => "toggle_css_class(document.getElementById('#{ project_link_dom_id }'), 'link', 'link_hover');"
- }
- )
- %>
- </a>
- <br/>
- <%= link_to project.name.downcase, { :action => :show, :id => project}, { :id => project_link_dom_id } -%><br/>
- </td>
- <% end %>
- </table>
- <% end %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement