Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mrburgercheese opened this issue Sep 14, 2021 · 10 comments
Assignees
Labels
feature request New feature or request

Comments

@mrburgercheese
Copy link

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

@mrburgercheese mrburgercheese added the feature request New feature or request label Sep 14, 2021
@pRieStaKos
Copy link

pRieStaKos commented Sep 14, 2021

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
Copy link

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
Copy link
Author

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
Copy link

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
Copy link

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
Copy link

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

@hendranata
Copy link

hendranata commented Sep 15, 2021

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
Copy link

pRieStaKos commented Sep 15, 2021

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
Copy link

okay clear.. inside the

@mrburgercheese
Copy link
Author

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 😘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants