From af6017ee9a7770e1b7526ae73409f43bc63c0f82 Mon Sep 17 00:00:00 2001
From: Neha Kandpal <iec2015048@iiita.ac.in>
Date: Dec 22 2017 18:07:00 +0000
Subject: Removed Assignedto and Createdby column from Assigned and Opened Issues tables on /user/<user>/issues


---

diff --git a/pagure/templates/user_issues.html b/pagure/templates/user_issues.html
index e5150cc..66624e3 100644
--- a/pagure/templates/user_issues.html
+++ b/pagure/templates/user_issues.html
@@ -22,10 +22,7 @@
       {% set outer_loop = loop %}
       {% if outer_loop.index == 1 %}
         <b>Assigned Issues <span id="assigned_issue_count"></span></b>
-      {% else %}
-        <b>Opened Issues <span id="opened_issue_count"></span></b>
-      {% endif %}
-      <table class="table table-hover table-striped m-b-0 m-t-1">
+        <table class="table table-hover table-striped m-b-0 m-t-1">
         <thead class="thead-default">
             <tr>
                 <th class="nowrap">#</th>
@@ -36,7 +33,6 @@
                 <th class="nowrap">Priority</th>
                 <th class="nowrap">Project</th>
                 <th class="assigned nowrap">Created by</th>
-                <th class="assigned nowrap">Assigned to</th>
             </tr>
         </thead>
         <tfoot>
@@ -91,6 +87,78 @@
                   {{ issue.user.default_email | avatar(16) | safe }}
                   {{ issue.user.user }}
                 </td>
+            </tr>
+        {% else %}
+            <tr>
+                <td colspan="9" class="noresult">No issues found</td>
+            </tr>
+        {% endfor %}
+        </tbody>
+        </table>
+
+      {% else %}
+        <b>Opened Issues <span id="opened_issue_count"></span></b>
+        <table class="table table-hover table-striped m-b-0 m-t-1">
+        <thead class="thead-default">
+            <tr>
+                <th class="nowrap">#</th>
+                <th>Status</th>
+                <th>Title</th>
+                <th class="open_date nowrap">Opened</th>
+                <th class="open_date nowrap">Modified</th>
+                <th class="nowrap">Priority</th>
+                <th class="nowrap">Project</th>
+                <th class="assigned nowrap">Assigned to</th>
+            </tr>
+        </thead>
+        <tfoot>
+        </tfoot>
+        <tbody>
+        {% for issue in issues if issue.project.settings.get('issue_tracker', True) %}
+          <tr class="issue-status issue-status-{{issue.status|lower}} loop-index-{{outer_loop.index}}"
+              {%- if issue.status|lower != "open" %} style="display:none;"{% endif %}>
+                <td class="nowrap"><span class="label label-default">#{{ issue.id }}</span></td>
+                <td><span class="label {%
+                    if issue.status|lower == 'closed' %}label-danger{%
+                    elif issue.status|lower == 'open'%}label-primary{%
+                    else %}label-default{%
+                    endif%}">{{issue.status}}</span></td>
+                <td class="stretch-table-column">
+                  <a href="{{ url_for(
+                      'view_issue',
+                      repo=issue.project.name,
+                      username=issue.project.user.username if issue.project.is_fork else None,
+                      namespace=issue.project.namespace,
+                      issueid=issue.id) }}">
+                    {% if issue.private %}
+                        Private Issue
+                    {% else %}
+                        {{ issue.title | noJS("img") | safe }}
+                    {% endif %}
+                  </a>
+                </td>
+                <td class="nowrap">
+                    <span title="{{issue.date_created.strftime('%Y-%m-%d %H:%M:%S')}}">{{
+                        issue.date_created | humanize}}</span>
+                </td>
+                <td class="nowrap">
+                    <span title="{{issue.last_updated.strftime('%Y-%m-%d %H:%M:%S')}}">{{
+                        issue.last_updated | humanize}}</span>
+                </td>
+                <td>
+                    {{ issue.project.priorities[issue.priority | string] or '' }}
+                </td>
+                <td class="nowrap">
+                  <a href="{{ url_for(
+                    'view_repo',
+                    repo=issue.project.name,
+                    username=issue.project.user.username if issue.project.is_fork else None,
+                    namespace=issue.project.namespace) }}">
+                    {{ issue.project.user.username + '/' if issue.project.is_fork }}
+                    {{ issue.project.namespace + '/' if issue.project.namespace }}
+                    {{ issue.project.name }}
+                  </a>
+                </td>
                 <td class="nowrap">
                   {% if issue.assignee %}
                   {{ issue.assignee.default_email | avatar(16) | safe }}
@@ -106,7 +174,8 @@
             </tr>
         {% endfor %}
         </tbody>
-      </table>
+        </table>
+    {% endif %}
       <br>
     {% endfor %}
   </div>

