Katamaze / WHMCS-Action-Hook-Factory

Free collection of Action Hooks, Reports and Modules to perfect your WHMCS
https://katamaze.com
MIT License
209 stars 84 forks source link

[Feature Request] Row Mark Red when Services Teriminate on My Service Page #38

Open mrburgercheese opened 3 years ago

mrburgercheese commented 3 years ago

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

image

Thank s

pRieStaKos commented 3 years ago

Go on clientareaproducts.tpl and change the in the foreach loop;

<tr onclick="clickableSafeRedirect(event, 'clientarea.php?action=productdetails&amp;id={$service.id}', false)" {if $service.status|strtolower eq "terminated"}class="table-danger"{/if}>

LosBooom commented 3 years ago

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;
}
mrburgercheese commented 3 years ago

Go on clientareaproducts.tpl and change the in the foreach loop;

<tr onclick="clickableSafeRedirect(event, 'clientarea.php?action=productdetails&amp;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 image

pRieStaKos commented 3 years ago

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

image

You can use these classes or always create your own :)

pRieStaKos commented 3 years ago

Go on clientareaproducts.tpl and change the in the foreach loop;

<tr onclick="clickableSafeRedirect(event, 'clientarea.php?action=productdetails&amp;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

image

Maybe your CSS for table is overriding the classes for the rows...It's simple CSS

hendranata commented 3 years ago

nice idea.. need this feature as well for whmcs 7.10.3 please

hendranata commented 3 years ago

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 ?

pRieStaKos commented 3 years ago

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}

hendranata commented 3 years ago

okay clear.. inside the

mrburgercheese commented 3 years ago

im done added every use thiis

{if $service.status|strtolower eq "terminated"}style="background-color:#FADBD8;"{/if} {if $service.status|strtolower eq "cancelled"}style="background-color:#F9E79F;"{/if}

Image 1160

Thanks all 😘