Commit 34cc8f4a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Improve project members page UI

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent d9749c8d
.new-group-member-holder {
margin-top: 10px;
padding-top: 20px;
}
.member-search-form { .member-search-form {
float: left; float: left;
} }
......
- @blank_container = true
- page_title "Members" - page_title "Members"
- header_title group_title(@group, "Members", group_group_members_path(@group)) - header_title group_title(@group, "Members", group_group_members_path(@group))
- @blank_container = true
.group-members-page .group-members-page
- if current_user && current_user.can?(:admin_group_member, @group) - if current_user && current_user.can?(:admin_group_member, @group)
...@@ -14,8 +11,6 @@ ...@@ -14,8 +11,6 @@
- if should_user_see_group_roles?(current_user, @group) - if should_user_see_group_roles?(current_user, @group)
%p.light %p.light
Members of group have access to all group projects. Members of group have access to all group projects.
Read more about permissions
%strong= link_to "here", help_page_path("permissions", "permissions"), class: "vlink"
.new-group-member-holder .new-group-member-holder
= render "new_group_member" = render "new_group_member"
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
group members group members
%small %small
(#{members.count}) (#{members.count})
.panel-head-actions .pull-right
= link_to group_group_members_path(@group), class: 'btn btn-sm' do = link_to group_group_members_path(@group), class: 'btn' do
%i.fa.fa-pencil-square-o = icon('pencil-square-o')
Edit group members Edit group members
%ul.well-list %ul.content-list
- members.each do |member| - members.each do |member|
= render 'groups/group_members/group_member', member: member, show_controls: false = render 'groups/group_members/group_member', member: member, show_controls: false
- if members.count > 20 - if members.count > 20
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
%li{class: "#{dom_class(member)} js-toggle-container project_member_row access-#{member.human_access.downcase}", id: dom_id(member)} %li{class: "#{dom_class(member)} js-toggle-container project_member_row access-#{member.human_access.downcase}", id: dom_id(member)}
%span.list-item-name %span.list-item-name
- if member.user - if member.user
= image_tag avatar_icon(user, 16), class: "avatar s16", alt: '' = image_tag avatar_icon(user, 24), class: "avatar s24", alt: ''
%strong %strong
= link_to user.name, user_path(user) = link_to user.name, user_path(user)
%span.cgray= user.username %span.cgray= user.username
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
%label.label.label-danger %label.label.label-danger
%strong Blocked %strong Blocked
- else - else
= image_tag avatar_icon(member.invite_email, 16), class: "avatar s16", alt: '' = image_tag avatar_icon(member.invite_email, 24), class: "avatar s24", alt: ''
%strong %strong
= member.invite_email = member.invite_email
%span.cgray %span.cgray
......
.panel.panel-default.prepend-top-20 .panel.panel-default
.panel-heading .panel-heading
%strong #{@project.name} %strong #{@project.name}
project members project members
%small %small
(#{members.count}) (#{members.count})
%ul.well-list .pull-right
= form_tag namespace_project_project_members_path(@project.namespace, @project), method: :get, class: 'form-inline member-search-form' do
.form-group
= search_field_tag :search, params[:search], { placeholder: 'Find existing member by name', class: 'form-control', spellcheck: false }
= button_tag class: 'btn' do
= icon("search")
%ul.content-list
- members.each do |project_member| - members.each do |project_member|
= render 'project_member', member: project_member = render 'project_member', member: project_member
:javascript
$('form.member-search-form').on('submit', function (event) {
event.preventDefault();
Turbolinks.visit(this.action + '?' + $(this).serialize());
});
- page_title "Members" - page_title "Members"
= render "header_title" = render "header_title"
- @blank_container = true
.gray-content-block.top-block .project-members-page
.clearfix.js-toggle-container - if can?(current_user, :admin_project_member, @project)
= form_tag namespace_project_project_members_path(@project.namespace, @project), method: :get, class: 'form-inline member-search-form' do .panel.panel-default
.form-group .panel-heading
= search_field_tag :search, params[:search], { placeholder: 'Find existing member by name', class: 'form-control search-text-input', spellcheck: false } Add new user to project
= button_tag 'Search', class: 'btn' .pull-right
= link_to import_namespace_project_project_members_path(@project.namespace, @project), class: "btn btn-grouped", title: "Import members from another project" do
- if can?(current_user, :admin_project_member, @project) Import members
%span.pull-right .panel-body
= button_tag class: 'btn btn-new btn-grouped js-toggle-button', type: 'button' do %p.light
Add members Users with access to this project are listed below.
%i.fa.fa-chevron-down
= link_to import_namespace_project_project_members_path(@project.namespace, @project), class: "btn btn-grouped", title: "Import members from another project" do
Import members
.js-toggle-content.hide.new-group-member-holder
= render "new_project_member" = render "new_project_member"
%p.prepend-top-default.light = render "team", members: @project_members
Users with access to this project are listed below.
Read more about project permissions
%strong= link_to "here", help_page_path("permissions", "permissions"), class: "vlink"
= render "team", members: @project_members
- if @group
= render "group_members", members: @group_members
:javascript - if @group
$('form.member-search-form').on('submit', function (event) { = render "group_members", members: @group_members
event.preventDefault();
Turbolinks.visit(this.action + '?' + $(this).serialize());
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment