Author: benj
Date: Thu Oct 27 15:18:35 2016
New Revision: 1753
URL: http://svn.gna.org/viewcvs/gdtc?rev=1753&view=rev
Log:
Implement non-payment display + some CSS tweaks
Modified:
trunk/gdtc/css/gdtc.css
trunk/gdtc/css/style.css
trunk/gdtc/include/actor.php
trunk/gdtc/templates/smarty/admin/edit_actor.tpl
Modified: trunk/gdtc/css/gdtc.css
URL:
http://svn.gna.org/viewcvs/gdtc/trunk/gdtc/css/gdtc.css?rev=1753&r1=1752&r2=1753&view=diff
==============================================================================
--- trunk/gdtc/css/gdtc.css (original)
+++ trunk/gdtc/css/gdtc.css Thu Oct 27 15:18:35 2016
@@ -44,4 +44,8 @@
.ui-datepicker-week-end {
background-color: #fce94f;
+}
+
+.highlighted-table tr:hover {
+ background-color: rgba(252, 233, 79, 0.58);
}
Modified: trunk/gdtc/css/style.css
URL:
http://svn.gna.org/viewcvs/gdtc/trunk/gdtc/css/style.css?rev=1753&r1=1752&r2=1753&view=diff
==============================================================================
--- trunk/gdtc/css/style.css (original)
+++ trunk/gdtc/css/style.css Thu Oct 27 15:18:35 2016
@@ -302,4 +302,12 @@
/* outline radius for mozilla/firefox only */
-moz-box-shadow:0 0 10px #000;
-webkit-box-shadow:0 0 10px #000;
+}
+
+tr.non-payment {
+}
+
+tr.non-payment td {
+ padding: 0px 0px 0px 6px;
+ color: #800;
}
Modified: trunk/gdtc/include/actor.php
URL:
http://svn.gna.org/viewcvs/gdtc/trunk/gdtc/include/actor.php?rev=1753&r1=1752&r2=1753&view=diff
==============================================================================
--- trunk/gdtc/include/actor.php (original)
+++ trunk/gdtc/include/actor.php Thu Oct 27 15:18:35 2016
@@ -139,16 +139,22 @@
for ( $j = 0 ; $j < $num2 ; $j ++ )
{
$membership['subscription'][$j] = mysql_fetch_array ( $result2,
MYSQL_ASSOC );
+ $membership['subscription'][$j]['non_payments'] =
+ simple_query ( sprintf (
+ 'SELECT * ' .
+ ' FROM non_payment ' .
+ ' WHERE subscription_id = \'%s\';',
+ $membership['subscription'][$j]['subscription_id'] ) );
if ( strcmp ( $membership['subscription'][$j]['start_date'],
- strftime ( '%Y-%m-%d' ) ) <= 0 &&
- strcmp ( $membership['subscription'][$j]['end_date'],
- strftime ( '%Y-%m-%d' ) ) >= 0 )
- {
- $membership['subscription'][$j]['current'] = TRUE;
- if ( $membership [ 'subscription' ] [ $j ] [
'payment_received_date' ] )
+ strftime ( '%Y-%m-%d' ) ) <= 0 &&
+ strcmp ( $membership['subscription'][$j]['end_date'],
+ strftime ( '%Y-%m-%d' ) ) >= 0 )
{
- $additional [ 'membership_up_to_date' ] = TRUE;
- }
+ $membership['subscription'][$j]['current'] = TRUE;
+ if ( $membership [ 'subscription' ] [ $j ] [
'payment_received_date' ] )
+ {
+ $additional [ 'membership_up_to_date' ] = TRUE;
+ }
}
}
$additional [ 'memberships' ] [ $i ] = $membership;
Modified: trunk/gdtc/templates/smarty/admin/edit_actor.tpl
URL:
http://svn.gna.org/viewcvs/gdtc/trunk/gdtc/templates/smarty/admin/edit_actor.tpl?rev=1753&r1=1752&r2=1753&view=diff
==============================================================================
--- trunk/gdtc/templates/smarty/admin/edit_actor.tpl (original)
+++ trunk/gdtc/templates/smarty/admin/edit_actor.tpl Thu Oct 27 15:18:35 2016
@@ -167,7 +167,7 @@
<div id="sc10" class="tabcontent" {if $additional.actor_infos.actor_status ==
'not_member'}class="disabled"{/if}>
-<table width="100%" border="0" cellspacing="0" cellpadding="6">
+<table class="highlighted-table" id="subscriptions" width="100%" border="0"
cellspacing="0" cellpadding="6">
<tr>
<th></th>
<th>Début</th>
@@ -234,6 +234,15 @@
</td>
</tr>
{/strip}
+
+ {if $additional.memberships[i].subscription[j].non_payments|@count}
+ <tr class="non-payment"><td></td><td colspan=8><b>↳
{$additional.memberships[i].subscription[j].non_payments|@count} impayé{if
$additional.memberships[i].subscription[j].non_payments|@count > 1}s{/if}: </b>
+ {section name=k
loop=$additional.memberships[i].subscription[j].non_payments}
+
{$additional.memberships[i].subscription[j].non_payments[k].date|date_format:"%d/%m/%Y"},
+ {/section}
+ </td></tr>
+ {/if}
+
{/section}
<tr {if $smarty.section.i.index mod 2} bgcolor="palegoldenrod" {/if}>
_______________________________________________
Gdtc-commits mailing list
[email protected]
https://mail.gna.org/listinfo/gdtc-commits