Skip to contentSkip to conversation

patchwork/templates/patchwork/series.html: Add link column

PATCH New Jose Lamego 1 participant 1 message Sep 7, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 patchwork/templates/patchwork/series.html: Add link column

Clicking on a patch name in Series view displays the patch at the botton section in same page, but there is no easy way to get a direct link to the patch, for example: to share the link.

This change includes the column "Link" where a direct link to the patch is displayed and labeled with the patch id, that can be copied or clicked to displayed the patch detail on a new tab.

[YOCTO #11888]

---
 patchwork/templates/patchwork/series.html | 4 ++++
 1 file changed, 4 insertions(+)
patchwork/templates/patchwork/series.html +4 -0
index 6c374f7..6c4608b 100644
@@ -110,6 +110,7 @@ function toggle_headers(link_id, headers_id)
                 </th>
               {% endif %}
               <th>Name</th>
+              <th>Link</th>
               <th>Submitter</th>
               <th>State</th>
             </tr>
@@ -126,6 +127,9 @@ function toggle_headers(link_id, headers_id)
                 <td><a href="#" class="patch-link" data-toggle="tooltip" title="Click to view the patch at bottom section"
                      data-url="{% url 'patchwork.views.patch.patch' patch_id=patch.id %}"
                      >{{ patch.name|default:"[no subject]"|truncatechars:100 }}</a></td>
+                <td><a href="{% url 'patchwork.views.patch.patch' patch_id=patch.id %}"
+                     data-toggle="tooltip" title="Click to view the patch in a new tab"
+                     target="_blank">{{ patch.id }}</a></td>
                 <td>{{ patch.submitter|personify:project }}</td>
                 <td>{{ patch.state }}</td>
               <tr>
Signature · 1 line
2.7.4