mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-04 03:27:12 -05:00 
			
		
		
		
	Merge pull request #344 from erikarvstedt/increase_link_area
[Help needed] Increase link area in documents listing
This commit is contained in:
		
						commit
						ac0cda861e
					
				@ -132,9 +132,10 @@
 | 
			
		||||
    {# 3: Image #}
 | 
			
		||||
    {# 4: Correspondent #}
 | 
			
		||||
    {# 5: Tags #}
 | 
			
		||||
    {# 6: Document edit url #}
 | 
			
		||||
    <div class="box">
 | 
			
		||||
      <div class="result">
 | 
			
		||||
        <div class="header">
 | 
			
		||||
        <div class="header" onclick="location.href='{{ result.6 }}';" style="cursor: pointer;">
 | 
			
		||||
          <div class="checkbox">{{ result.0 }}</div>
 | 
			
		||||
          <div class="info">
 | 
			
		||||
            {{ result.4 }}<br />
 | 
			
		||||
 | 
			
		||||
@ -1,3 +1,5 @@
 | 
			
		||||
import re
 | 
			
		||||
 | 
			
		||||
from django.contrib.admin.templatetags.admin_list import (
 | 
			
		||||
    result_headers,
 | 
			
		||||
    result_hidden_fields,
 | 
			
		||||
@ -6,6 +8,8 @@ from django.contrib.admin.templatetags.admin_list import (
 | 
			
		||||
from django.template import Library
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
EXTRACT_URL = re.compile(r'href="(.*?)"')
 | 
			
		||||
 | 
			
		||||
register = Library()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -25,4 +29,15 @@ def result_list(cl):
 | 
			
		||||
            'result_hidden_fields': list(result_hidden_fields(cl)),
 | 
			
		||||
            'result_headers': headers,
 | 
			
		||||
            'num_sorted_fields': num_sorted_fields,
 | 
			
		||||
            'results': list(results(cl))}
 | 
			
		||||
            'results': map(add_doc_edit_url, results(cl))}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def add_doc_edit_url(result):
 | 
			
		||||
    """
 | 
			
		||||
    Make the document edit URL accessible to the view as a separate item
 | 
			
		||||
    """
 | 
			
		||||
    title = result[1]
 | 
			
		||||
    match = re.search(EXTRACT_URL, title)
 | 
			
		||||
    edit_doc_url = match[1]
 | 
			
		||||
    result.append(edit_doc_url)
 | 
			
		||||
    return result
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user