Written by 3mienblog

Don’t be stranger, adapt the countdown to your needs.

Now you have a smooth countdown on your dashboard, what else? Here are some ideas:

1. What about changing the background color based on the remaining days?

In this example, filters are applied to the last template element and the layout is customized:

[[!template id = “11”]] .. layout:: row {{ range (index “filterCountdown”) }} {{ $filter := index $.currentFilter }} {{ $layout := index $.currentLayout }} {{ sprintf “style=background-color:#{{ currMath.getRed $filter $layout }}” }} {{ end }} {{ end }} {{ end }}

The “currMath” object returns the current value of the filtered entity. Using currMath.getRed(packet, template, profile), for example, the R.ed color scale can be used.

2. You can plot an evolving value, based on the countdown:

local plotter = require “mediator/filters/plotted” local plot_entity = plotter:new{ fieldName = “countdown”, name = “countdown plot”, title = _”plotted countdown”, adjust_automatically = true, initialValue = {{ range $pipeline.getTimer “pbx.countdown.days” }} {{ .Minute * .int }} {{ .Minution * .int }} {{ end }} } .. layout:: row {{ range $plotter }} {{ $plot := $plotter }} {{ $layout := index $.currentLayout }} {{ render “chart mediator/rules/image.png” boundsTopBottom }} {{ modtime formatTime “Time graphs” }} {{ sprintf “style=padding:10px;background-color:#90aaff” }} {{ $plot str =~ ” dddd” }}{{ 3 = ~ = currMath.getStr $plot “percent” }} {{ range $slides $null = ~ = Index $slides }} Total {{ end }} {{ end }}

Note that filters are required; the filter translates the calculated “percent” value into:

Note: Never use slashes inside your FilterField values; those should always be translated into periods; this will stop the filter from working.

3. What about generating a specific layout for each profile?

Type: “” : select a predefined profile. If a profile name starts with an exclamation ‘!’ (ex. !accountOne) a fallback profile is set based on the order of entries in the profile_ref.json file

4. And dynamically hiding fields in that specific layout for logged-out user:

{{ if $.currentFilter != “” and $.username}} Render “fieldOverlay.png” {{end}}{{ range (index $.currentFilter) getIssues }} {{roundtableIncludes “renderDiv.html” “profile_ref.$key” link_both “Issues” }} {{ end }} .. layout:: borderless row {{ $layout := index $.currentLayout }} {{ if not (var $.existsIndexes $key $.currentFilter) }} {{ imagesagglo “notLoggedOn.png” “exclamation.png” “notInThisProfile.png” }} {{ else }} {{ end }} {{ end }}

5. Controlling other sides of the dashboard I do not abide sometimes, though to be sure I sometimes do swear. I love TV series, especially cartoon ones and programs. I respect good people, and I always hope to have their friendship. I love sports! Especially football! I like listening to music. I love to cook and make delicious meals, to read books and write poems, to enjoy live communications with strangers. Sometimes I tell some not really clever things, but you should always remember that a sense of humor is the most important thing! It enhances people’s life.

I like to work with children, they make me young 🙂

About the author


Leave a Comment