#79 Make the pagure issue widget graphically closer to the updates2stable one and fix the links
Merged 6 years ago by ralph. Opened 6 years ago by pingou.
pingou/fedora-hubs fix_pagure_issues  into  develop

file modified
+46 -64
@@ -10,71 +10,53 @@ 

  pagure_url = "https://pagure.io/api/0"

  

  template = jinja2.Template("""

-   <div class="container">

-     <table id="pagure-issues-list"

-         class="table table-hover table-striped m-b-0">

-       <thead class="thead-default">

-         <tr>

-           <th id="project-title">Project</th>

-           <th id="issue-title">Issue</th>

-           <th class="open_by">Reporter</th>

-           <th class="assigned">Assignee</th>

-         </tr>

-       </thead>

-       <tfoot>

-       </tfoot>

-       <tbody>

-         {% for issue in all_issues %}

-         <tr>

-           <td>

-             {% if issue['issue_project_user'] %}

-             <a href="https://pagure.io/forks/{{

-                 issue['issue_project_user'] }}/{{ issue['issue_project_name'] }}"

-               target="_blank">

-               {{ issue['issue_project_user'] }}/{{ issue['issue_project_name'] }}

-             {% else %}

-             <a href="https://pagure.io/{{

-               issue['issue_project_name'] }}" target="_blank">

-               {{ issue['issue_project_name'] }}

-             {% endif %}

-             </a>

-           </td>

-           <td>

-             <span class="label label-default">#{{ issue['issue_id'] }}</span>

-             <a href="https://pagure.io/{{ repo }}/pull-request/{{

-              issue['issue_id'] }}" target="_blank"

-              title="{{ issue['issue_title_full'] }}">>

-               {{ issue['issue_title'] }} ...

-             </a>

-           </td>

-           <td>

-             <a href="https://pagure.io/user/{{ issue['issue_openedby'] }}"

-                 target="_blank">

-               {{ issue['issue_openedby'] }}

-             </a>

-           </td>

-           <td>

-             {% if issue['issue_assignee'] %}

-               <a href="https://pagure.io/user/{{issue['issue_assignee'] }}"

-                   target="_blank">

-                 {{issue['issue_assignee'] }}

-               </a>

-             {% else %}

-               <span class="text-muted">unassigned</span>

-             {% endif %}

-           </td>

-         </tr>

-         {% endfor %}

-       </tbody>

-     </table>

-     </div class="row">

-       <center>

-         <a href="https://pagure.io/{{ repo }}/issues" target="_blank">

-           All Issues

+ <a class="btn btn-success" target="_blank"

+     href="https://pagure.io/{{ repo }}/issues">

+   All Issues

+ </a>

+ <hr/>

+ 

+ <ul class="media-list">

+   {% for issue in all_issues[:10] %}

+     <li class="media">

+       <div class="media-left">

+         <a  href="https://pagure.io/{{ repo }}/issue/{{ issue['issue_id'] }}"

+             target="_blank">

+           {{ issue['issue_project_name'] }}

+         <span class="label label-default">#{{ issue['issue_id'] }}</span>

          </a>

-       <center>

-     </div>

-   </div>

+       </div>

+       <div class="media-body">

+         <h4 class="media-heading">

+           <span title="{{ issue['issue_title_full'] }}">

+             {{ issue['issue_title'] }} {% if

+               issue['issue_title_full'] | length > 45 %} ... {% endif %}

+           </span>

+         </h4>

+         Opened by:

+           <a href="https://pagure.io/user/{{ issue['issue_openedby'] }}"

+               target="_blank">

+             {{ issue['issue_openedby'] }}

+           </a>

+         --

+         {% if issue['issue_assignee'] %}

+           Assigned to:

+           <a href="https://pagure.io/user/{{issue['issue_assignee'] }}"

+               target="_blank">

+             {{issue['issue_assignee'] }}

+           </a>

+         {% else %}

+           <span class="text-muted">Unassigned</span>

+         {% endif %}

+       </div>

+     </li>

+   {% endfor %}

+   {% if all_issues | length > 10 %}

+   <li>

+     And {{ all_issues | length - 10 }} more ...

+   </li>

+   {% endif %}

+ </ul>

  """)

  

  

no initial comment

Pull-Request has been merged by ralph

6 years ago
Metadata