cccamp23 theme improvements on badges
This commit is contained in:
parent
c2e6dc5223
commit
0a1c85d6bd
|
@ -115,27 +115,36 @@ function admin_arrive()
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($usr->state->arrival_date) {
|
if ($usr->state->arrival_date) {
|
||||||
$day = $usr->state->arrival_date->format(__('Y-m-d'));
|
$day = $usr->state->arrival_date->format('Y-m-d');
|
||||||
if (!isset($arrival_count_at_day[$day])) {
|
if (!isset($arrival_count_at_day[$day])) {
|
||||||
$arrival_count_at_day[$day] = 0;
|
$arrival_count_at_day[$day] = [
|
||||||
|
'day' => $usr->state->arrival_date,
|
||||||
|
'count' => 0,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
$arrival_count_at_day[$day]++;
|
$arrival_count_at_day[$day]['count']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($usr->personalData->planned_arrival_date) {
|
if ($usr->personalData->planned_arrival_date) {
|
||||||
$day = $usr->personalData->planned_arrival_date->format(__('Y-m-d'));
|
$day = $usr->personalData->planned_arrival_date->format('Y-m-d');
|
||||||
if (!isset($planned_arrival_count_at_day[$day])) {
|
if (!isset($planned_arrival_count_at_day[$day])) {
|
||||||
$planned_arrival_count_at_day[$day] = 0;
|
$planned_arrival_count_at_day[$day] = [
|
||||||
|
'day' => $usr->personalData->planned_arrival_date,
|
||||||
|
'count' => 0,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
$planned_arrival_count_at_day[$day]++;
|
$planned_arrival_count_at_day[$day]['count']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($usr->personalData->planned_departure_date && $usr->state->arrived) {
|
if ($usr->personalData->planned_departure_date && $usr->state->arrived) {
|
||||||
$day = $usr->personalData->planned_departure_date->format(__('Y-m-d'));
|
$day = $usr->personalData->planned_departure_date->format('Y-m-d');
|
||||||
if (!isset($planned_departure_count_at_day[$day])) {
|
if (!isset($planned_departure_count_at_day[$day])) {
|
||||||
$planned_departure_count_at_day[$day] = 0;
|
$planned_departure_count_at_day[$day] = [
|
||||||
|
'day' => $usr->personalData->planned_departure_date,
|
||||||
|
'count' => 0,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
$planned_departure_count_at_day[$day]++;
|
$planned_departure_count_at_day[$day]['count']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$users_matched[] = $usr;
|
$users_matched[] = $usr;
|
||||||
|
@ -147,33 +156,33 @@ function admin_arrive()
|
||||||
|
|
||||||
$arrival_at_day = [];
|
$arrival_at_day = [];
|
||||||
$arrival_sum = 0;
|
$arrival_sum = 0;
|
||||||
foreach ($arrival_count_at_day as $day => $count) {
|
foreach ($arrival_count_at_day as $day => $entry) {
|
||||||
$arrival_sum += $count;
|
$arrival_sum += $entry['count'];
|
||||||
$arrival_at_day[$day] = [
|
$arrival_at_day[$day] = [
|
||||||
'day' => $day,
|
'day' => $entry['day']->format(__('Y-m-d')),
|
||||||
'count' => $count,
|
'count' => $entry['count'],
|
||||||
'sum' => $arrival_sum,
|
'sum' => $arrival_sum,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
$planned_arrival_at_day = [];
|
$planned_arrival_at_day = [];
|
||||||
$planned_arrival_sum = 0;
|
$planned_arrival_sum = 0;
|
||||||
foreach ($planned_arrival_count_at_day as $day => $count) {
|
foreach ($planned_arrival_count_at_day as $day => $entry) {
|
||||||
$planned_arrival_sum += $count;
|
$planned_arrival_sum += $entry['count'];
|
||||||
$planned_arrival_at_day[$day] = [
|
$planned_arrival_at_day[$day] = [
|
||||||
'day' => $day,
|
'day' => $entry['day']->format(__('Y-m-d')),
|
||||||
'count' => $count,
|
'count' => $entry['count'],
|
||||||
'sum' => $planned_arrival_sum,
|
'sum' => $planned_arrival_sum,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
$planned_departure_at_day = [];
|
$planned_departure_at_day = [];
|
||||||
$planned_departure_sum = 0;
|
$planned_departure_sum = 0;
|
||||||
foreach ($planned_departure_count_at_day as $day => $count) {
|
foreach ($planned_departure_count_at_day as $day => $entry) {
|
||||||
$planned_departure_sum += $count;
|
$planned_departure_sum += $entry['count'];
|
||||||
$planned_departure_at_day[$day] = [
|
$planned_departure_at_day[$day] = [
|
||||||
'day' => $day,
|
'day' => $entry['day']->format(__('Y-m-d')),
|
||||||
'count' => $count,
|
'count' => $entry['count'],
|
||||||
'sum' => $planned_departure_sum,
|
'sum' => $planned_departure_sum,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,8 @@ $input-bg: $gray-darker;
|
||||||
$input-bg-disabled: lighten($gray-lighter, 15%);
|
$input-bg-disabled: lighten($gray-lighter, 15%);
|
||||||
$input-group-addon-bg: $gray-lighter;
|
$input-group-addon-bg: $gray-lighter;
|
||||||
|
|
||||||
|
$form-check-input-border: 1px solid $gray;
|
||||||
|
|
||||||
//== changed Pagination
|
//== changed Pagination
|
||||||
|
|
||||||
$pagination-hover-color: $gray-lighter;
|
$pagination-hover-color: $gray-lighter;
|
||||||
|
@ -115,6 +117,15 @@ $pagination-disabled-border-color: $gray-dark;
|
||||||
|
|
||||||
// Specials ===================================================================
|
// Specials ===================================================================
|
||||||
|
|
||||||
|
.bg-primary,
|
||||||
|
.bg-success,
|
||||||
|
.bg-danger,
|
||||||
|
.bg-warning,
|
||||||
|
.bg-info,
|
||||||
|
.bg-light {
|
||||||
|
color: $gray-darker;
|
||||||
|
}
|
||||||
|
|
||||||
.navbar {
|
.navbar {
|
||||||
background: rgba(0, 0, 0, 0.7);
|
background: rgba(0, 0, 0, 0.7);
|
||||||
backdrop-filter: blur(6px);
|
backdrop-filter: blur(6px);
|
||||||
|
|
|
@ -16,16 +16,6 @@
|
||||||
'dark'
|
'dark'
|
||||||
]
|
]
|
||||||
%}
|
%}
|
||||||
{% set types_color=[
|
|
||||||
['primary', 'light'],
|
|
||||||
['secondary', 'light'],
|
|
||||||
['success', 'light'],
|
|
||||||
['danger', 'light'],
|
|
||||||
['warning', 'dark'],
|
|
||||||
['info', 'dark'],
|
|
||||||
['light', 'dark'],
|
|
||||||
['dark', 'light'],
|
|
||||||
] %}
|
|
||||||
{% set types_buttons=['link']|merge(types) %}
|
{% set types_buttons=['link']|merge(types) %}
|
||||||
{% set shortsum='Lorem ipsum dolor…' %}
|
{% set shortsum='Lorem ipsum dolor…' %}
|
||||||
{% set lipsum='Lorem ipsum dolor sit amet, consectetur adipisici elit…' %}
|
{% set lipsum='Lorem ipsum dolor sit amet, consectetur adipisici elit…' %}
|
||||||
|
@ -154,8 +144,8 @@
|
||||||
<span id="badges" class="ref-id"></span>
|
<span id="badges" class="ref-id"></span>
|
||||||
<h3>Badges <a href="#badges" class="ref-link">{{ m.icon('link') }}</a></h3>
|
<h3>Badges <a href="#badges" class="ref-link">{{ m.icon('link') }}</a></h3>
|
||||||
<p>
|
<p>
|
||||||
{% for type in types_color %}
|
{% for type in types %}
|
||||||
<span class="badge bg-{{ type[0] }} text-{{ type[1] }}">{{ type[0]|capitalize }}</span>
|
<span class="badge bg-{{ type }}">{{ type|capitalize }}</span>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue