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,5 @@
<% extend ContactsHelper %>
<%= render_tabs settings_contacts_tabs %>
<% html_title(l(:label_settings), l(:label_contact_plural)) -%>
@@ -0,0 +1,32 @@
<div class="contextual">
<%= link_to l(:label_crm_deal_status_new), {:controller => "deal_statuses", :action => 'new'}, :class => 'icon icon-add' %>
</div>
<h3><%=l(:label_crm_deal_status_plural)%></h3>
<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 DealStatus.where({}).order(:status_type, :position) %>
<tr class="<%= cycle("odd", "even") %>">
<td class="name"><span class="color" style="border: 1px solid #D7D7D7;background-color: <%= status.color_name %>;">&nbsp;&nbsp;&nbsp;&nbsp;</span> <%= link_to status.name, :controller => "deal_statuses", :action => 'edit', :id => status %></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%;"><%= stocked_reorder_link(status, 'deal_status', {:controller => "deal_statuses", :action => 'update', :id => status}, :put) %></td>
<td class="buttons">
<%= delete_link deal_status_path(status) %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= javascript_tag do %>
$(function() { $("table.list tbody").positionedItems(); });
<% end %>
@@ -0,0 +1,85 @@
<p>
<label><%= l(:label_crm_user_format) %></label>
<%= select_tag 'settings[name_format]', options_for_select(Contact::CONTACT_FORMATS.collect{|key, value| [key, value[:setting_order]]}.sort{|a, b| a[1] <=> b[1]}.collect{|f| [Contact.new(:first_name => 'Firstname', :last_name => 'Lastname', :middle_name => 'Middlename').name(f[0]), f[0].to_s]}, @settings["name_format"] ) %>
</p>
<p>
<label><%= l(:label_crm_default_list_style) %></label>
<%= select_tag 'settings[default_list_style]', options_for_select([[l(:label_crm_list_excerpt), "list_excerpt"], [l(:label_crm_list_list), "list"], [l(:label_crm_list_cards), "list_cards"]] , @settings["default_list_style"]) %>
</p>
<p>
<%= label_tag 'settings_select_companies_to_deal', l(:label_crm_select_companies) %>
<%= check_box_tag 'settings[select_companies_to_deal]', 1, @settings["select_companies_to_deal"] %>
</p>
<p>
<%= label_tag 'settings_cross_project_contacts', l(:label_crm_cross_project_contacts) %>
<%= check_box_tag 'settings[cross_project_contacts]', 1, @settings["cross_project_contacts"] %>
</p>
<p>
<label><%= l(:label_crm_post_address_format) %></label>
<%= text_area_tag 'settings[post_address_format]', ContactsSetting.post_address_format, :rows => 5 %>
<em class="info"><%= l(:label_crm_post_address_format_macros, :macros => '%street1%, %street2%, %city%, %town%, %postcode%, %zip%, %region%, %state%, %country%') %></em>
</p>
<p>
<label><%= l(:label_crm_default_country) %></label>
<%= select_tag 'settings[default_country]', options_for_select(countries_for_select, ContactsSetting.default_country) %>
</p>
<p>
<label><%= l(:label_crm_show_in_top_menu) %></label>
<span id="watchers_inputs">
<span class="floating" style="margin-left: 0px;">
<%= check_box_tag 'settings[contacts_show_in_top_menu]', 1, @settings["contacts_show_in_top_menu"] %>
<%= l(:label_contact_plural) %>
</span>
<span class="floating" style="margin-left: 0px;">
<%= check_box_tag 'settings[deals_show_in_top_menu]', 1, @settings["deals_show_in_top_menu"] %>
<%= l(:label_deal_plural) %>
</span>
</span>
</p>
<p>
<label><%= l(:label_crm_show_in_app_menu) %></label>
<span id="watchers_inputs">
<span class="floating" style="margin-left: 0px;">
<%= check_box_tag 'settings[contacts_show_in_app_menu]', 1, @settings["contacts_show_in_app_menu"] %>
<%= l(:label_contact_plural) %>
</span>
<span class="floating" style="margin-left: 0px;">
<%= check_box_tag 'settings[deals_show_in_app_menu]', 1, @settings["deals_show_in_app_menu"] %>
<%= l(:label_deal_plural) %>
</span>
</span>
</p>
<p>
<%= label_tag 'settings_note_authoring_time', l(:label_crm_contact_note_authoring_time) %>
<%= check_box_tag 'settings[note_authoring_time]', 1, @settings["note_authoring_time"] %>
</p>
<p>
<%= label_tag 'settings_show_closed_issues', l(:label_crm_contact_show_closed_issues) %>
<%= check_box_tag 'settings[show_closed_issues]', 1, @settings["show_closed_issues"] %>
</p>
<p>
<%= label_tag 'settings_auto_contacts_thumbnails', l(:label_crm_thumbnails_enabled) %>
<%= check_box_tag 'settings[auto_contacts_thumbnails]', 1, @settings["auto_contacts_thumbnails"] %>
</p>
<% unless Redmine::Thumbnail.convert_available? %>
<p>
<label><%= l(:label_crm_max_thumbnail_file_size) %></label>
<%= text_field_tag 'settings[max_contacts_thumbnail_file_size]', @settings["max_contacts_thumbnail_file_size"], :size => 6 %> <%= l(:"number.human.storage_units.units.kb") %>
</p>
<% end %>
<p>
<%= label_tag 'settings_monochrome_tags', l(:label_crm_monochrome_tags) %>
<%= check_box_tag 'settings[monochrome_tags]', 1, @settings["monochrome_tags"] %>
</p>
@@ -0,0 +1,4 @@
<p>
<label>Monochrome tags</label>
<%= check_box_tag 'settings[monochrome_tags]', 1, @settings[:monochrome_tags] %>
</p>
@@ -0,0 +1,40 @@
<% tags = Contact.all_tag_counts(:order => :name) %>
<h3><%= l(:label_crm_tags_plural) %></h3>
<% unless tags.empty? %>
<table class = "list issues">
<thead>
<tr>
<th class="checkbox hide-when-print">
<%= link_to image_tag('toggle_check.png'), {},
:onclick => 'toggleCRMIssuesSelection(this); return false;',
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %>
</th>
<th><%= l(:field_name) %></th>
<th align="center" style="width:10%;"> </th>
</tr>
</thead>
<tbody>
<% tags.each do |tag| %>
<tr id="<%= tag.id %>" class="<%= cycle("odd", "even") %> hascontextmenu ">
<td class="checkbox hide-when-print"><%= check_box_tag("ids[]", tag.id, false, :id => nil) %></td>
<td class="name"><%= tag_link(tag.name) %></td>
<td class="buttons">
<%= link_to l(:button_edit), edit_contacts_tag_path(tag),
:class => 'icon icon-edit' %>
<%= link_to l(:button_delete), contacts_tags_path(:ids => tag),
:method => :delete,
:data => {:confirm => l(:text_are_you_sure)},
:class => 'icon icon-del' %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
@@ -0,0 +1,43 @@
<p>
<label><%= l(:label_crm_disable_taxes) %></label>
<%= check_box_tag 'settings[disable_taxes]', 1, ContactsSetting.disable_taxes? %>
</p>
<span id="tax_data">
<p>
<label><%= l(:label_crm_default_tax) %></label>
<%= text_field_tag 'settings[default_tax]', ContactsSetting.default_tax, :size => 6, :maxlength => 5 %> %
</p>
<p>
<label><%= l(:label_crm_tax_type) %></label>
<%= select_tag 'settings[tax_type]', options_for_select([[l(:label_crm_tax_type_exclusive), ContactsSetting::TAX_TYPE_EXCLUSIVE],
[l(:label_crm_tax_type_inclusive), ContactsSetting::TAX_TYPE_INCLUSIVE]], ContactsSetting.tax_type) %>
</p>
</span>
<p>
<label><%= l(:label_crm_default_currency) %></label>
<%= select_tag 'settings[default_currency]', options_for_select(all_currencies.insert(0, ['', '']), ContactsSetting.default_currency) %>
</p>
<p>
<label><%= l(:label_crm_major_currencies) %></label>
<%= text_field_tag 'settings[major_currencies]', ContactsSetting.major_currencies.join(', '), :size => 40 %>
<br>
<em class="info"><%= l(:text_comma_separated) %></em>
</p>
<p>
<label><%= l(:label_crm_thousands_delimiter) %></label>
<%= select_tag 'settings[thousands_delimiter]', options_for_select([["9 999", " "],
["9,999", ","],
["9.999", "."]], ContactsSetting.thousands_delimiter) %>
</p>
<p>
<label><%= l(:label_crm_decimal_separator) %></label>
<%= select_tag 'settings[decimal_separator]', options_for_select([["0.00", "."],
["0,00", ","]], ContactsSetting.decimal_separator) %>
</p>