% content_for :head do %>
<%= javascript_include_tag "prototype" %>
<%= javascript_include_tag "jquery" %>
<%= javascript_include_tag 'jrails.autocomplete', 'jquery.suggest' %>
<%= javascript_include_tag 'jquery.validate', 'messages_ru' %>
<%= javascript_include_tag "jscal2"%>
<%= javascript_include_tag "calendar2/js/lang/ru"%>
<%= javascript_include_tag "mod_functions"%>
<%= stylesheet_link_tag "materialsTable" , :media => "all"%>
<%= stylesheet_link_tag "jscal2" , :media => "all"%>
<% end -%>
<% form_for @report, :url => {:action => 'update'} do |f| -%>
<%= f.hidden_field :id %>
<%= f.hidden_field :tracker_id %>
<%= hidden_field_tag :f_name, 'Софтовая группа' %>
| Логин: |
<%= text_field_with_auto_complete :report, :name, {:size => 20, :class => "required"}, {:min_chars => 5, :url => {:controller => "logins", :action => "loginroots", :format => "json"}, :method => :get, :with => "'search=' + element.value" } %> <%= hidden_field_tag 'report_login_id', (true if @report.electro == 1), :class => "required" %> |
| Проверка логина: |
|
| Дата работ: |
<%= calendar_field_tag "date", @report.date.to_date, {:name => 'report[date]', :class =>"required", :readonly => true} %> |
| Категория: |
<% if @boss -%>
<%= f.select(:category, Category.mod.collect{ |c| [c.name, c.id]}, {}, :onchange => remote_function(:url => {:controller => 'mod', :action => 'change_price'}, :with => "'type=' + $j(this).val() + '&price=' + $j('#report_client_price_type').val() + '&id='+#{@report.id}", :method => :get)) %>
<% else -%>
<%= f.hidden_field :category %>
<%= @report.category_name %>
<% end -%>
|
| Статус: |
<% if @boss %>
<%= f.select(:status, [["Готово", 0], ["Отклонено", 1], ["Утверждено", 2]]) -%> |
<% else %>
<%= @report.status_name -%> |
<% end %>
<%= button_to 'Удалить', mod_path(@report), :method => :delete, :confirm => "Вы уверены?" -%>
<% end -%>