Poprawienie stylów wyświetlania pull-requestów.
authorzuber <marek@stepniowski.com>
Mon, 26 Oct 2009 15:17:33 +0000 (16:17 +0100)
committerzuber <marek@stepniowski.com>
Mon, 26 Oct 2009 15:17:33 +0000 (16:17 +0100)
apps/explorer/views.py
platforma/static/css/managment.css
platforma/templates/manager/pull_request.html

index b17b8c8..2c9b17d 100644 (file)
@@ -109,11 +109,10 @@ def _get_issues_for_file(fileid):
 # = Pull requests =
 # =================
 def pull_requests(request):    
-    objects = PullRequest.objects.order_by('status')
+    objects = PullRequest.objects.order_by('-status', 'timestamp')
 
     if not request.user.has_perm('explorer.book.can_share'):
         objects = objects.filter(comitter=request.user)
 
-    
     return direct_to_template(request, 'manager/pull_request.html', 
         extra_context = {'objects': objects} )
index 5e1c541..d1e2fc2 100644 (file)
@@ -46,18 +46,25 @@ table.request-report
     margin-right: 10px;
 }
 
-.request-report .status-N {
-    background-color: teal;
+.pull-request.status-N {
+    background-color: #FFF;
 }
 
-.request-report .status-R {
+.pull-request.status-R {
     background-color: red;
 }
 
-.request-report .status-A {
-    background-color: gray;
+.pull-request.status-A {
+    background-color: #DDD;
 }
 
 .pull-request .diff {
     white-space: pre;
+    height: 360px;
+    width: 960px;
+    overflow: auto;
+    border: 1px solid #CCC;
+    margin-top: 10px;
+    background-color: #F9F9F9;
+    padding: 2px;
 }
index 020fcda..a44b1ed 100644 (file)
             <li>data: {{ pullreq.timestamp }}</li>
         </ul>
         <p class="comment">{{ pullreq.comment }}</p>
+        {% ifnotequal pullreq.status 'A' %}
         <p class="buttons">
             <button type="button" class="awesome button green accept-button" title="{{pullreq.id}}">Akceptuj</button>
             <button type="button" class="awesome button show-diff" title="{{pullreq.id}}">Zmiany</button>
             <a class="awesome button" href="{% url editor_view pullreq.document %}?user=$prq-{{pullreq.id}}">Zobacz</a>
         </p>
+        {% endifnotequal %}
     </div>
     {% endfor %}
 {% else %}