summaryrefslogtreecommitdiffstats
path: root/app/views/issues/_edit.html.erb
blob: b5ddfac382399ebeb46a2858b3978cbe22766ecd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<%= labelled_form_for @issue, :html => {:id => 'issue-form', :multipart => true} do |f| %>
    <%= error_messages_for 'issue', 'time_entry' %>
    <%= render :partial => 'conflict' if @conflict %>
    <div class="box">
    <% if @edit_allowed || !@allowed_statuses.empty? %>
        <fieldset class="tabular"><legend><%= l(:label_change_properties) %></legend>
        <div id="all_attributes">
        <%= render :partial => 'form', :locals => {:f => f} %>
        </div>
        </fieldset>
    <% end %>
    <% if User.current.allowed_to?(:log_time, @project) %>
        <fieldset class="tabular"><legend><%= l(:button_log_time) %></legend>
        <%= labelled_fields_for :time_entry, @time_entry do |time_entry| %>
        <div class="splitcontentleft">
        <p><%= time_entry.text_field :hours, :size => 6, :label => :label_spent_time %> <%= l(:field_hours) %></p>
        </div>
        <div class="splitcontentright">
        <p><%= time_entry.select :activity_id, activity_collection_for_select_options %></p>
        </div>
        <p><%= time_entry.text_field :comments, :size => 60 %></p>
        <% @time_entry.custom_field_values.each do |value| %>
          <p><%= custom_field_tag_with_label :time_entry, value %></p>
        <% end %>
        <% end %>
    </fieldset>
    <% end %>

    <fieldset><legend><%= l(:field_notes) %></legend>
    <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
    <%= wikitoolbar_for 'notes' %>
    <%= call_hook(:view_issues_edit_notes_bottom, { :issue => @issue, :notes => @notes, :form => f }) %>

    <p><%=l(:label_attachment_plural)%><br /><%= render :partial => 'attachments/form', :locals => {:container => @issue} %></p>
    </fieldset>
    </div>

    <%= f.hidden_field :lock_version %>
    <%= hidden_field_tag 'last_journal_id', params[:last_journal_id] || @issue.last_journal_id %>
    <%= submit_tag l(:button_submit) %>
    <%= link_to_remote l(:label_preview),
                       { :url => preview_edit_issue_path(:project_id => @project, :id => @issue),
                         :method => 'post',
                         :update => 'preview',
                         :with => 'Form.serialize("issue-form")',
                         :complete => "Element.scrollTo('preview')"
                       }, :accesskey => accesskey(:preview) %>
<% end %>

<div id="preview" class="wiki"></div>