Open mrburgercheese opened 3 years ago
Go on clientareaproducts.tpl and change the
<tr onclick="clickableSafeRedirect(event, 'clientarea.php?action=productdetails&id={$service.id}', false)" {if $service.status|strtolower eq "terminated"}class="table-danger"{/if}>
Go on clientareaproducts.tpl and add this to the foreach loop
<tr {if $service.status|strtolower eq "terminated"}class="table-warning"{/if}>...</tr>
I would like to add that on my installation the table-warning
class will not solve the problem and I need to add my own css-class.
To do this, you can add to /templates/TEMPLATENAME/css/custom.css
:
.row-red>td {
background: rgb(255, 140, 140) !important;
}
.row-red:hover>td {
background: rgb(252, 88, 88) !important;
}
Go on clientareaproducts.tpl and change the in the foreach loop;
<tr onclick="clickableSafeRedirect(event, 'clientarea.php?action=productdetails&id={$service.id}', false)" {if $service.status|strtolower eq "terminated"}class="table-danger"{/if}>
i was add this code but result only red on line table
Go on clientareaproducts.tpl and add this to the foreach loop
<tr {if $service.status|strtolower eq "terminated"}class="table-warning"{/if}>...</tr>
I would like to add that on my installation the
table-warning
class will not solve the problem and I need to add my own css-class.To do this, you can add to
/templates/TEMPLATENAME/css/custom.css
:.row-red>td { background: rgb(255, 140, 140) !important; } .row-red:hover>td { background: rgb(252, 88, 88) !important; }
That's because of bootstrap version mismatch.
WHMCS 7.x is using Bootstrap 3.4.1
You can use these classes or always create your own :)
Go on clientareaproducts.tpl and change the in the foreach loop;
<tr onclick="clickableSafeRedirect(event, 'clientarea.php?action=productdetails&id={$service.id}', false)" {if $service.status|strtolower eq "terminated"}class="table-danger"{/if}>
i was add this code but result only red on line table
Maybe your CSS for table is overriding the classes for the rows...It's simple CSS
nice idea.. need this feature as well for whmcs 7.10.3 please
in this case i can put in every <td>
:
{if $service.status|strtolower eq "terminated"}style="background-color:#ecaeae;"{/if}
however, how do we achieve terminated or cancelled ?
in this case i can put in every
<td>
:{if $service.status|strtolower eq "terminated"}style="background-color:#ecaeae;"{/if}
however, how do we achieve terminated or cancelled ?
You are in a foreach loop. You only need to added one time.
{if $service.status|strtolower|in_array:["terminated","cancelled"]}style="background-color:#ecaeae;"{/if}
okay clear.. inside the
im done added every
{if $service.status|strtolower eq "terminated"}style="background-color:#FADBD8;"{/if} {if $service.status|strtolower eq "cancelled"}style="background-color:#F9E79F;"{/if}
Thanks all 😘
Describe the solution you'd like
Morning, i having request idea, how to coloring rows when service status terminate on my page service? ilustration below
Thank s