Skip to content

Commit

Permalink
Separate series activity icons into columns
Browse files Browse the repository at this point in the history
  • Loading branch information
jorg-vr committed Jun 25, 2024
1 parent b2cf579 commit 211f5fb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
20 changes: 13 additions & 7 deletions app/assets/stylesheets/models/activities.css.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
// activity table
.activity-table {
th.status-icon {
width: 30px;
}

td.popularity-icon {
color: var(--d-on-surface-muted);
}
Expand All @@ -16,12 +12,22 @@
td.type-icon {
width: 18px;
color: var(--d-on-surface-muted);
padding-left: 0;
padding-left: 4px;
padding-right: 0;
}

td.status-icon {
padding-left: 4px;
td.status-icon,
th.status-icon,
th.repository-status-icon,
td.repository-status-icon {
width: 0;
padding-left: 0;
padding-right: 0;

.mdi {
margin-left: 4px;
margin-right: 4px;
}
}

.status {
Expand Down
8 changes: 5 additions & 3 deletions app/views/activities/_series_activities_table.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<thead>
<tr>
<th class='status-icon'></th>
<th class='repository-status-icon'></th>
<th class='type-icon'></th>
<th><%= t "activities.index.activity_title" %></th>
<% if @course.blank? || policy(local_assigns[:series]).show_progress? %>
Expand Down Expand Up @@ -38,12 +39,13 @@
<tr>
<td class='status-icon'>
<% if user_signed_in? %>
<% if current_user.repository_admin?(activity.repository) || current_user.course_admin?(@course) %>
<%= render partial: 'activities/repository_status', locals: {activity: activity, series: local_assigns[:series]} %>
<% end %>
<%= render partial: 'activities/user_status_icon', locals: {activity: activity, series: local_assigns[:series], user: user} %>
<% end %>
</td>
<td class='repository-status-icon'><%
if user_signed_in? && (current_user.repository_admin?(activity.repository) || current_user.course_admin?(@course)) %>
<%= render partial: 'activities/repository_status', locals: {activity: activity, series: local_assigns[:series]} %>
<% end %></td>

<td class='type-icon'>
<%= activity_icon(activity) %>
Expand Down

0 comments on commit 211f5fb

Please sign in to comment.