To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / app / views / issues / _edit.rhtml @ 441:cbce1fd3b1b7

History | View | Annotate | Download (2.7 KB)

1
<% labelled_tabular_form_for :issue, @issue,
2
                             :url => {:action => 'update', :id => @issue},
3
                             :html => {:id => 'issue-form',
4
                                       :class => nil,
5
                                       :method => :put,
6
                                       :multipart => true} do |f| %>
7
    <%= error_messages_for 'issue', 'time_entry' %>
8
    <div class="box">
9
    <% if @edit_allowed || !@allowed_statuses.empty? %>
10
        <fieldset class="tabular"><legend><%= l(:label_change_properties) %>
11
        <% if !@issue.new_record? && !@issue.errors.any? && @edit_allowed %>
12
        <small>(<%= link_to l(:label_more), {}, :onclick => 'Effect.toggle("issue_descr_fields", "appear", {duration:0.3}); return false;' %>)</small>
13
        <% end %>
14
        </legend>
15
        <%= render :partial => (@edit_allowed ? 'form' : 'form_update'), :locals => {:f => f} %>
16
        </fieldset>
17
    <% end %>
18
    <% if authorize_for('timelog', 'edit') %>
19
        <fieldset class="tabular"><legend><%= l(:button_log_time) %></legend>
20
        <% fields_for :time_entry, @time_entry, { :builder => TabularFormBuilder, :lang => current_language} do |time_entry| %>
21
        <div class="splitcontentleft">
22
        <p><%= time_entry.text_field :hours, :size => 6, :label => :label_spent_time %> <%= l(:field_hours) %></p>
23
        </div>
24
        <div class="splitcontentright">
25
        <p><%= time_entry.select :activity_id, activity_collection_for_select_options %></p>
26
        </div>
27
        <p><%= time_entry.text_field :comments, :size => 60 %></p>
28
        <% @time_entry.custom_field_values.each do |value| %>
29
                <p><%= custom_field_tag_with_label :time_entry, value %></p>
30
        <% end %>
31
        <% end %>
32
    </fieldset>
33
    <% end %>
34
    
35
    <fieldset><legend><%= l(:field_notes) %></legend>
36
    <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
37
    <%= wikitoolbar_for 'notes' %>
38
    <%= call_hook(:view_issues_edit_notes_bottom, { :issue => @issue, :notes => @notes, :form => f }) %>
39
    
40
    <p><%=l(:label_attachment_plural)%><br /><%= render :partial => 'attachments/form' %></p>
41
    </fieldset>
42
    </div>
43
    
44
    <%= f.hidden_field :lock_version %>
45
    <%= submit_tag l(:button_submit) %>
46
    <%= link_to_remote l(:label_preview), 
47
                       { :url => preview_issue_path(:project_id => @project, :id => @issue),
48
                         :method => 'post',
49
                         :update => 'preview',
50
                         :with => 'Form.serialize("issue-form")',
51
                         :complete => "Element.scrollTo('preview')"
52
                       }, :accesskey => accesskey(:preview) %>
53
<% end %>
54

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