Koozali.org: home of the SME Server

user line shading / colour

Offline hawk

  • *
  • 141
  • +0/-0
    • hawkelectronics
user line shading / colour
« on: December 29, 2012, 05:11:11 AM »
Hi
just a question, or idea. I have several servers that at this time of the year i have to delete several users. (+/- 100 each)
i prefer to keep these servers as clean as possible with as few contribs loaded as possible. So my question is: on the server-manager is there any way (possibly in future development) where each user is shown in a line with different shaded line.


thanks
john



Offline janet

  • ****
  • 4,812
  • +0/-0
Re: user line shading / colour
« Reply #1 on: December 30, 2012, 01:53:17 AM »
hawk

Quote
just a question, or idea. I have several servers ......... on the server-manager is there any way (possibly in future development) where each user is shown in a line with different shaded line.

The best place to request this would be in bugzilla as a New Feature Request (NFR).
http://bugs.contribs.org/
You would need to provide sufficient justification.
Unless a developer is interested or is convinced of the real need, then it is not something that would likely be done soon, but you never know you luck and it never hurts to ask.

If you or your organisation(s) sponsored a developer to do the necessary coding, it would probably happen much quicker.

I have seen comment some time ago about revamping the look & feel of server manager, but there is no indication of when this would be, so your request (if devs like the idea) could theoretically be included in any rewrite of server manager.

There are examples in the Developers Manual re how to create server manager panels, so it is something you could probably do yourself, although I cannot say how easy or difficult it may be to implement.
Read and find out.
http://wiki.contribs.org/SME_Server:Documentation:Developers_Manual
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: user line shading / colour
« Reply #2 on: December 30, 2012, 05:56:43 PM »
I think this will do what you are asking for in any "modern" browser except IE8:

Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/e-smith/web/common/css/sme_main.css
cd /etc/e-smith/templates-custom/etc/e-smith/web/common/css/sme_main.css
echo '{
    $OUT = <<'EOF';

table.sme-border > tbody tr:nth-child(4n+1) {
    background-color: #DDF8F8;
}

EOF
}
' > 51body-trhighlights
expand-template /etc/e-smith/web/common/css/sme_main.css

Notes:
* In Safari, <Shift><click-on-reload> loaded the new style setting.  In Firefox (on a mac), the new style settings did not load until I cleared my firefox cache.

* Set the color you want for alternating rows; I've used "DDF8F8" (a light blue background)

* I get a little dizzy looking at strictly alternating rows, so I've set a background on every 4th row using "(4n+1)".  You could highlight every other row using  "(even)", or every 3rd row using "(3n+1)".

Explanation:
1. Create a custom template fragment in /etc/e-smith/templates-custom/etc/e-smith/web/common/css/sme_main.css named "51body-trhighlights" that sets a custom background-color for some rows of any "sme-border" table in /server-manager (users, ibays, pseudonyms, hosts, etc) using the css "nth-child" selector.
2. expand the resulting css file /etc/e-smith/web/common/css/sme_main.css


Offline hawk

  • *
  • 141
  • +0/-0
    • hawkelectronics
Re: user line shading / colour
« Reply #3 on: December 30, 2012, 07:38:44 PM »
thanks that works like a charm, just what i was looking for
thanks

guest22

Re: user line shading / colour
« Reply #4 on: December 30, 2012, 10:26:00 PM »
That is worth a wiki page entry! :-)

Offline mmccarn

  • *
  • 2,626
  • +10/-0