Sha256: ed93df448b90be0d94773e757324945a90e7dd0ec610e0927afdb60ee9020de3

Contents?: true

Size: 1.35 KB

Versions: 5

Compression:

Stored size: 1.35 KB

Contents

<div id="listing">
  <% @tasks.each do |proj, tasks| %>
    <% doneness = (tasks.select { |t| t.status == 'completed' }.count.to_f / tasks.count.to_f) * 100 %>
    <% unless doneness == 100.0 %>
      <div class="project-container">
        <h3 class="project <%= doneness == 100.0 ? 'done' : 'pending' %>">
          <a href="/projects/<%= linkify(proj, :project) %>"><%= proj %></a>
        </h3>
        <div class="progress">
          <div class="bar" style="width: <%= doneness.to_i %>%;"><%= doneness.to_i %>%</div>
        </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>
      </div>
    <% end %>
  <% end %>
</div>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
taskwarrior-web-1.0.7 lib/taskwarrior-web/views/projects.erb
taskwarrior-web-1.0.6 lib/taskwarrior-web/views/projects.erb
taskwarrior-web-1.0.5 lib/taskwarrior-web/views/projects.erb
taskwarrior-web-1.0.4 lib/taskwarrior-web/views/projects.erb
taskwarrior-web-1.0.3 lib/taskwarrior-web/views/projects.erb