Initial Redmine tooling and local plugin forks

This commit is contained in:
Jason Thistlethwaite
2026-04-24 22:01:18 +00:00
commit 9f682af0eb
683 changed files with 56878 additions and 0 deletions
@@ -0,0 +1,8 @@
<p class="address">
<label><%= l(:label_crm_address) %></label>
<%= f.text_field :street1, :no_label => true, :placeholder => l(:label_crm_street1), :style => "width:90%;" -%></p>
<p class="address street2"><%= f.text_field :street2, :no_label => true, :placeholder => l(:label_crm_street2) -%></p>
<p class="address city"><%= f.text_field :city, :no_label => true, :placeholder => l(:label_crm_city) -%> </p>
<p class="address region"><%= f.text_field :region, :no_label => true, :placeholder => l(:label_crm_region) -%></p>
<p class="address postcode"><%= f.text_field :postcode, :no_label => true, :placeholder => l(:label_crm_postcode), :size => 12 -%></p>
<p class="address country"><%= f.select :country_code, countries_options_for_select(f.object.country_code), :no_label => true, :placeholder => l(:label_crm_country), :include_blank => true -%></p>
@@ -0,0 +1,17 @@
<% actions ||= "" %>
<table class="note_data" id="contact_data_<%= contact_data.id %>">
<tr>
<td class="avatar"><%= link_to avatar_to(contact_data, :size => "32"), note_source_url(contact_data), :id => "avatar" %></td>
<td class="name">
<h4 class="contacts_header">
<%= link_to contact_data.name, note_source_url(contact_data) %>
</h4>
<%= contact_data.info %>
</td>
<% if !actions.blank? %>
<td>
<%= actions %>
</td>
<% end %>
</tr>
</table>
@@ -0,0 +1,29 @@
<% selected_tab = params[:tab] ? params[:tab].to_s : tabs.first[:name] %>
<div class="tabs">
<ul>
<% tabs.each do |tab| -%>
<li><%= link_to tab[:label], tabs_contact_path(@contact, :tab => tab[:name]),
:id => "tab-#{tab[:name]}",
:class => (tab[:name] != selected_tab ? 'tab-header' : 'selected tab-header'),
:data => { :name => tab[:name], :partial => tab[:partial], :project_id => @project},
:onclick => "showContactTab('#{tab[:name]}'); this.blur(); return false;" %></li>
<% end -%>
</ul>
<div class="tabs-buttons" style="display:none;">
<button class="tab-left" onclick="moveTabLeft(this);"></button>
<button class="tab-right" onclick="moveTabRight(this);"></button>
</div>
</div>
<% tabs.each do |tab| %>
<% selected = tab[:name] == selected_tab %>
<div class='tab-placeholder tab-content <%= 'active loaded' if selected %>' id='tab-placeholder-<%= tab[:name] %>' style='<%= "display: block" if selected %>'>
<%= render(:partial => tab[:partial]) if selected %>
</div>
<% end %>
<script type='text/javascript'>
$(document).ready(displayTabsButtons);
$(window).resize(displayTabsButtons);
$(document).ready(function(){ setupDeferredTabs('<%= load_tab_contact_path(@contact) %>') });
</script>
@@ -0,0 +1,9 @@
<script type="text/javascript">
var field_formats = ['contact', 'company'];
var contact_filter_urls = {
'company': "<%= auto_complete_contacts_path(:project_id => (ContactsSetting.cross_project_contacts? ? nil : @project), :is_company => true) %>",
'contact': "<%= auto_complete_contacts_path(:project_id => (ContactsSetting.cross_project_contacts? ? nil : @project)) %>"
};
field_formats.push('deal');
contact_filter_urls['deal'] = '<%= auto_complete_deals_path(:project_id => (ContactsSetting.cross_project_contacts? ? nil : @project)) %>';
</script>
@@ -0,0 +1,4 @@
<% if notes_attachments.any? %>
<h3><%= l(:label_attachment_plural) %></h3>
<%= render :partial => 'attachments/links', :locals => {:attachments => notes_attachments, :options => {}} %>
<% end %>
@@ -0,0 +1,4 @@
<h3><%= l(:label_crm_recently_viewed) %></h3>
<div id="recently_viewed">
<%= render :partial => 'common/contact_data', :collection => RecentlyViewed.includes(:viewed).last(5).map(&:viewed).select{|v| !v.blank? && v.visible?} %>
</div>
@@ -0,0 +1,10 @@
<% if responsible_user.assigned_to %>
<h3><%= l(:label_crm_assigned_to) %></h3>
<div id="responsible_user">
<ul>
<li>
<%= (avatar(responsible_user.assigned_to, :size => "16").to_s + link_to_user(responsible_user.assigned_to, :class => 'user').to_s).html_safe %>
</li>
</ul>
</div>
<% end %>
@@ -0,0 +1,15 @@
<%= call_hook(:view_contacts_sidebar_top) %>
<h3><%= l(:label_crm_module_plural) %></h3>
<% if User.current.allowed_to?(:view_contacts, @project, :global => true) %>
<%= link_to l(:label_contact_plural), { :controller => 'contacts', :action => 'index', :project_id => @project, :set_filter => 1} %>
|
<% end %>
<% if User.current.allowed_to?(:view_deals, @project, :global => true) %>
<%= link_to l(:label_deal_plural), { :controller => 'deals', :action => 'index', :project_id => @project, :set_filter => 1} %>
|
<% end %>
<%= link_to l(:label_crm_note_plural), { :controller => 'contacts', :action => 'contacts_notes', :project_id => @project} %>
<%= call_hook(:view_contacts_sidebar_bottom) %>