Skip to content

Commit 2e4d44f

Browse files
committed
add more buttons to group's page
1 parent 8b543cf commit 2e4d44f

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

pages/listproject.php

+7-3
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,13 @@
7373
}
7474
}
7575

76-
$bottom_links[]
77-
= dolink('patches', 'Submitted patches',
78-
['group' => $group->id, 'all_shifts' => 1]);
76+
if (auth_at_least(ROLE_TA)) {
77+
$bottom_links = [
78+
dolink('patches', 'Patches', ['group' => $group->id, 'all_shifts' => 1]),
79+
dolink('bugs', 'Bugs', ['group' => $group->id, 'all_shifts' => 1]),
80+
dolink('features', 'Feature', ['group' => $group->id, 'all_shifts' => 1]),
81+
];
82+
}
7983

8084
mk_eval_box($group->year, 'project', null, $group);
8185

templates/main.html.twig

+14-4
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,20 @@
281281
{% endif %}
282282

283283
{% if bottom_links %}
284-
<div class="my-3 bg-light py-3 container">
285-
{% for line in bottom_links %}
286-
<a href="{{ line.url }}" class="d-block text-decoration-none">{{line.label}}</a>
287-
{% endfor %}
284+
<div class="bg-light container my-2 py-3">
285+
<div class="row">
286+
{% for line in bottom_links %}
287+
<div class="col-auto">
288+
<a href="{{ line.url }}" class="text-decoration-none">
289+
<div class="card p-2 shadow-sm text-center" style="min-width: 150px">
290+
<div class="card-body p-2">
291+
<span class="fw-bold">{{ line.label }}</span>
292+
</div>
293+
</div>
294+
</a>
295+
</div>
296+
{% endfor %}
297+
</div>
288298
</div>
289299
{% endif %}
290300

0 commit comments

Comments
 (0)