Skip to content

Commit 565e8c4

Browse files
committed
add language tags to event groups table view
1 parent 8662f85 commit 565e8c4

File tree

2 files changed

+45
-3
lines changed

2 files changed

+45
-3
lines changed

app/assets/stylesheets/application.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,21 @@ input.grey {
498498
background-color: #c4220d;
499499
}
500500

501+
.grid-wrapper {
502+
display: grid;
503+
grid-template-columns: 250px 250px;
504+
margin-bottom: .5em;
505+
}
506+
507+
.language-tag {
508+
padding: 0 .7em;
509+
font-size: 12px;
510+
width: fit-content;
511+
background: linear-gradient(to right, #28B4F0, #F0A0C8);
512+
color: #fff;
513+
border-radius: 5px;
514+
}
515+
501516
/* Printer styles */
502517

503518
@media print {

app/views/admin/groups/index.html.erb

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,39 @@
1313
<tbody>
1414
<tr>
1515
<td>
16-
<%= event_group.applications.map(&:name).join("<br>").html_safe %>
16+
<% event_group.applications.map do |application| %>
17+
<div class="grid-wrapper">
18+
<span>
19+
<%= application.name %>
20+
</span>
21+
<span class="language-tag">
22+
<% if application.language_de === true && application.language_en === true %>
23+
both languages
24+
<% elsif application.language_de === true && application.language_en === false %>
25+
German
26+
<% else %>
27+
English
28+
<% end %>
29+
</span>
30+
</div>
31+
<% end %>
1732
</td>
1833
<td>
1934
<% event_group.coach_applications.map do |application| %>
20-
<%= application.coach.name %>
21-
<br>
35+
<div class="grid-wrapper">
36+
<span>
37+
<%= application.coach.name %>
38+
</span>
39+
<span class="language-tag">
40+
<% if application.coach.language_de === true && application.coach.language_en === true %>
41+
both languages
42+
<% elsif application.coach.language_de === true && application.coach.language_en === false %>
43+
German
44+
<% else %>
45+
English
46+
<% end %>
47+
</span>
48+
</div>
2249
<% end %>
2350
</td>
2451
</tr>

0 commit comments

Comments
 (0)