rosa-build/app/views/projects/collaborators/index.html.haml

74 lines
2.4 KiB
Plaintext
Raw Normal View History

2014-01-21 04:51:49 +00:00
-set_meta_tags title: [title_object(@project), t('layout.projects.members')]
= render 'sidebar'
= render 'submenu'
2014-01-21 04:51:49 +00:00
%a{name: 'users'}
%h3= t("layout.users.list_header")
2013-08-07 19:54:42 +01:00
#collaborators{'ng-controller' => 'CollaboratorsController'}
= hidden_field_tag :owner_name, @project.try(:owner).try(:uname)
= hidden_field_tag :project_name, @project.try(:name)
#add_collaborator_form
.admin-search.withimage
.img
2014-01-21 04:51:49 +00:00
%img{alt: 'avatar', 'ng-src' => '{{new_collaborator.avatar}}', 'ng-show' => 'new_collaborator.avatar'}
2013-08-07 19:54:42 +01:00
= text_field_tag :collaborator_name, nil, 'ng-model' => 'new_collaborator.term', 'ng-keyup' => 'search()'
2013-08-08 11:41:54 +01:00
.admin-role
.lineForm
= select_tag 'role', options_for_collaborators_roles_select, 'ng-model' => 'new_collaborator.collaborator.role'
.admin-add
2014-01-21 04:51:49 +00:00
%a.button{rel: 'nofollow', href: '', 'ng-click' => 'add()'}
2013-08-08 11:41:54 +01:00
= t('layout.add')
.both
.users-search-popup
.header
.title= t('layout.issues.search_user')
%span.icon-remove-circle
.list
.people{'ng-repeat' => 'c in new_collaborators', 'ng-click' => 'select(c)'}
.avatar
%img{width: '16px', 'ng-src' => '{{c.avatar}}', alt: 'avatar'}
.name {{c.actor_name}}
.both
2014-01-21 04:51:49 +00:00
.nothing{'ng-hide' => 'new_collaborators.length > 0'}= t('layout.issues.nothing_to_show')
.both
.both
2014-01-21 04:51:49 +00:00
%table.tablesorter{cellpadding: "0", cellspacing: "0"}
%thead
%tr
%th.centered
%span.delete{'ng-click' => 'deleteCollaborators()'}   
%th
= t("layout.collaborators.members")
2014-01-21 04:51:49 +00:00
%th{colspan: "3"}
= t("layout.collaborators.roles")
%tr.search
2014-01-21 04:51:49 +00:00
%th{colspan: "5"}
%input{type: "text", placeholder: "#{t('layout.filter_by_name')}", 'ng-model' => 'query.actor_name'}
%tbody
%tr{'ng-repeat' => 'c in collaborators | filter:query'}
%td
2014-01-21 04:51:49 +00:00
%input{type: 'checkbox', 'ng-model' => 'c.removed' }
%td
.img
%img{'ng-src' => '{{c.avatar}}', alt: 'avatar' }
.forimg
%a{'ng-href' => '{{c.actor_path}}'} {{c.actor_name}}
- Relation::ROLES.each do |role|
%td
.radio
2014-01-21 04:51:49 +00:00
%input{type: 'radio', 'ng-model' => 'c.collaborator.role', value: role, 'ng-click' => 'update(c)'}
.forradio
%label= t("layout.collaborators.role_names.#{role}")
%br
.both