Skip to content

Instantly share code, notes, and snippets.

@diegorv
Created March 4, 2009 18:47
Show Gist options
  • Select an option

  • Save diegorv/73945 to your computer and use it in GitHub Desktop.

Select an option

Save diegorv/73945 to your computer and use it in GitHub Desktop.
<div id="left_col">
<% title "Your Projects" %>
<h1><%=h yield(:title) %></h1>
<% if @projects.empty? %>
<p>No projects yet. Click the button on the right to add one.</p>
<% else %>
<% for project in @projects %>
<div class="item <%= cycle('normal', 'alt') %>">
<h3><%= link_to h(project.name), project %> <span class="date">(Last Active on <%=h project.last_activity_at.strftime("%b, %d %Y at %I:%M %p") %>)</span></h3>
<p class="desc"><%= truncate(project.description, 255, '...').gsub(/\n/, '<br>') %></p>
<div class="project_links">
<% if project.show_code_snippets? %>
<%= link_to " Code (" + project.code_snippets.count.to_s + ")", project_code_snippets_path(project) %> |
<% end %>
<% if project.show_links? %>
<%= link_to " Links (" + project.links.count.to_s + ")", project_links_path(project) %> |
<% end %>
<% if project.show_notes? %>
<%= link_to " Notes (" + project.notes.count.to_s + ")", project_notes_path(project) %> |
<% end %>
<% if project.show_palettes? %>
<%= link_to " Palettes (" + project.palettes.count.to_s + ")", project_palettes_path(project) %> |
<% end %>
<% if project.show_photos? %>
<%= link_to " Photos (" + project.photos.count.to_s + ")", project_photos_path(project) %> |
<% end %>
<% if project.show_screenshots? %>
<%= link_to " Screenshots (" + project.screenshots.count.to_s + ")", project_screenshots_path(project) %>
<% end %>
</div>
</div>
<% end %>
<%= will_paginate @projects %>
<% end %>
</div>
<div id="sidebar">
<%= render :partial => "projects_overview_sidebar" %>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment