Commits

Josh VanderLinden committed 9fc06e4

Updated the entry model and default template to display the time an entry was paused

Comments (0)

Files changed (2)

pendulum/models.py

         return utils.get_total_time(self.get_seconds())
     total_time = property(__total_time)
 
+    def __paused_time(self):
+        """
+        Returns the total time paused for this entry in HH:MM:SS format
+        """
+        return utils.get_total_time(self.seconds_paused)
+    paused_time = property(__paused_time)
+
     def __hours(self):
         """
         Print the hours in a nice, rounded format

pendulum/templates/pendulum/entry_list.html

             <a href="{% url pendulum-delete entry.id %}">&times;</a>
         </td>
     </tr>
+    {% if entry.seconds_paused %}<tr class="{{ rowclass }}">
+        <td colspan="2">&nbsp;</td>
+        <th>Breaks:</th>
+        <td class="entry-paused">{{ entry.paused_time }}</td>
+        <td colspan="3">&nbsp;</td>
+    </tr>{% endif %}
     {% if entry.comments %}<tr class="{{ rowclass }}">
         <td colspan="7" class="entry-comments">{{ entry.comments }}</td>
     </tr>{% endif %}