Initial Redmine tooling and local plugin forks
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<% if ContactsSetting[:contacts_show_on_projects_show, @project.id].to_i > 0 && User.current.allowed_to?(:view_contacts, @project) %>
|
||||
|
||||
<% contacts = Contact.visible.by_project(@project).limit(50).order("#{Contact.table_name}.created_on DESC") %>
|
||||
|
||||
<% if contacts.length > 0 %>
|
||||
<div class="box" id="duplicates">
|
||||
<h3 class="icon icon-vcard"><%= l(:label_contact_plural) %></h3>
|
||||
|
||||
<% if contacts.select{|c| !c.is_company}.any? %>
|
||||
<div id="duplicates">
|
||||
<% contacts.select{|c| !c.is_company}.each do |contact| %>
|
||||
<div class="avatar tooltip" style="display: inline;">
|
||||
<%= link_to avatar_to(contact, :size => "64"), contact_path(contact), :id => "avatar" %>
|
||||
<span class="tip contact"><%= render_contact_tooltip(contact, :icon => true) %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if contacts.select{|c| c.is_company}.any? %>
|
||||
<div id="duplicates">
|
||||
<% contacts.select{|c| c.is_company}.each do |contact| %>
|
||||
<div class="avatar tooltip" style="display: inline;">
|
||||
<%= link_to avatar_to(contact, :size => "64"), contact_path(contact), :id => "avatar" %>
|
||||
<span class="tip contact"><%= render_contact_tooltip(contact, :icon => true) %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
<p class="small"><%= link_to l(:label_crm_contact_view_all),
|
||||
:controller => 'contacts',
|
||||
:action => 'index',
|
||||
:project_id => project.id %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% content_for(:header_tags) do %>
|
||||
<%= javascript_include_tag :contacts, :plugin => 'redmine_contacts' %>
|
||||
<%= stylesheet_link_tag :contacts, :plugin => 'redmine_contacts' %>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
@@ -0,0 +1,14 @@
|
||||
<%= form_tag({:controller => "contacts_settings", :action => "save", :project_id => @project, :tab => 'contacts'}, :method => :post, :class => "tabular") do %>
|
||||
<div class="tabular box">
|
||||
<p>
|
||||
<label><%= l(:label_crm_show_on_projects_show) %></label>
|
||||
<%= hidden_field_tag('contacts_settings[contacts_show_on_projects_show]', 0) %>
|
||||
<%= check_box_tag 'contacts_settings[contacts_show_on_projects_show]', 1, ContactsSetting[:contacts_show_on_projects_show, @project.id].to_i > 0 %>
|
||||
</p>
|
||||
|
||||
<%= call_hook(:view_contacts_project_settings_bottom, :project => @project) %>
|
||||
|
||||
</div>
|
||||
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<% end %>
|
||||
@@ -0,0 +1,28 @@
|
||||
<h3><%= l(:label_crm_deal_status_plural) %></h3>
|
||||
|
||||
<% if DealStatus.all.any? %>
|
||||
<%= form_tag({:controller => "deal_statuses", :action => "assing_to_project", :project_id => @project, :tab => 'deals'}, :method => :put, :class => "tabular") do %>
|
||||
<table class="list">
|
||||
<thead><tr>
|
||||
<th><%= l(:field_name) %></th>
|
||||
<th><%=l(:field_is_default)%></th>
|
||||
<th><%=l(:label_crm_deal_status_type)%></th>
|
||||
<th style="width:15%;"><%= l(:field_active) %></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% DealStatus.order(:status_type, :position).find_each do |status| %>
|
||||
|
||||
<tr class="<%= cycle 'odd', 'even' %>">
|
||||
<td class="name"><span class="color" style="border: 1px solid #D7D7D7;background-color: <%= status.color_name %>;"> </span> <%= h(status.name) %></td>
|
||||
<td align="center" style="width:15%;"><%= checked_image status.is_default? %></td>
|
||||
<td align="center" style="width:15%;"><%= status.status_type_name %></td>
|
||||
<td align="center" style="width:15%;">
|
||||
<%= check_box_tag "deal_statuses[]", status.id , @project.deal_statuses.include?(status) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -0,0 +1,32 @@
|
||||
<h3><%= l(:label_crm_deal_category_plural) %></h3>
|
||||
|
||||
<% if @project.deal_categories.any? %>
|
||||
|
||||
<table class="list">
|
||||
<thead><tr>
|
||||
<th><%= l(:field_name) %></th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% for category in @project.deal_categories %>
|
||||
<% unless category.new_record? %>
|
||||
<tr class="<%= cycle 'odd', 'even' %>">
|
||||
<td class="name"><%= category.name %></td>
|
||||
<td class="buttons">
|
||||
<% if User.current.allowed_to?(:manage_deals, @project) %>
|
||||
<%= link_to l(:button_edit), edit_deal_category_path(category), :class => 'icon icon-edit' %>
|
||||
<%= delete_link deal_category_path(category) %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
||||
|
||||
<p><%= link_to_if_authorized l(:label_crm_deal_category_new), :controller => 'deal_categories', :action => 'new', :project_id => @project %></p>
|
||||
|
||||
<%= render :partial => "projects/deal_statuses" %>
|
||||
Reference in New Issue
Block a user