{strip} {* PERIOD *} {$_periods = [ 0 => [ "id" => 0, "name" => _w('Last %d day', 'Last %d days', 30), "timeframe" => 30, "groupby" => "days" ], 1 => [ "id" => 1, "name" => _w('Last %d day', 'Last %d days', 90), "timeframe" => 90, "groupby" => "days" ], 2 => [ "id" => 2, "name" => _w('Last %d day', 'Last %d days', 365), "timeframe" => 365, "groupby" => "months" ], 3 => [ "id" => 3, "name" => _w('All time'), "timeframe" => "all", "groupby" => "months" ], "custom" => [ "id" => "custom", "class" => "js-show-period-form", "name" => _w('Select dates...') ] ]} {$_selected_period = $_periods[1]} {if !empty($timeframe) && !empty($group_by)} {$_is_period_set = false} {foreach $_periods as $_period} {if !empty($_period.timeframe) && ($_period.timeframe == $timeframe) && !empty($_period.groupby) && ($_period.groupby == $group_by)} {$_selected_period = $_period} {$_is_period_set = true} {elseif $_period@last && !$_is_period_set} {$_selected_period = $_periods["custom"]} {/if} {/foreach} {/if} {* APPS *} {$_apps = []} {$_apps["all"] = [ "id" => null, "name" => _w('All apps') ]} {$_apps = array_merge($_apps, $apps)} {$_selected_app = $_apps["all"]} {if !empty($selected_app_id)} {$_selected_app = $_apps[$selected_app_id]} {/if} {if !$wa->request("is_update")} {if {$wa->locale()} != 'en_US'} {/if} {**} {/if}
{* HEADER *}
{*FILTERS*} {* TODO: REWORK IT *}
{* BODY *}
:
{if !empty($status_stats)}
    {foreach $status_stats as $stat} {$_styles = []} {if !empty($stat.bg_color)} {$_styles[] = "background: `$stat.bg_color`;"} {/if} {if !empty($stat.font_color)} {$_styles[] = "color: `$stat.font_color`;"} {/if}
  • {$stat.name|escape} {if $stat.duration.days > 0} {sprintf(_w("%d day", "%d days", $stat.duration.days), $stat.duration.days)}   {/if} {if $stat.duration.hours > 0} {sprintf(_w("%d hour", "%d hours", $stat.duration.hours), $stat.duration.hours)} {/if}
  • {/foreach}
{/if}
{/strip}