Nuevo plugin Additionals 2.0.20

This commit is contained in:
Manuel Cillero 2019-06-16 12:53:09 +02:00
parent a2a901b71b
commit 93e1e28683
354 changed files with 40514 additions and 0 deletions

View file

@ -0,0 +1,2 @@
- if Additionals.setting?(:invisible_captcha)
= invisible_captcha

View file

@ -0,0 +1,5 @@
- login_text = Additionals.settings[:account_login_bottom]
- if login_text.present?
br
.login-additionals
= textilizable(login_text)

View file

@ -0,0 +1,9 @@
- footer = Additionals.settings[:global_footer]
- if footer.present?
.additionals-footer
= textilizable(footer)
- if @additionals_help_items.present?
javascript:
$(function() {
$('a.help').parent().append("<ul class=\"menu-children\">#{escape_javascript(@additionals_help_items)}</ul>");
});

View file

@ -0,0 +1,5 @@
- unless (controller_name == 'account' && action_name == 'login') || \
(controller_name == 'my') || \
(controller_name == 'account' && action_name == 'lost_password')
- if Additionals.setting?(:add_go_to_top)
a.gototop[href="#gototop"] = l(:label_go_to_top)

View file

@ -0,0 +1,27 @@
div id="#{export_format}-export-options" style="display: none"
h3.title = l(:label_export_options, export_format: export_format.upcase)
= form_tag(url, method: :get, id: "#{export_format}-export-form") do
- if @query.available_filters.key?('description')
= query_as_hidden_field_tags @query, [:description]
else
= query_as_hidden_field_tags @query
p
label
= radio_button_tag 'c[]', '', true
= l(:description_selected_columns)
br
label
= radio_button_tag 'c[]', 'all_inline'
= l(:description_all_columns)
- if @query.available_filters.key?('description')
p
label
= check_box_tag 'c[]', 'description', @query.has_column?(:description)
= l(:field_description)
- if Rails.version >= '5.2'
= export_csv_encoding_select_tag
p.buttons
= submit_tag l(:button_export), name: nil, onclick: 'hideModal(this);'
'
= link_to_function l(:button_cancel), 'hideModal(this);'

View file

@ -0,0 +1,2 @@
- if Additionals.setting?(:add_go_to_top)
a#gototop

View file

@ -0,0 +1,5 @@
- sidebar = Additionals.settings[:global_sidebar]
- if sidebar.present?
br
.sidebar-additionals
= textilizable(sidebar)

View file

@ -0,0 +1,7 @@
= render(partial: 'additionals/live_search_ajax_call.js', layout: false, formats: [:js])
- unless defined? classes
- classes = 'title'
h2 class="#{classes}"
= @query.new_record? ? l(title) : h(@query.name)
span.additionals-live-search
= text_field_tag(:search, q, autocomplete: 'off', class: 'live-search-field', placeholder: l(placeholder))

View file

@ -0,0 +1,9 @@
- additionals_top_menu_setup
- if Additionals.settings[:external_urls].to_i > 0
= javascript_include_tag('redirect', plugin: 'additionals')
- if Additionals.settings[:external_urls].to_i == 2
= javascript_include_tag('noreferrer', plugin: 'additionals')
= additionals_library_load(:font_awesome)
= stylesheet_link_tag 'additionals', plugin: 'additionals'
- if User.current.try(:hrm_user_type_id).nil?
- render_custom_top_menu_item

View file

@ -0,0 +1,18 @@
javascript:
$(function() {
// when the #search field changes
$('#search').live_observe_field(2, function() {
var form = $('#query_form'); // grab the form wrapping the search bar.
var url = form.attr('action');
form.find('[name="c[]"] option').each(function(i, elem) {
$(elem).attr('selected', true)
})
var formData = form.serialize();
form.find('[name="c[]"] option').each(function(i, elem) {
$(elem).attr('selected', false)
})
$.get(url, formData, function(data) { // perform an AJAX get, the trailing function is what happens on successful get.
$("#query-result-list").html(data); // replace the "results" div with the result of action taken
});
});
});

View file

@ -0,0 +1,31 @@
- options = {} if options.nil?
javascript:
$("##{field_id}").select2({
ajax: {
url: "#{ajax_url}",
dataType: 'json',
delay: 250,
data: function(params) {
return {
q: params.term
};
},
processResults: function(data, params) {
return {
results: data
};
},
cache: true
},
placeholder: "#{options[:placeholder].presence}",
allowClear: #{options[:allow_clear].present? && options[:allow_clear] ? 'true' : 'false'},
minimumInputLength: 0,
width: '60%',
templateResult: formatState
});
function formatState(opt) {
if (opt.loading) return opt.name;
var $opt = $('<span>' + opt.name_with_icon + '</span>');
return $opt;
};

View file

@ -0,0 +1,27 @@
fieldset.box
legend = l(:additionals_query_list_defaults)
- setting_name_columns = "#{query_type}_list_defaults"
- query = query_class.new(@settings[setting_name_columns.to_sym])
- if Redmine::VERSION.to_s >= '4'
.default-query-settings-label-redmine4
= render_query_columns_selection(query, name: "settings[#{setting_name_columns}][column_names]")
- else
.default-query-settings-label
= render_query_columns_selection(query, name: "settings[#{setting_name_columns}][column_names]")
- columns = query_class.new.available_totalable_columns
- if columns.count > 0
fieldset.box
legend = l(:additionals_query_list_default_totals)
.default-query-settings-totals
- setting_name_totals = "#{query_type}_list_default_totals"
= hidden_field_tag("settings[#{setting_name_totals}][]", '')
- columns.each do |s|
label.inline
- value = @settings[setting_name_totals.to_sym].present? ? @settings[setting_name_totals.to_sym].include?(s.name.to_s) : false
= check_box_tag("settings[#{setting_name_totals}][]",
s.name,
value,
id: nil)
= s.caption

View file

@ -0,0 +1,26 @@
- if defined?(show_always) && show_always || entry.tag_list.present?
.tags.attribute
- unless defined? hide_label
span.label
= l(:field_tag_list)
' :
- if defined?(editable) && editable
#tags-data
= additionals_tag_links(entry.tags, tags_without_color: defined?(tags_without_color) ? tags_without_color : false)
'
span.contextual
= link_to l(:label_edit_tags),
{},
onclick: "$('#edit_tags_form').show(); $('#tags-data').hide(); return false;",
id: 'edit_tags_link'
#edit_tags_form style="display: none;"
= form_tag(update_url, method: :put, multipart: true ) do
= render partial: 'tags_form'
'
= submit_tag l(:button_save), class: 'button-small'
'
= link_to l(:button_cancel), {}, onclick: "$('#edit_tags_form').hide(); $('#tags-data').show(); return false;"
- else
= additionals_tag_links(entry.tags, tags_without_color: defined?(tags_without_color) ? tags_without_color : false)

View file

@ -0,0 +1,8 @@
- @settings = ActionController::Parameters.new(@settings) unless Rails.version >= '5.2'
' Need Help? :
= link_to(l(:label_additionals_doc),
'https://additionals.readthedocs.io/en/latest/',
class: 'external',
target: '_blank',
rel: 'noopener')
= render_tabs additionals_settings_tabs

View file

@ -0,0 +1,39 @@
br
h3 = l(:label_content_plural)
p
= content_tag(:label, l(:label_account_login))
= text_area_tag 'settings[account_login_bottom]', @settings[:account_login_bottom], class: 'wiki-edit', rows: 10
em.info
= l(:account_login_info)
p
= content_tag(:label, l(:label_global_sidebar))
= text_area_tag 'settings[global_sidebar]', @settings[:global_sidebar], class: 'wiki-edit', rows: 10
em.info
= l(:global_sidebar_info)
p
= content_tag(:label, l(:label_global_footer))
= text_area_tag 'settings[global_footer]', @settings[:global_footer], class: 'wiki-edit', rows: 5
em.info
= l(:global_footer_info)
br
h3 = l(:label_setting_plural)
p
= content_tag(:label, l(:label_external_urls))
= select_tag 'settings[external_urls]',
options_for_select({ l(:external_url_default) => '0',
l(:external_url_new_window) => '1',
l(:external_url_noreferrer) => '2' }, @settings['external_urls'])
em.info
= t(:external_urls_info_html)
p
= content_tag(:label, l(:label_add_go_to_top))
= check_box_tag 'settings[add_go_to_top]', 1, @settings[:add_go_to_top].to_i == 1
em.info
= t(:add_go_to_top_info)
p
= content_tag(:label, l(:label_legacy_smiley_support))
= check_box_tag 'settings[legacy_smiley_support]', 1, @settings[:legacy_smiley_support].to_i == 1
em.info
= t(:legacy_smiley_support_info_html)

View file

@ -0,0 +1,112 @@
br
h3 = l(:label_content_plural)
p
= content_tag(:label, l(:label_new_ticket_message))
= text_area_tag 'settings[new_ticket_message]', @settings[:new_ticket_message], class: 'wiki-edit', rows: 10
em.info = l(:new_ticket_message_info)
br
hr
h3 = l(:label_setting_plural)
.info = t(:top_rules_help)
br
p
= content_tag(:label, l(:label_new_issue_on_profile))
= check_box_tag 'settings[new_issue_on_profile]', 1, @settings[:new_issue_on_profile].to_i == 1
p
= content_tag(:label, l(:label_issue_assign_to_me))
= check_box_tag 'settings[issue_assign_to_me]', 1, @settings[:issue_assign_to_me].to_i == 1
p
= content_tag(:label, l(:label_issue_change_status_in_sidebar))
= check_box_tag 'settings[issue_change_status_in_sidebar]', 1, @settings[:issue_change_status_in_sidebar].to_i == 1
p
= content_tag(:label, l(:label_issue_autowatch_involved))
= check_box_tag 'settings[issue_autowatch_involved]', 1, @settings[:issue_autowatch_involved].to_i == 1
p
= content_tag(:label, l(:label_rule_issue_close_with_open_children))
= check_box_tag 'settings[issue_close_with_open_children]', 1, @settings[:issue_close_with_open_children].to_i == 1
p
= content_tag(:label, l(:label_rule_issue_freezed_with_close))
= check_box_tag 'settings[issue_freezed_with_close]', 1, @settings[:issue_freezed_with_close].to_i == 1
em.info = t(:rule_issue_freezed_with_close_info)
br
- rule_status = IssueStatus.sorted
p
= content_tag(:label, l(:label_rule_issue_status_change))
= check_box_tag 'settings[issue_status_change]', 1, @settings[:issue_status_change].to_i == 1
span[style="vertical-align: top; margin-left: 15px;"]
= l(:field_status)
| x:
= select_tag 'settings[issue_status_x]',
options_for_select(rule_status.collect { |column| [column.name, column.id] },
@settings[:issue_status_x]),
multiple: true, size: 6, style: 'width:150px'
'
= l(:field_status)
| y:
= select_tag 'settings[issue_status_y]',
options_for_select(rule_status.collect { |column| [column.name, column.id] },
@settings[:issue_status_y]),
multiple: false, style: 'width:150px; vertical-align: top'
em.info = t(:rule_issue_status_change_info)
br
br
p
= content_tag(:label, l(:label_rule_issue_current_user_status))
= check_box_tag 'settings[issue_current_user_status]', 1, @settings[:issue_current_user_status].to_i == 1
span[style="vertical-align: top; margin-left: 15px;"]
= l(:field_status)
| x:
= select_tag 'settings[issue_assign_to_x]',
options_for_select(rule_status.collect { |column| [column.name, column.id] },
@settings[:issue_assign_to_x]),
multiple: true, size: 6, style: 'width:150px'
em.info = t(:rule_issue_current_user_status_info_html)
br
br
p
= content_tag(:label, l(:label_rule_issue_auto_assign))
= check_box_tag 'settings[issue_auto_assign]', 1, @settings[:issue_auto_assign].to_i == 1
span[style="vertical-align: top; margin-left: 15px;"]
= l(:field_status)
| x:
= select_tag 'settings[issue_auto_assign_status]',
options_for_select(rule_status.collect { |column| [column.name, column.id] },
@settings[:issue_auto_assign_status]),
multiple: true, size: 6, style: 'width:150px'
'
= l(:label_role)
| :
= select_tag 'settings[issue_auto_assign_role]',
options_from_collection_for_select(Role.givable.sorted, :id, :name, @settings[:issue_auto_assign_role]),
multiple: false, style: 'width:150px; vertical-align: top'
em.info = t(:rule_issue_auto_assign_info)
br
br
p
= content_tag(:label, l(:label_rule_issue_timelog_required))
= check_box_tag 'settings[issue_timelog_required]', 1, @settings[:issue_timelog_required].to_i == 1
span[style="vertical-align: top; margin-left: 15px;"]
= l(:label_tracker_plural)
| :
= select_tag 'settings[issue_timelog_required_tracker]',
options_for_select(Tracker.all.sorted.collect { |column| [column.name, column.id] },
@settings[:issue_timelog_required_tracker]),
multiple: true, size: 6, style: 'width:150px'
'
= l(:field_status)
| :
= select_tag 'settings[issue_timelog_required_status]',
options_for_select(rule_status.collect { |column| [column.name, column.id] },
@settings[:issue_timelog_required_status]),
multiple: true, size: 6, style: 'width:150px'
em.info
= t(:rule_issue_timelog_required_info_html)

View file

@ -0,0 +1,15 @@
em.info
= l(:hidden_macros_in_toolbar_info)
br
p
= content_tag(:label, l(:label_hidden_macros_in_toolbar))
= hidden_field_tag('settings[hidden_macros_in_toolbar][]', '')
- @available_macros = AdditionalsMacro.all(only_names: true).each do |m|
label.block
- value = @settings[:hidden_macros_in_toolbar].present? ? @settings[:hidden_macros_in_toolbar].include?(m) : false
= check_box_tag('settings[hidden_macros_in_toolbar][]', m, value, id: nil)
= m
br

View file

@ -0,0 +1,44 @@
.info = t(:label_top_menu_help_html)
br
h3 = l(:label_custom_menu_items)
- 5.times do |i|
fieldset
legend
b = "#{l(:label_menu_entry)} ##{i + 1}"
div
p
label = h l(:field_name)
= text_field_tag('settings[custom_menu' + i.to_s + '_name]', @settings['custom_menu' + i.to_s + '_name'], size: 40)
p
label = h l(:field_url)
= text_field_tag('settings[custom_menu' + i.to_s + '_url]', @settings['custom_menu' + i.to_s + '_url'], size: 80)
p
label = h l(:field_title)
= text_field_tag('settings[custom_menu' + i.to_s + '_title]', @settings['custom_menu' + i.to_s + '_title'], size: 80)
i
| (
= l(:label_optional)
| )
p
label = h l(:label_permissions)
- permission_field = 'custom_menu' + i.to_s + '_roles'
- menu_roles = Struct.new(:id, :name)
= select_tag('settings[' + permission_field + ']',
options_from_collection_for_select(Role.sorted.collect { |m| menu_roles.new(m.id, m.name) },
:id,
:name,
@settings[permission_field]),
multiple: true, style: 'height: 100px;')
em.info = l(:menu_roles_info)
br
h3 = l(:label_setting_plural)
p
= content_tag(:label, l(:label_remove_help))
= check_box_tag 'settings[remove_help]', 1, @settings[:remove_help].to_i == 1
em.info = l(:remove_help_info)
p
= content_tag(:label, l(:label_remove_mypage))
= check_box_tag 'settings[remove_mypage]', 1, @settings[:remove_mypage].to_i == 1
em.info = l(:remove_mypage_info)

View file

@ -0,0 +1,29 @@
.info = t(:top_overview_help)
br
h3 = l(:label_content_plural)
p
= content_tag(:label, l(:label_overview_right))
= text_area_tag 'settings[overview_right]', @settings[:overview_right], class: 'wiki-edit', rows: 10
em.info
= l(:overview_right_info)
p
= content_tag(:label, l(:label_overview_top))
= text_area_tag 'settings[overview_top]', @settings[:overview_top], class: 'wiki-edit', rows: 10
em.info
= l(:overview_top_info)
p
= content_tag(:label, l(:label_overview_bottom))
= text_area_tag 'settings[overview_bottom]', @settings[:overview_bottom], class: 'wiki-edit', rows: 10
em.info
= l(:overview_bottom_info)
br
h3 = l(:label_setting_plural)
p
= content_tag(:label, l(:label_remove_news))
= check_box_tag 'settings[remove_news]', 1, @settings[:remove_news].to_i == 1
em.info
= l(:remove_news_info)

View file

@ -0,0 +1,26 @@
.info = t(:top_projects_help)
br
p
= content_tag(:label, l(:label_project_overview_content))
= text_area_tag 'settings[project_overview_content]',
@settings[:project_overview_content],
class: 'wiki-edit', rows: 10
em.info
= l(:project_overview_content_info)
hr
p
= content_tag(:label, l(:label_disabled_modules))
= hidden_field_tag('settings[disabled_modules][]', '')
- Redmine::AccessControl.available_project_modules_all.each do |m|
label.block
- value = @settings[:disabled_modules].present? ? @settings[:disabled_modules].include?(m.to_s) : false
= check_box_tag('settings[disabled_modules][]', m, value, id: nil)
= l_or_humanize(m, prefix: 'project_module_')
br
em.info
= l(:disabled_modules_info)

View file

@ -0,0 +1,10 @@
br
h3 = l(:label_user_plural)
p
= content_tag(:label, l(:label_invisible_captcha))
= check_box_tag 'settings[invisible_captcha]',
1,
@settings[:invisible_captcha].to_i == 1,
disabled: (true unless Setting.self_registration?)
em.info
= t(:invisible_captcha_info_html)

View file

@ -0,0 +1,7 @@
br
h3 = l(:label_web_apis)
p
= content_tag(:label, l(:label_google_maps_embed_api))
= text_field_tag('settings[google_maps_api_key]', @settings[:google_maps_api_key], size: 60)
em.info = t(:google_maps_embed_api_html)
= call_hook(:additionals_settings_web_apis, settings: @settings)

View file

@ -0,0 +1,34 @@
.info = t(:top_wiki_help)
br
h3 = l(:label_content_plural)
p
= content_tag(:label, l(:label_global_wiki_sidebar))
= text_area_tag 'settings[global_wiki_sidebar]', @settings[:global_wiki_sidebar], class: 'wiki-edit', rows: 10
em.info
= l(:global_wiki_sidebar_info)
p
= content_tag(:label, l(:label_global_wiki_header))
= text_area_tag 'settings[global_wiki_header]', @settings[:global_wiki_header], class: 'wiki-edit', rows: 5
em.info
= l(:global_wiki_header_info)
p
= content_tag(:label, l(:label_global_wiki_footer))
= text_area_tag 'settings[global_wiki_footer]', @settings[:global_wiki_footer], class: 'wiki-edit', rows: 5
em.info
= l(:global_wiki_footer_info)
br
h3 = l(:label_pdf_wiki_settings)
p
= content_tag(:label, l(:label_wiki_pdf_remove_title))
= check_box_tag 'settings[wiki_pdf_remove_title]', 1, @settings[:wiki_pdf_remove_title].to_i == 1
em.info
= l(:wiki_pdf_remove_title_info)
p
= content_tag(:label, l(:label_wiki_pdf_remove_attachments))
= check_box_tag 'settings[wiki_pdf_remove_attachments]', 1, @settings[:wiki_pdf_remove_attachments].to_i == 1
em.info
= l(:wiki_pdf_remove_attachments_info)

View file

@ -0,0 +1,11 @@
h2 = l(:label_settings_macros) + " (#{@available_macros.count})"
.info = t(:label_top_macros_help_html)
br
.box
- @available_macros.each do |macro, options|
.macro-box
.macro-title
= macro.to_s
.macro-desc
pre = options[:desc]

View file

@ -0,0 +1,11 @@
table.list
tr
td.name
= "#{l(:label_system_info)}:"
td.name
= system_info
tr
td.name
= "#{l(:label_uptime)}:"
td.name
= system_uptime

View file

@ -0,0 +1 @@
== @tags.collect { |tag| { 'id' => tag.name, 'text' => tag.name } }.to_json

View file

@ -0,0 +1,9 @@
<%= raw @users.map { |user| {
'id' => user.id,
'text' => user.name,
'name' => user.name,
'name_with_icon' => user_with_avatar(user, no_link: true),
'value' => user.id
}
}.to_json
%>

View file

@ -0,0 +1,11 @@
- if Additionals.setting?(:issue_freezed_with_close) && !User.current.allowed_to?(:edit_closed_issues, project)
- if @issues.detect(&:closed?)
ruby:
@safe_attributes = []
@can[:edit] = false
@can[:edit] = false
@allowed_statuses = nil
@trackers = nil
@can[:add_watchers] = nil
@can[:delete] = nil
@options_by_custom_field = []

View file

@ -0,0 +1 @@
= call_hook(:view_users_show_contextual, user: @user)

View file

@ -0,0 +1 @@
= call_hook(:view_users_show_info, user: @user)

View file

@ -0,0 +1,5 @@
- if User.current.logged? && @issue.editable? && Additionals.setting?(:issue_assign_to_me) && \
@issue.assigned_to_id != User.current.id && @project.assignable_users.detect { |u| u.id == User.current.id }
= link_to(font_awesome_icon('far_user-circle', post_text: l(:button_assign_to_me)),
issue_assign_to_me_path(@issue), method: :put,
class: 'assign-to-me')

View file

@ -0,0 +1,21 @@
- if Additionals.setting?(:issue_change_status_in_sidebar) && \
@issue && \
User.current.allowed_to?(:edit_issues, @project) && \
(!@issue.closed? || User.current.allowed_to?(:edit_closed_issues, @project))
- statuses = @issue.sidbar_change_status_allowed_to(User.current)
- if statuses.present?
h3 = l(:label_issue_change_status)
ul.issue-status-change-sidebar
- statuses.each do |s|
- if s != @issue.status
li
- if s.is_closed?
= link_to(font_awesome_icon('fas_caret-square-left', post_text: s.name),
issue_change_status_path(@issue, new_status_id: s.id),
method: :put, class: "status-switch status-#{s.id}")
- else
= link_to(font_awesome_icon('far_caret-square-left', post_text: s.name),
issue_change_status_path(@issue, new_status_id: s.id),
method: :put, class: "status-switch status-#{s.id}")
h3 = l(:label_planning)

View file

@ -0,0 +1,9 @@
- if show_issue_change_author?(issue) && issue.safe_attribute?('author_id')
- author_options = issue_author_options_for_select(issue.project, issue)
- if author_options.present?
p#change_author
= form.label_for_field :author_id
= link_to_function content_tag(:span, l(:button_edit), class: 'icon icon-edit'), '$(this).hide(); $("#issue_author_id").show()'
= form.select :author_id, author_options, { required: true, no_label: true }, style: 'display: none'
javascript:
$('#change_author').insertBefore($('#issue_tracker_id').parent());

View file

@ -0,0 +1,7 @@
- if @project && User.current.allowed_to?(:edit_issue_author, @project)
- author_options = issue_author_options_for_select(@project)
- if author_options.present?
p#change_author
= label_tag('issue[author_id]', l(:field_author))
= select_tag('issue[author_id]',
content_tag('option', l(:label_no_change_option), value: '') + author_options)

View file

@ -0,0 +1,3 @@
- if @issue.new_ticket_message.present?
.nodata.nodata-left
= textilizable(@issue.new_ticket_message).html_safe

View file

@ -0,0 +1,4 @@
- project_overview_content = Additionals.settings[:project_overview_content]
- if project_overview_content.present?
.project-content.wiki.box
= textilizable(project_overview_content)

View file

@ -0,0 +1,3 @@
- if @query.description?
.query-description
= textilizable @query, :description

View file

@ -0,0 +1,17 @@
p
= f.check_box :hide, disabled: @role.users_visibility != 'members_of_visible_projects'
em.info
= t(:info_hidden_roles_html)
javascript:
$(function() {
$('#role_users_visibility').change(function() {
var uv = $("#role_users_visibility").val();
if (uv == 'members_of_visible_projects') {
$("#role_hide").prop('disabled', false);
} else {
$("#role_hide").prop('checked', false);
$("#role_hide").prop('disabled', true);
}
});
});

View file

@ -0,0 +1,4 @@
- if Additionals.setting?(:new_issue_on_profile) && @memberships.present?
- project_url = memberships_new_issue_project_url(user, @memberships)
- if project_url.present?
= link_to(l(:label_issue_new), project_url, class: 'user-new-issue icon icon-add')

View file

@ -0,0 +1,4 @@
- if Additionals.setting?(:issue_autowatch_involved) && User.current.allowed_to?(:view_issues, nil, global: true)
= labelled_fields_for :pref, @user.pref do |pref_fields|
p
= pref_fields.check_box :autowatch_involved_issue

View file

@ -0,0 +1,5 @@
- overview_bottom = Additionals.settings[:overview_bottom]
- if overview_bottom.present?
.clear-both
.overview-bottom.wiki.box
= textilizable(overview_bottom)

View file

@ -0,0 +1,5 @@
- unless Additionals.setting?(:remove_news)
.news.box
h3 = l(:label_news_latest)
= render partial: 'news/news', collection: @news
= link_to l(:label_news_view_all), news_index_path

View file

@ -0,0 +1,4 @@
- overview_right = Additionals.settings[:overview_right]
- if overview_right.present?
.overview-right.wiki.box
= textilizable(overview_right)

View file

@ -0,0 +1,4 @@
- overview_top = Additionals.settings[:overview_top]
- if overview_top.present?
.overview-top.wiki.box
= textilizable(overview_top)

View file

@ -0,0 +1,17 @@
.month-calendar id="month-calendar-#{id}"
javascript:
$("#month-calendar-#{id}").datepicker({
language: "#{locale}",
calendarWeeks: #{options[:show_weeks]},
todayHighlight: true,
multidate: true,
disableTouchKeyboard: true,
defaultViewDate: {
year: #{options[:year]},
month: #{options[:month]},
day: 1
}
});
- unless selected.empty?
javascript:
$('#month-calendar-#{id}').datepicker('setDates', #{selected});

View file

@ -0,0 +1,16 @@
.cryptocompare
javascript:
var scripts = document.getElementsByTagName("script");
var embedder = scripts[scripts.length - 1];
(function() {
var appName = encodeURIComponent(window.location.hostname);
if (appName == "") {
appName = "local";
}
var s = document.createElement("script");
s.type = "text/javascript";
s.async = true;
var theUrl = "#{raw url}";
s.src = theUrl + (theUrl.indexOf("?") >= 0 ? "&" : "?") + "app=" + appName;
embedder.parentNode.appendChild(s);
})();

View file

@ -0,0 +1,5 @@
- sidebar = Additionals.settings[:global_sidebar]
- if sidebar.present?
.sidebar-additionals
= textilizable(sidebar)
br

View file

@ -0,0 +1,15 @@
.additionals-projects.box
- if list_title
h3 = list_title
ul
- @projects.each do |project|
li.project class="#{cycle('odd', 'even')}"
span[style='font-weight: bold;']
= link_to_project(project)
- if project.homepage?
' :
= link_to(project.homepage, project.homepage, @html_options)
- if with_create_issue && User.current.allowed_to?(:add_issues, project)
= link_to('',
new_project_issue_path(project_id: project),
class: 'icon icon-add', title: l(:label_issue_new))

View file

@ -0,0 +1,4 @@
- content_for :header_tags do
= stylesheet_link_tag 'bootstrap-datepicker3.standalone.min', plugin: 'additionals'
= javascript_include_tag('bootstrap-datepicker.min', plugin: 'additionals')
= bootstrap_datepicker_locale

View file

@ -0,0 +1,6 @@
/! TradingView Widget BEGIN
= javascript_include_tag 'https://s3.tradingview.com/tv.js'
div[style="display: inline-block;"]
javascript:
new TradingView.widget(#{raw options.to_json});
/! TradingView Widget END

View file

@ -0,0 +1,23 @@
.users.box
- if list_title
h3 = list_title
- users.each do |user|
.user.box class="#{cycle('odd', 'even')}"
div[style="float: left; display: block; margin-right: 5px;"]
= avatar(user, size: 50)
.user.line[style="font-weight: bold;"]
= link_to_user(user)
- if !user_roles.nil? && user_roles[user.id]
.user.line
= l(:field_role)
' :
= user_roles[user.id].join(', ').html_safe
.user.line
= l(:field_login)
' :
= link_to user.login, '/users/' + user.id.to_s
- unless user.pref.hide_mail
.user.line
= l(:field_mail)
' :
= mail_to(user.mail, nil, encode: 'javascript')