rosa-build/app/views/issues/_create_sidebar.html.haml

39 lines
1.8 KiB
Plaintext
Raw Normal View History

-content_for :sidebar do
2012-02-28 14:05:18 +00:00
- if @issue.persisted?
.bordered.nopadding
%h3=t('activerecord.attributes.issue.status')
#switcher.issue_status{:class => "#{@issue.closed? ? 'switcher-off' : 'switcher'} #{can?(:write, @issue.project) ? "switch_issue_status" : ''}"}
.swleft=t('layout.issues.status.open')
.swright=t('layout.issues.status.closed')
- if can? :write, @issue.project
=form_tag [@project, @issue], :id => 'update_issue_status', :method => :put do
=hidden_field_tag "issue_status", @issue.closed? ? 'closed' : 'open', :name => "issue[status]"
.bordered.nopadding
%h3=t('layout.issues.executor')
2012-02-28 14:05:18 +00:00
- if @issue.persisted? && @issue.user
.bordered.nopadding
.people.nopointer
.avatar=image_tag(@issue.user.avatar(25), :alt => 'avatar')
.name="#{@issue.user.uname} (#{@issue.user.name})"
=hidden_field_tag "user-0", @issue.user.id, :name => 'user_id'
.both
- else
=form_tag search_collaborators_project_issues_path(@project), :id => 'search_user', :method => :get do
=tracker_search_field(:search_user, t('layout.issues.search_user'))
#create_issue_users_list
=render 'issues/search_collaborators'
.block
%h3=t('layout.issues.labels')
2012-02-28 14:05:18 +00:00
- if @issue.new_record?
=form_tag search_labels_project_issues_path(@project), :id => 'search_labels', :method => :get do
=tracker_search_field(:search_labels, t('layout.issues.search_labels'))
#create_issue_labels_list
=render 'issues/search_labels'
- else
- (@issue.labels || []).each_with_index do |label|
.label.selected.nopointer
.labeltext.selected{:style => "background: ##{label.color};"}
=label.name
.both