mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-31 02:27:10 -04:00 
			
		
		
		
	Merge pull request #873 from paperless-ngx/feature-mobile-friendlier-manage-pages
Feature: mobile friendlier manage pages
This commit is contained in:
		
						commit
						7c2137fcda
					
				| @ -26,7 +26,7 @@ describe('manage', () => { | ||||
|         req.reply({ count: 3, next: null, previous: null, results: [] }) | ||||
|     }) | ||||
|     cy.visit('/tags') | ||||
|     cy.get('tbody').find('button').contains('Documents').first().click() // id = 4
 | ||||
|     cy.get('tbody').find('button:visible').contains('Documents').first().click() // id = 4
 | ||||
|     cy.contains('3 documents') | ||||
|   }) | ||||
| }) | ||||
|  | ||||
| @ -372,15 +372,15 @@ | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.html</context> | ||||
|           <context context-type="linenumber">40</context> | ||||
|           <context context-type="linenumber">54</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.html</context> | ||||
|           <context context-type="linenumber">40</context> | ||||
|           <context context-type="linenumber">54</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.html</context> | ||||
|           <context context-type="linenumber">40</context> | ||||
|           <context context-type="linenumber">54</context> | ||||
|         </context-group> | ||||
|       </trans-unit> | ||||
|       <trans-unit id="472206565520537964" datatype="html"> | ||||
| @ -1170,15 +1170,27 @@ | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.html</context> | ||||
|           <context context-type="linenumber">51</context> | ||||
|           <context context-type="linenumber">46</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.html</context> | ||||
|           <context context-type="linenumber">51</context> | ||||
|           <context context-type="linenumber">46</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.html</context> | ||||
|           <context context-type="linenumber">51</context> | ||||
|           <context context-type="linenumber">46</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.html</context> | ||||
|           <context context-type="linenumber">65</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.html</context> | ||||
|           <context context-type="linenumber">65</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.html</context> | ||||
|           <context context-type="linenumber">65</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.ts</context> | ||||
| @ -1431,7 +1443,7 @@ | ||||
|         <source>Confirm delete</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context> | ||||
|           <context context-type="linenumber">412</context> | ||||
|           <context context-type="linenumber">421</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.ts</context> | ||||
| @ -1442,28 +1454,28 @@ | ||||
|         <source>Do you really want to delete document "<x id="PH" equiv-text="this.document.title"/>"?</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context> | ||||
|           <context context-type="linenumber">413</context> | ||||
|           <context context-type="linenumber">422</context> | ||||
|         </context-group> | ||||
|       </trans-unit> | ||||
|       <trans-unit id="6691075929777935948" datatype="html"> | ||||
|         <source>The files for this document will be deleted permanently. This operation cannot be undone.</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context> | ||||
|           <context context-type="linenumber">414</context> | ||||
|           <context context-type="linenumber">423</context> | ||||
|         </context-group> | ||||
|       </trans-unit> | ||||
|       <trans-unit id="719892092227206532" datatype="html"> | ||||
|         <source>Delete document</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context> | ||||
|           <context context-type="linenumber">416</context> | ||||
|           <context context-type="linenumber">425</context> | ||||
|         </context-group> | ||||
|       </trans-unit> | ||||
|       <trans-unit id="1844801255494293730" datatype="html"> | ||||
|         <source>Error deleting document: <x id="PH" equiv-text="JSON.stringify(error)"/></source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/document-detail/document-detail.component.ts</context> | ||||
|           <context context-type="linenumber">432</context> | ||||
|           <context context-type="linenumber">441</context> | ||||
|         </context-group> | ||||
|       </trans-unit> | ||||
|       <trans-unit id="6857598786757174736" datatype="html"> | ||||
| @ -1727,6 +1739,18 @@ | ||||
|           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.html</context> | ||||
|           <context context-type="linenumber">45</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.html</context> | ||||
|           <context context-type="linenumber">59</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.html</context> | ||||
|           <context context-type="linenumber">59</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.html</context> | ||||
|           <context context-type="linenumber">59</context> | ||||
|         </context-group> | ||||
|       </trans-unit> | ||||
|       <trans-unit id="2509141182388535183" datatype="html"> | ||||
|         <source>View</source> | ||||
| @ -2025,8 +2049,8 @@ | ||||
|           <context context-type="linenumber">33</context> | ||||
|         </context-group> | ||||
|       </trans-unit> | ||||
|       <trans-unit id="697889236478552968" datatype="html"> | ||||
|         <source>Last correspondence</source> | ||||
|       <trans-unit id="6360600151505327572" datatype="html"> | ||||
|         <source>Last used</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/manage/correspondent-list/correspondent-list.component.ts</context> | ||||
|           <context context-type="linenumber">37</context> | ||||
| @ -2132,19 +2156,34 @@ | ||||
|           <context context-type="linenumber">174</context> | ||||
|         </context-group> | ||||
|       </trans-unit> | ||||
|       <trans-unit id="7376880254267897616" datatype="html"> | ||||
|         <source>Filter Documents</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.html</context> | ||||
|           <context context-type="linenumber">44</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.html</context> | ||||
|           <context context-type="linenumber">44</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.html</context> | ||||
|           <context context-type="linenumber">44</context> | ||||
|         </context-group> | ||||
|       </trans-unit> | ||||
|       <trans-unit id="808959623879724772" datatype="html"> | ||||
|         <source>{VAR_PLURAL, plural, =1 {One <x id="INTERPOLATION"/>} other {<x id="INTERPOLATION_1"/> total <x id="INTERPOLATION"/>s}}</source> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.html</context> | ||||
|           <context context-type="linenumber">60</context> | ||||
|           <context context-type="linenumber">74</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.html</context> | ||||
|           <context context-type="linenumber">60</context> | ||||
|           <context context-type="linenumber">74</context> | ||||
|         </context-group> | ||||
|         <context-group purpose="location"> | ||||
|           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.html</context> | ||||
|           <context context-type="linenumber">60</context> | ||||
|           <context context-type="linenumber">74</context> | ||||
|         </context-group> | ||||
|       </trans-unit> | ||||
|       <trans-unit id="810888510148304696" datatype="html"> | ||||
|  | ||||
| @ -34,7 +34,7 @@ export class CorrespondentListComponent extends ManagementListComponent<Paperles | ||||
|       [ | ||||
|         { | ||||
|           key: 'last_correspondence', | ||||
|           name: $localize`Last correspondence`, | ||||
|           name: $localize`Last used`, | ||||
|           valueFn: (c: PaperlessCorrespondent) => { | ||||
|             return this.datePipe.transform(c.last_correspondence) | ||||
|           }, | ||||
|  | ||||
| @ -17,7 +17,7 @@ | ||||
|   <thead> | ||||
|     <tr> | ||||
|       <th scope="col" sortable="name" [currentSortField]="sortField" [currentSortReverse]="sortReverse" (sort)="onSort($event)" i18n>Name</th> | ||||
|       <th scope="col" sortable="matching_algorithm" [currentSortField]="sortField" [currentSortReverse]="sortReverse" (sort)="onSort($event)" i18n>Matching</th> | ||||
|       <th scope="col" class="d-none d-sm-table-cell" sortable="matching_algorithm" [currentSortField]="sortField" [currentSortReverse]="sortReverse" (sort)="onSort($event)" i18n>Matching</th> | ||||
|       <th scope="col" sortable="document_count" [currentSortField]="sortField" [currentSortReverse]="sortReverse" (sort)="onSort($event)" i18n>Document count</th> | ||||
|       <th scope="col" *ngFor="let column of extraColumns" sortable="{{column.key}}" [currentSortField]="sortField" [currentSortReverse]="sortReverse" (sort)="onSort($event)">{{column.name}}</th> | ||||
|       <th scope="col" i18n>Actions</th> | ||||
| @ -26,14 +26,28 @@ | ||||
|   <tbody> | ||||
|     <tr *ngFor="let object of data"> | ||||
|       <td scope="row">{{ object.name }}</td> | ||||
|       <td scope="row">{{ getMatching(object) }}</td> | ||||
|       <td scope="row" class="d-none d-sm-table-cell">{{ getMatching(object) }}</td> | ||||
|       <td scope="row">{{ object.document_count }}</td> | ||||
|       <td scope="row" *ngFor="let column of extraColumns"> | ||||
|         <div *ngIf="column.rendersHtml; else colValue" [innerHtml]="column.valueFn.call(null, object) | safeHtml"></div> | ||||
|         <ng-template #colValue>{{ column.valueFn.call(null, object) }}</ng-template> | ||||
|       </td> | ||||
|       <td scope="row"> | ||||
|         <div class="btn-group"> | ||||
|         <div class="btn-group d-block d-sm-none"> | ||||
|           <div ngbDropdown class="d-inline-block"> | ||||
|             <button type="button" class="btn btn-link" id="actionsMenuMobile" ngbDropdownToggle> | ||||
|               <svg class="toolbaricon" fill="currentColor"> | ||||
|                 <use xlink:href="assets/bootstrap-icons.svg#three-dots-vertical" /> | ||||
|               </svg> | ||||
|             </button> | ||||
|             <div ngbDropdownMenu aria-labelledby="actionsMenuMobile"> | ||||
|               <button (click)="filterDocuments(object)" ngbDropdownItem i18n>Filter Documents</button> | ||||
|               <button (click)="openEditDialog(object)" ngbDropdownItem i18n>Edit</button> | ||||
|               <button class="text-danger" (click)="openDeleteDialog(object)" ngbDropdownItem i18n>Delete</button> | ||||
|             </div> | ||||
|           </div> | ||||
|         </div> | ||||
|         <div class="btn-group d-none d-sm-block"> | ||||
|           <button class="btn btn-sm btn-outline-secondary" (click)="filterDocuments(object)"> | ||||
|             <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-funnel" viewBox="0 0 16 16"> | ||||
|               <path fill-rule="evenodd" d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5v-2zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2h-11z"/> | ||||
|  | ||||
| @ -0,0 +1,4 @@ | ||||
| // hide caret on mobile dropdown | ||||
| .d-block.d-sm-none .dropdown-toggle::after { | ||||
|     display: none; | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user