53 lines
2.3 KiB
Plaintext
53 lines
2.3 KiB
Plaintext
.block
|
|
.secondary-navigation
|
|
%ul.wat-cf
|
|
%li.first= link_to t("layout.collaborators.back_to_proj"), project_path(@project)
|
|
%li.active= link_to t("layout.collaborators.edit"), edit_project_collaborators_path(@project)
|
|
.content
|
|
.inner
|
|
= form_tag project_collaborators_path(@project) do
|
|
%h2.title= t("layout.users.list_header")
|
|
%table.table
|
|
%tr
|
|
%th.first ID
|
|
%th= t("activerecord.attributes.user.name")
|
|
%th= t("activerecord.attributes.user.roles")
|
|
%th= t("activerecord.attributes.user.uname")
|
|
- #TODO: Replace this Chelyabinsk add/remove collaborators method by more human method
|
|
- @users.each do |user|
|
|
%tr{:class => cycle("odd", "even")}
|
|
%td
|
|
= user.id
|
|
%td
|
|
= link_to user.name, user_path(user)
|
|
%td
|
|
- Relation::ROLES.each do |role|
|
|
= check_box_tag "#{ role }[#{user.id}]", '1', ((@project.relations.exists? :object_id => user.id, :object_type => 'User', :role => role) ? :checked : nil), {:class => "user_role_chbx"}
|
|
= label_tag "#{ role }[#{user.id}]", t("layout.collaborators.roles.#{ role }")
|
|
%td
|
|
= user.uname
|
|
/%h2.title= t("layout.groups.list_header")
|
|
/%table.table
|
|
/ %tr
|
|
/ %th.first ID
|
|
/ %th= t("activerecord.attributes.group.name")
|
|
/ %th= t("activerecord.attributes.group.uname")
|
|
/ %th.last= t("layout.collaborators.add")
|
|
/ - @groups.each do |group|
|
|
/ %tr{:class => cycle("odd", "even")}
|
|
/ %td
|
|
/ = group.id
|
|
/ %td
|
|
/ = link_to group.name, group_path(group)
|
|
/ %td
|
|
/ = group.uname
|
|
/ %td.last
|
|
/ = check_box_tag "group[#{group.id}]", '1', (@project.groups.include? group) ? :checked : nil
|
|
/ = label_tag "group[#{group.id}]", t("layout.collaborators.add")
|
|
.group.navform.wat-cf
|
|
%button.button{:type => "submit"}
|
|
= image_tag("web-app-theme/icons/tick.png", :alt => t("layout.save"))
|
|
= t("layout.save")
|
|
%span.text_button_padding= t("layout.or")
|
|
= link_to t("layout.cancel"), project_path(@project), :class => "text_button_padding link_button"
|