mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-10 17:36:33 +08:00
Update css for users on project cards
This commit is contained in:
parent
cd43973952
commit
283bfc8759
3 changed files with 25 additions and 8 deletions
|
@ -528,7 +528,7 @@ li.module-hover {
|
|||
grid-auto-rows: 2em;
|
||||
grid-column-gap: 1em;
|
||||
grid-row-gap: 1em;
|
||||
grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
|
||||
grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
|
||||
width: 100%;
|
||||
|
||||
.table-header {
|
||||
|
@ -767,7 +767,7 @@ li.module-hover {
|
|||
grid-auto-rows: 2em;
|
||||
grid-column-gap: 1em;
|
||||
grid-row-gap: 1em;
|
||||
grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
|
||||
grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
|
||||
width: 100%;
|
||||
|
||||
.table-header {
|
||||
|
@ -926,6 +926,23 @@ li.module-hover {
|
|||
display: none;
|
||||
}
|
||||
|
||||
.more-users {
|
||||
align-items: center;
|
||||
background: $color-volcano;
|
||||
border-radius: 50%;
|
||||
color: $color-white;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
height: 2em;
|
||||
justify-content: center;
|
||||
margin-right: .25em;
|
||||
width: 2em;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
.new-user {
|
||||
align-items: center;
|
||||
background: $color-concrete;
|
||||
|
|
|
@ -6,11 +6,11 @@ module ProjectsHelper
|
|||
end
|
||||
|
||||
def user_names_with_roles(user_projects)
|
||||
user_projects.map { |up| user_name_with_role(up) }.join('
')
|
||||
user_projects.map { |up| user_name_with_role(up) }.join('
').html_safe
|
||||
end
|
||||
|
||||
def user_name_with_role(user_project)
|
||||
"#{user_project.user.name} - #{I18n.t("user_projects.enums.role.#{user_project.role}")}"
|
||||
sanitize_input("#{user_project.user.name} - #{I18n.t("user_projects.enums.role.#{user_project.role}")}")
|
||||
end
|
||||
|
||||
def construct_module_connections(my_module)
|
||||
|
|
|
@ -37,16 +37,16 @@
|
|||
<span class="card-label"><%= t('projects.index.card.users') %></span>
|
||||
<div class="value">
|
||||
|
||||
<% project.user_projects[0..4].each do |user_project| %>
|
||||
<% project.user_projects[0..3].each do |user_project| %>
|
||||
<span class="global-avatar-container">
|
||||
<%= image_tag(avatar_path(user_project.user, :icon_small), title: user_name_with_role(user_project)) %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
||||
<% more_users = project.user_projects[5..-1].to_a %>
|
||||
<% more_users = project.user_projects[4..-1].to_a %>
|
||||
<% if more_users.any? %>
|
||||
<a href="" title="<%= user_names_with_roles(more_users) %>">
|
||||
+ <%= more_users.size %>
|
||||
<a href="" class="more-users" title="<%= user_names_with_roles(more_users) %>">
|
||||
+<%= more_users.size %>
|
||||
</a>
|
||||
<% end %>
|
||||
|
||||
|
|
Loading…
Reference in a new issue