Ryan Wilcox avatar Ryan Wilcox committed 533e69a

project detail view now has attachements

Comments (0)

Files changed (1)

project_dashboard/projects/templates/projects/detail.html

+{% extends "base.html" %}
+
+{% block content %}
+
 {% load comments %}
+{% load attachments_tags %}
 
 <div class="project">
   
     <span class="project__customer_email">{{ project.customer_email }}</span>
   </p>
   
-  <div class="comments">
-    {% render_comment_list for project %}
-  </div>
+  <div id="comments_section">
+    <h1>Comments</h1>
+    <div class="comments">
+      {% render_comment_list for project %}
+    </div>
   
-  <div class="comment">
-    {% render_comment_form for project %}
+    <div class="comment">
+      {% render_comment_form for project %}
+    </div>
   </div>
 
+
+  <div id="attachements_section">
+    <h1>Attachments</h1>
+    <div class="attachments">
+      {% get_attachments_for project as "attachments_list" %}
+      {% for attachment in attachments_list %}
+        <li>
+        <a href="{{ attachment.attachment_file.url }}">{{ attachment.filename }}</a>
+          {% attachment_delete_link attachment %}
+        </li>
+      {% endfor %}
+    </div>
+
+    <div class="attachment">
+    {% if request.user.is_authenticated %}
+      {% attachment_form project %}
+    {% else %}
+      To add new attachments please <a href="/accounts/login">Login</a>
+    {% endif %}
+    </div>
+  </div>
 </div>
-<p><a href="/projects/">Back</a></p>
+<p><a href="/projects/">Back</a></p>
+
+{% endblock %}
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.