|
17 | 17 | more_action << link_to('Page with arabic view', translation_proofreading_path(verse.id, resource_id: @resource.id, view_type: 'page_with_arabic'), class: 'tw-block tw-px-4 tw-py-2 tw-text-sm tw-text-gray-700 hover:tw-bg-gray-100') |
18 | 18 | more_action << link_to('Proofreading view(With pdf)', translation_proofreading_path(verse.id, resource_id: @resource.id, view_type: 'page_with_pdf'), class: 'tw-block tw-px-4 tw-py-2 tw-text-sm tw-text-gray-700 hover:tw-bg-gray-100') |
19 | 19 |
|
20 | | - actions << "<div class='tw-relative' data-controller='dropdown'> |
21 | | - <button class='tw-px-4 tw-py-2 tw-text-sm tw-font-medium tw-bg-green-600 hover:tw-bg-green-700 tw-text-white tw-rounded tw-transition-colors' type='button' data-action='click->dropdown#toggle' aria-expanded='false'> |
| 20 | + actions << %Q{ |
| 21 | + <div class='tw-relative' data-controller='dropdown'> |
| 22 | + <button class='tw-h-10 tw-px-4 tw-py-2 tw-text-sm tw-font-medium tw-bg-green-600 hover:tw-bg-green-700 tw-text-white tw-rounded tw-transition-colors tw-flex tw-items-center tw-gap-2' type='button' data-action='click->dropdown#toggle' aria-expanded='false'> |
22 | 23 | Change view |
| 24 | + <svg class='tw-w-4 tw-h-4' fill='none' stroke='currentColor' viewBox='0 0 24 24'> |
| 25 | + <path stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'></path> |
| 26 | + </svg> |
23 | 27 | </button> |
24 | 28 | <ul class='tw-absolute tw-right-0 tw-mt-2 tw-w-56 tw-rounded-md tw-shadow-lg tw-bg-white tw-ring-1 tw-ring-black tw-ring-opacity-5 tw-z-50 tw-hidden' data-dropdown-target='menu'> |
25 | | - #{more_action.map do |action| |
26 | | - "<li>#{action}</li>" |
27 | | - end.join('') |
| 29 | + #{more_action.map { |action| "<li>#{action}</li>" }.join('')} |
| 30 | + </ul> |
| 31 | + </div> |
28 | 32 | } |
29 | | - </ul> |
30 | | - </div>" |
31 | 33 |
|
32 | 34 | if view_type == 'ayah' |
33 | 35 | previous_ayah = verse.previous_ayah |
34 | 36 | next_ayah = verse.next_ayah |
35 | 37 | if previous_ayah |
36 | | - actions << link_to('Previous ayah', translation_proofreading_path(previous_ayah.id, resource_id: @resource.id), class: 'tw-px-4 tw-py-2 tw-text-sm tw-font-medium tw-bg-gray-800 hover:tw-bg-gray-900 tw-text-white tw-rounded tw-transition-colors') |
| 38 | + actions << link_to('Previous ayah', translation_proofreading_path(previous_ayah.id, resource_id: @resource.id), class: 'tw-h-10 tw-px-4 tw-py-2 tw-text-sm tw-font-medium tw-bg-gray-800 hover:tw-bg-gray-900 tw-text-white tw-rounded tw-transition-colors tw-flex tw-items-center') |
37 | 39 | end |
38 | 40 | if next_ayah |
39 | | - actions << link_to('Next ayah', translation_proofreading_path(next_ayah.id, resource_id: @resource.id), class: 'tw-px-4 tw-py-2 tw-text-sm tw-font-medium tw-bg-gray-800 hover:tw-bg-gray-900 tw-text-white tw-rounded tw-transition-colors') |
| 41 | + actions << link_to('Next ayah', translation_proofreading_path(next_ayah.id, resource_id: @resource.id), class: 'tw-h-10 tw-px-4 tw-py-2 tw-text-sm tw-font-medium tw-bg-gray-800 hover:tw-bg-gray-900 tw-text-white tw-rounded tw-transition-colors tw-flex tw-items-center') |
40 | 42 | end |
41 | 43 | else |
42 | 44 | page = verse.page_number |
43 | 45 |
|
44 | 46 | if page > 1 |
45 | 47 | previous_ayah = Verse.where(page_number: page - 1).order('verse_index ASC').first |
46 | | - actions << link_to('Previous page', translation_proofreading_path(previous_ayah.id, resource_id: @resource.id, view_type: params[:view_type]), class: 'tw-px-4 tw-py-2 tw-text-sm tw-font-medium tw-bg-gray-800 hover:tw-bg-gray-900 tw-text-white tw-rounded tw-transition-colors') |
| 48 | + actions << link_to('Previous page', translation_proofreading_path(previous_ayah.id, resource_id: @resource.id, view_type: params[:view_type]), class: 'tw-h-10 tw-px-4 tw-py-2 tw-text-sm tw-font-medium tw-bg-gray-800 hover:tw-bg-gray-900 tw-text-white tw-rounded tw-transition-colors tw-flex tw-items-center') |
47 | 49 | end |
48 | 50 |
|
49 | 51 | if page < 604 |
50 | 52 | next_ayah = Verse.where(page_number: page + 1).order('verse_index ASC').first |
51 | 53 |
|
52 | | - actions << link_to('Next page', translation_proofreading_path(next_ayah.id, resource_id: @resource.id, view_type: params[:view_type]), class: 'tw-px-4 tw-py-2 tw-text-sm tw-font-medium tw-bg-gray-800 hover:tw-bg-gray-900 tw-text-white tw-rounded tw-transition-colors') |
| 54 | + actions << link_to('Next page', translation_proofreading_path(next_ayah.id, resource_id: @resource.id, view_type: params[:view_type]), class: 'tw-h-10 tw-px-4 tw-py-2 tw-text-sm tw-font-medium tw-bg-gray-800 hover:tw-bg-gray-900 tw-text-white tw-rounded tw-transition-colors tw-flex tw-items-center') |
53 | 55 | end |
54 | 56 | end |
55 | 57 |
|
56 | | - actions << link_to('Back to filter', translation_proofreadings_path(resource_id: @resource.id), class: 'btn btn-outline-info tw-text-sm') |
| 58 | + actions << link_to('Back to filter', translation_proofreadings_path(resource_id: @resource.id), class: 'tw-h-10 tw-px-4 tw-py-2 tw-text-sm tw-font-medium tw-bg-white tw-border tw-border-blue-600 tw-text-blue-600 hover:tw-bg-blue-600 hover:tw-text-white tw-rounded tw-transition-colors tw-flex tw-items-center') |
57 | 59 | %> |
58 | 60 |
|
59 | 61 | <%= render 'tools/header', |
|
0 commit comments