Sha256: 7deb48c0995041f0de4be8aff22f3493298628485b1c0083cf0b6b375d2ac6c3

Contents?: true

Size: 1.9 KB

Versions: 5

Compression:

Stored size: 1.9 KB

Contents

<div class="row">
  <div class="span3" id="sidebar">
    <ul class="nav nav-list" data-spy="affix" data-offset-top="125">
      <% @tasks.keys.each do |project| %>
        <li>
          <a href="#project-<%= project.parameterize %>"><i class="icon-chevron-right"></i> <%= project %></a>
        </li>
      <% end %>
    </ul>
  </div>

  <div class="span9">
    <div id="listing">
      <% @tasks.each do |proj, tasks| %>
        <% doneness = (tasks.select { |t| t.status == 'completed' }.count.to_f / tasks.count.to_f) * 100 %>
        <section class="project-container" id="project-<%= proj.parameterize %>">
          <h2 class="project <%= doneness == 100 ? 'done' : 'pending' %>">
            <%= proj %>&nbsp;
            <a href="/projects/<%= linkify(proj) %>"><i class="icon-circle-arrow-right"></i></a>
          </h2>
          <div class="progress progress-striped">
            <div class="bar" style="width: <%= doneness.to_i %>%;"></div>&nbsp;<%= doneness.to_i %>%
          </div>
          <table class="table table-striped table-hover">
            <thead>
              <tr>
                <th>Description</th>
                <th>Due</th>
                <th>Tags</th>
                <th>Priority</th>
              </tr>
            </thead>
            <tbody>
              <% tasks.each do |task| %>
                <% if task.status == 'pending' %>
                  <tr class="<%= colorize_date(task.due) %>">
                    <td><%= task.description %></td>
                    <td><%= format_date(task.due) unless task.due.nil? %></td>
                    <td><%= task.tags.join(', ') unless task.tags.nil? %></td>
                    <td><%= task.priority unless task.priority.nil? %></td>
                  </tr>
                <% end %>
              <% end %>
            </tbody>
          </table>
        </section>
        <hr class="section-separator" />
      <% end %>
    </div>
  </div>
</div>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
taskwarrior-web-1.0.14 lib/taskwarrior-web/views/projects.erb
taskwarrior-web-1.0.13 lib/taskwarrior-web/views/projects.erb
taskwarrior-web-1.0.12 lib/taskwarrior-web/views/projects.erb
taskwarrior-web-1.0.11 lib/taskwarrior-web/views/projects.erb
taskwarrior-web-1.0.10 lib/taskwarrior-web/views/projects.erb