Lukasz Balcerzak avatar Lukasz Balcerzak committed 1676e60

Timeline detail page cleanup

Comments (0)

Files changed (2)

projector/actions.py

 
 
 def pushed(sender, **kwargs):
-    import logging
-    logging.critical("Pushing!")
-    logging.debug("Sender: %s" % sender)
-    logging.debug("kwargs: %s" % kwargs)
     try:
         project = Project.objects\
             .select_related('repository')\
             .get(repository__path=kwargs.get('repo_path'))
         author = User.objects.get(username=kwargs.get('username'))
-        verb = "pushed"
+        verb = "pushed to"
         project.create_action(verb, author=author)
     except Project.DoesNotExist:
         pass

projector/templates/projector/project/detail.html

         <ul class="nav-vertical">
             {% for action in project.actions.all %}
             <li>
-                {{ action.author }} {% trans action.verb %}
+                <img src="{% gravatar_for_user project.author %}"
+                     width="16"
+                     height="16"/>
+                <a href="{% url projector_users_profile_detail action.author %}">{{ action.author }}</a>
+                
+                {% trans action.verb %}
+
                 {% if action.action_object %}
-                    {{ action_object }} {% trans "on" %}
+                    {% if action_object.get_absolute_url %}
+                    <a href="{{ action_object.get_absolute_url }}">{{ action_object }}</a>
+                    {% else %}
+                    {{ action_object }}
+                    {% endif %}
+                    {% trans "on" %}
                 {% endif %}
-                {{ action.project }} {{ action.created_at|timesince }} {% trans "ago" %}
+                <a href="{{ action.project.get_absolute_url }}">{{ action.project }}</a>
+                {{ action.created_at|timesince }} {% trans "ago" %}
             </li>
             {% empty %}
             <li>
             </li>
             {% endfor %}
 
-            {% comment %}
-            {% for entry in project.timelineentry_set.all %}
-            <li>
-                {% if entry.user %}
-                    {{ entry.action }} by {{ entry.user }} at {{ entry.created_at|date:"Y-m-d H:i:s" }}
-                {% else %}
-                    {{ entry.action }} at {{ entry.created_at|date:"Y-m-d H:i:s" }}
-                {% endif %}
-            </li>
-            {% empty %}
-            <li>
-                <ul class="messages">
-                    <li class="message message-info">{% trans "No timeline entries defined yet" %}</li>
-                </ul>
-            </li>
-            {% endfor %}
-            {% endcomment %}
         </ul>
         
     </div>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.