diff --git a/css/sepa.css b/css/sepa.css new file mode 100644 index 00000000..2b438196 --- /dev/null +++ b/css/sepa.css @@ -0,0 +1,24 @@ +.sepa_dashboard tr.submit_missed td { + background-color: var(--crm-danger-light-color, #EE0000AA); +} + +.sepa_dashboard tr.submit_urgently td { + background-color: var(--crm-warning-light-color, #AC6700AA); +} + +.sepa_dashboard tr.submit_soon td { + background-color: var(--crm-info-light-color, #0165FFAA); +} + +.sepa_dashboard tr.submit_later td { + background-color: var(--crm-success-light-color, #008300AA); +} + +.sepa_dashboard tr.submit_closed td { + background-color: var(--crm-layer2-bg-color, #00830033); +} + +.sepa_dashboard .sepa_dashboard__button_group { + display: flex; + justify-content: end; +} diff --git a/sepa.php b/sepa.php index c5808d38..3a14038f 100644 --- a/sepa.php +++ b/sepa.php @@ -561,3 +561,14 @@ function sepa_civicrm_xmlMenu(array &$files): void { $files[] = $file; } } + +/** + * @param array $list + * @param string $region + * @return void + */ +function sepa_civicrm_coreResourceList(array &$list, string $region): void { + if ($region === 'html-header') { + Civi::resources()->addStyleFile('org.project60.sepa', 'css/sepa.css'); + } +} diff --git a/templates/CRM/Sepa/Page/DashBoard.tpl b/templates/CRM/Sepa/Page/DashBoard.tpl index a5d03a2e..d3c7e2f3 100644 --- a/templates/CRM/Sepa/Page/DashBoard.tpl +++ b/templates/CRM/Sepa/Page/DashBoard.tpl @@ -14,188 +14,177 @@ +-------------------------------------------------------*} {crmScope extensionKey='org.project60.sepa'} - -
- +
-{/if} - - - - - - - - - - - - {foreach from=$groups item=group} - {assign var='file_id' value=$group.file_id} - {assign var='group_id' value=$group.id} - - - - - {if $status eq 'closed'} - - {else} - + {if $financialacls} +
+ {ts}Note that only groups with contributions of authorized financial types are being displayed.{/ts} +
{/if} - - - - + + {/foreach} +
{ts}Group Name{/ts}{ts}Status{/ts}{ts}Type{/ts}{ts}Submission{/ts}{ts}Collection{/ts}{ts}Transactions{/ts}{ts}Total{/ts}
- {$group.reference} - {if $group.transaction_message}{/if} - {if $group.transaction_note}{/if} - - {$group.status_label} - - {$group.type}{$group.file_created_date}{$group.latest_submission_date}{$group.collection_date} - {$group.nb_contrib} - {$group.total|crmMoney:$group.currency} - {ts}Contributions{/ts} - {if $group.status == 'open'} - {if $can_batch} - {if $group.submit == 'missed'} - - {else} - + + + + + + + + + + + + + + + {foreach from=$groups item=group} + {assign var='file_id' value=$group.file_id} + {assign var='group_id' value=$group.id} + + + + + {if $status eq 'closed'} + + {else} + + {/if} + + + + - - {/foreach} -
{ts}Group Name{/ts}{ts}Status{/ts}{ts}Type{/ts}{ts}Submission{/ts}{ts}Collection{/ts}{ts}Transactions{/ts}{ts}Total{/ts}
+ {$group.reference} + {if $group.transaction_message}{/if} + {if $group.transaction_note}{/if} + + {$group.status_label} + + {$group.type}{$group.file_created_date}{$group.latest_submission_date}{$group.collection_date} + {$group.nb_contrib} + {$group.total|crmMoney:$group.currency} + {crmButton p="civicrm/sepa/listgroup" q="group_id=$group_id" class="button_view" title="{ts escape='htmlattribute'}Contributions{/ts}" icon="fa-info"}{ts}Contributions{/ts}{/crmButton} + {if $group.status == 'open'} + {if $can_batch} + {if $group.submit == 'missed'} + {crmButton p="civicrm/sepa/closegroup" q="group_id=$group_id&status=missed" class="button_close" title="{ts escape='htmlattribute'}Close and Submit{/ts}" icon="fa-paper-plane"}{ts}Close and Submit{/ts}{/crmButton} + {else} + {crmButton p="civicrm/sepa/closegroup" q="group_id=$group_id" class="button_close" title="{ts escape='htmlattribute'}Close and Submit{/ts}" icon="fa-paper-plane"}{ts}Close and Submit{/ts}{/crmButton} + {/if} {/if} - {ts}Close and Submit{/ts} - {/if} - {else} - {ts}Download Again{/ts} - {if $closed_status_id eq $group.status_id} - {if not $group.collection_date_in_future} - {ts}Mark Received{/ts} + {else} + {crmButton p="civicrm/sepa/xml" q="id=$file_id" class="button_export" title="{ts escape='htmlattribute'}Download Again{/ts}" icon=""}{ts}Download Again{/ts}{/crmButton} + {if $closed_status_id eq $group.status_id} + {if not $group.collection_date_in_future} + {crmButton p="civicrm/sepa/mark_received" q="group_id=$group_id" class="button_received" title="{ts escape='htmlattribute'}Mark Received{/ts}" icon=""}{ts}Mark Received{/ts}{/crmButton} + {/if} {/if} {/if} - {/if} - {if $can_delete} - {ts}Delete{/ts} - {/if} -
- -{* legend by @scardinius *} -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
{ts}Legend{/ts}
{ts}Status{/ts}{ts}Description{/ts}
{ts}Missed{/ts}{ts}Submission date has passed!{/ts}
{ts}Urgent{/ts}{ts}Submission date is immanent, you have to close group and upload file to creditor today!{/ts}
{ts}Soon{/ts}{ts}Submission within 6 days or OOFF (submission not enforced){/ts}
{ts}Upcoming{/ts}{ts}Submission date more than 6 days from now{/ts}
{ts}Closed{/ts}{ts}The group is closed and uploaded to creditor, submission date is in the past.{/ts}
+ {if $can_delete} + {crmButton p="civicrm/sepa/deletegroup" q="group_id=$group_id" class="button_view" title="{ts escape='htmlattribute'}Delete{/ts}" icon="fa-trash-can"}{ts}Delete{/ts}{/crmButton} + {/if} +
-{literal} - -{/literal} + {* legend by @scardinius *} +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
{ts}Legend{/ts}
{ts}Status{/ts}{ts}Description{/ts}
{ts}Missed{/ts}{ts}Submission date has passed!{/ts}
{ts}Urgent{/ts}{ts}Submission date is immanent, you have to close group and upload file to creditor today!{/ts}
{ts}Soon{/ts}{ts}Submission within 6 days or OOFF (submission not enforced){/ts}
{ts}Upcoming{/ts}{ts}Submission date more than 6 days from now{/ts}
{ts}Closed{/ts}{ts}The group is closed and uploaded to creditor, submission date is in the past.{/ts}
- -{/literal} - + + {/literal} {/crmScope}