Initial Redmine tooling and local plugin forks
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<%= error_messages_for 'deal_status' %>
|
||||
|
||||
<div class="box tabular">
|
||||
<!--[form:deal_status]-->
|
||||
<p><label for="deal_status_name"><%=l(:field_name)%><span class="required"> *</span></label>
|
||||
<%= text_field 'deal_status', 'name' %></p>
|
||||
|
||||
|
||||
<p><label for="tag_color"><%=l(:field_color)%></label>
|
||||
<%= text_field 'deal_status', 'color_name', :class => "colorpicker" %>
|
||||
<!--[eoform:optvalue]-->
|
||||
</p>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
//use this method to add new colors to pallete
|
||||
//$.fn.colorPicker.addColors(['000', '000', 'fff', 'fff']);
|
||||
|
||||
$('#deal_status_color_name').colorPicker();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<p><label for="deal_status_status_type"><%=l(:label_crm_deal_status_type)%></label>
|
||||
<%= select_tag 'deal_status[status_type]', options_for_select([[l(:label_open_issues), DealStatus::OPEN_STATUS], [l(:label_crm_deal_status_won), DealStatus::WON_STATUS], [l(:label_crm_deal_status_lost), DealStatus::LOST_STATUS]], @deal_status.status_type) %>
|
||||
|
||||
<p><label for="deal_status_is_default"><%=l(:field_is_default)%></label>
|
||||
<%= check_box 'deal_status', 'is_default' %></p>
|
||||
|
||||
<%= call_hook(:view_deal_statuses_form, :deal_status => @deal_status) %>
|
||||
|
||||
<!--[eoform:deal_status]-->
|
||||
</div>
|
||||
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag :contacts, :plugin => 'redmine_contacts' %>
|
||||
<%= javascript_include_tag :"jquery.colorPicker.min.js", :plugin => 'redmine_contacts' %>
|
||||
<%= stylesheet_link_tag :"colorPicker.css", :plugin => 'redmine_contacts' %>
|
||||
<% end %>
|
||||
@@ -0,0 +1,6 @@
|
||||
<h2><%= link_to l(:label_crm_deal_status_plural), :controller => 'deal_statuses', :action => 'index' %> » <%=h @deal_status %></h2>
|
||||
|
||||
<%= form_tag({:action => 'update', :id => @deal_status}, :class => "tabular", :method => :put) do %>
|
||||
<%= render :partial => 'form' %>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<% end %>
|
||||
@@ -0,0 +1,12 @@
|
||||
api.array :deal_statuses, api_meta(:total_count => @deal_statuses.count) do
|
||||
@deal_statuses.each do |deal_status|
|
||||
api.deal_status do
|
||||
api.id deal_status.id
|
||||
api.name deal_status.name
|
||||
api.position deal_status.position
|
||||
api.is_default deal_status.is_default
|
||||
api.status_type deal_status.status_type
|
||||
api.color deal_status.color
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,30 @@
|
||||
<div class="contextual">
|
||||
<%= link_to l(:label_crm_deal_status_new), {:action => 'new'}, :class => 'icon icon-add' %>
|
||||
</div>
|
||||
|
||||
<h2><%=l(:label_crm_deal_status_plural)%></h2>
|
||||
|
||||
<table class="list">
|
||||
<thead><tr>
|
||||
<th><%=l(:field_status)%></th>
|
||||
<th><%=l(:field_is_default)%></th>
|
||||
<th><%=l(:label_crm_deal_status_type)%></th>
|
||||
<th><%=l(:button_sort)%></th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% for status in @deal_statuses %>
|
||||
<tr class="<%= cycle("odd", "even") %>">
|
||||
<td class="name"><%= link_to status.name, :action => 'edit', :id => status %></td>
|
||||
<td align="center"><%= checked_image status.is_default? %></td>
|
||||
<td align="center"><%= status.status_type_name %></td>
|
||||
<td align="center" style="width:15%;"><%= reorder_links('deal_status', {:action => 'update', :id => status}, :put) %></td>
|
||||
<td class="buttons">
|
||||
<%= delete_link deal_status_path(status) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end unless @deal_statuses.blank? %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<% html_title(l(:label_crm_deal_status_plural)) -%>
|
||||
@@ -0,0 +1,6 @@
|
||||
<h2><%= link_to l(:label_crm_deal_status_plural), :controller => 'deal_statuses', :action => 'index' %> » <%=l(:label_crm_deal_status_new)%></h2>
|
||||
|
||||
<%= form_tag({:action => 'create'}, :class => "tabular") do %>
|
||||
<%= render :partial => 'form' %>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user