Actualizar plugin Additionals a 3.0.0
This commit is contained in:
parent
3d976f1b3b
commit
a26f5567af
399 changed files with 70374 additions and 4093 deletions
|
@ -1,2 +1,2 @@
|
|||
- if Additionals.setting?(:invisible_captcha)
|
||||
= invisible_captcha
|
||||
= f.invisible_captcha :url, autocomplete: 'off'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- login_text = Additionals.settings[:account_login_bottom]
|
||||
- login_text = Additionals.setting :account_login_bottom
|
||||
- if login_text.present?
|
||||
br
|
||||
.login-additionals
|
||||
= textilizable(login_text)
|
||||
= textilizable login_text
|
||||
|
|
|
@ -1,9 +1,17 @@
|
|||
- footer = Additionals.settings[:global_footer]
|
||||
- footer = Additionals.setting(: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>");
|
||||
$('a.help').parent().append("<ul class=\"menu-children\">#{escape_javascript @additionals_help_items}</ul>");
|
||||
});
|
||||
|
||||
- if Additionals.setting?(:open_external_urls)
|
||||
javascript:
|
||||
$(function() {
|
||||
$('a.external').attr({ 'target': '_blank',
|
||||
'rel': 'noopener noreferrer'});
|
||||
});
|
||||
|
|
0
plugins/additionals/app/views/additionals/_global_body_header.slim → plugins/additionals/app/views/additionals/_body_top.slim
Executable file → Normal file
0
plugins/additionals/app/views/additionals/_global_body_header.slim → plugins/additionals/app/views/additionals/_body_top.slim
Executable file → Normal file
|
@ -0,0 +1,18 @@
|
|||
table.list.issue-report.table-of-values
|
||||
= title_with_fontawesome l(:label_table_of_values), 'far fa-list-alt', 'caption'
|
||||
thead
|
||||
tr
|
||||
th = @chart[:label]
|
||||
th = l :label_total
|
||||
tbody
|
||||
- options = { set_filter: 1 }
|
||||
- @chart[:filters].each do |line|
|
||||
- if line[:filter]
|
||||
- options.merge! line[:filter]
|
||||
tr class="#{cycle 'odd', 'even'}"
|
||||
td.name class="#{line[:id].to_s == '0' ? 'summary' : ''}"
|
||||
- if line[:filter].nil?
|
||||
= line[:name]
|
||||
- else
|
||||
= link_to line[:name], send(@chart[:value_link_method], @project, options)
|
||||
td = line[:count]
|
|
@ -1,5 +0,0 @@
|
|||
- 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)
|
|
@ -2,25 +2,34 @@ 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)
|
||||
= query_as_hidden_field_tags @query
|
||||
- if defined?(selected_columns_only) && selected_columns_only
|
||||
= hidden_field_tag 'c[]', ''
|
||||
= l(:description_selected_columns)
|
||||
- else
|
||||
p
|
||||
label
|
||||
= radio_button_tag 'c[]', '', true
|
||||
= l(:description_selected_columns)
|
||||
br
|
||||
label
|
||||
= radio_button_tag 'c[]', 'all_inline'
|
||||
= l(:description_all_columns)
|
||||
|
||||
hr
|
||||
|
||||
- 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
|
||||
- if defined?(with_last_notes) && with_last_notes
|
||||
label
|
||||
= check_box_tag 'c[]', 'last_notes', @query.has_column?(:last_notes)
|
||||
= l(:label_last_notes)
|
||||
|
||||
= export_csv_encoding_select_tag
|
||||
|
||||
p.buttons
|
||||
= submit_tag l(:button_export), name: nil, onclick: 'hideModal(this);'
|
||||
'
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
- sidebar = Additionals.settings[:global_sidebar]
|
||||
- if sidebar.present?
|
||||
br
|
||||
.sidebar-additionals
|
||||
= textilizable(sidebar)
|
|
@ -4,4 +4,8 @@
|
|||
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))
|
||||
= text_field_tag(:search,
|
||||
q,
|
||||
autocomplete: 'off',
|
||||
class: 'live-search-field',
|
||||
placeholder: l(:label_query_name_search))
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
- 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)
|
||||
= additionals_library_load :font_awesome
|
||||
= stylesheet_link_tag 'additionals', plugin: 'additionals'
|
||||
- if User.current.try(:hrm_user_type_id).nil?
|
||||
= javascript_include_tag 'additionals', plugin: 'additionals'
|
||||
- unless Redmine::Plugin.installed? 'redmine_hrm'
|
||||
- render_custom_top_menu_item
|
||||
|
|
|
@ -1,31 +1,28 @@
|
|||
- options = {} if options.nil?
|
||||
javascript:
|
||||
$("##{field_id}").select2({
|
||||
ajax: {
|
||||
url: "#{ajax_url}",
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
data: function(params) {
|
||||
return {
|
||||
q: params.term
|
||||
};
|
||||
$(function() {
|
||||
$("#{defined?(field_id) ? ('#' + field_id) : ('.' + field_class)}").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
|
||||
},
|
||||
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;
|
||||
};
|
||||
placeholder: "#{options[:placeholder].presence}",
|
||||
allowClear: #{options[:allow_clear].present? && options[:allow_clear] ? 'true' : 'false'},
|
||||
minimumInputLength: 0,
|
||||
width: "#{options[:width].presence || '60%'}",
|
||||
templateResult: #{options[:template_result].presence || 'formatNameWithIcon'},
|
||||
#{options[:template_selection].present? ? ('templateSelection: ' + options[:template_selection]) : nil}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -2,15 +2,11 @@ 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]")
|
||||
.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
|
||||
- if columns.count.positive?
|
||||
fieldset.box
|
||||
legend = l(:additionals_query_list_default_totals)
|
||||
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
' :
|
||||
- if defined?(editable) && editable
|
||||
#tags-data
|
||||
= additionals_tag_links(entry.tags, tags_without_color: defined?(tags_without_color) ? tags_without_color : false)
|
||||
= additionals_tag_links(entry.tags,
|
||||
project: @project,
|
||||
tags_without_color: defined?(tags_without_color) ? tags_without_color : false)
|
||||
'
|
||||
span.contextual
|
||||
= link_to l(:label_edit_tags),
|
||||
|
@ -15,7 +17,7 @@
|
|||
id: 'edit_tags_link'
|
||||
|
||||
#edit_tags_form style="display: none;"
|
||||
= form_tag(update_url, method: :put, multipart: true ) do
|
||||
= form_tag(update_url, method: :put, multipart: true) do
|
||||
= render partial: 'tags_form'
|
||||
'
|
||||
= submit_tag l(:button_save), class: 'button-small'
|
||||
|
@ -23,4 +25,6 @@
|
|||
= 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)
|
||||
= additionals_tag_links(entry.tags,
|
||||
project: @project,
|
||||
tags_without_color: defined?(tags_without_color) ? tags_without_color : false)
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
.additionals-chart-wrapper
|
||||
.additionals-chart-left
|
||||
canvas id="#{@chart[:id]}" style="width: #{@chart[:width]}px; height: #{@chart[:height]}px;"
|
||||
.additionals-table-of-values
|
||||
= render partial: 'additionals/chart_table_values'
|
||||
|
||||
.clear-both
|
||||
|
||||
javascript:
|
||||
const pie_chart_#{{@chart[:id]}} = new Chart(document.getElementById("#{@chart[:id]}"), {
|
||||
type: 'pie',
|
||||
data: {
|
||||
label_ids: #{raw json_escape(@chart[:label_ids])},
|
||||
labels: #{raw json_escape(@chart[:labels])},
|
||||
datasets: #{raw json_escape(@chart[:datasets])}
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
onClick: function(c, i) {
|
||||
e = i[0];
|
||||
if (e !== undefined && #{{@chart[:filter_path].present? ? 1 : 0}} == 1 ) {
|
||||
var activePoints = pie_chart_#{{@chart[:id]}}.getElementAtEvent(c);
|
||||
var label_id = this.data.label_ids[activePoints[0]._index];
|
||||
window.open("#{{@chart[:filter_path]}}" + label_id);
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
colorschemes: {
|
||||
scheme: "#{@chart[:color_schema]}",
|
||||
fillAlpha: 0.8,
|
||||
},
|
||||
datalabels: {
|
||||
formatter: (value, ctx) => {
|
||||
let sum = 0;
|
||||
let dataArr = ctx.chart.data.datasets[0].data;
|
||||
dataArr.map(data => {
|
||||
sum += data;
|
||||
});
|
||||
let percentage = (value*100 / sum).toFixed(0)+"%";
|
||||
return percentage;
|
||||
},
|
||||
color: '#000',
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
|
@ -1,4 +1,3 @@
|
|||
- @settings = ActionController::Parameters.new(@settings) unless Rails.version >= '5.2'
|
||||
' Need Help? :
|
||||
= link_to(l(:label_additionals_doc),
|
||||
'https://additionals.readthedocs.io/en/latest/',
|
||||
|
|
|
@ -1,39 +1,47 @@
|
|||
br
|
||||
h3 = l(:label_content_plural)
|
||||
fieldset.settings
|
||||
legend = 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)
|
||||
p
|
||||
= additionals_settings_textarea :account_login_bottom
|
||||
em.info
|
||||
= l(:account_login_info)
|
||||
p
|
||||
= additionals_settings_textarea :global_sidebar
|
||||
em.info
|
||||
= l(:global_sidebar_info)
|
||||
p
|
||||
= additionals_settings_textarea :global_footer
|
||||
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)
|
||||
fieldset.settings
|
||||
legend = l(:label_settings)
|
||||
|
||||
p
|
||||
= additionals_settings_checkbox :open_external_urls
|
||||
em.info
|
||||
= t(:open_external_urls_info)
|
||||
p
|
||||
= additionals_settings_checkbox :add_go_to_top
|
||||
em.info
|
||||
= t(:add_go_to_top_info)
|
||||
p
|
||||
= additionals_settings_checkbox :legacy_smiley_support
|
||||
em.info
|
||||
= t(:legacy_smiley_support_info_html)
|
||||
|
||||
fieldset.settings
|
||||
legend = l(:label_disabled_modules)
|
||||
|
||||
p
|
||||
= tag.label l(:label_disabled_modules)
|
||||
= hidden_field_tag('settings[disabled_modules][]', '')
|
||||
- Redmine::AccessControl.available_project_modules_all.sort.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)
|
||||
|
|
|
@ -1,44 +1,29 @@
|
|||
em.info = t(:top_rules_help)
|
||||
|
||||
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
|
||||
= additionals_settings_textarea :new_ticket_message
|
||||
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
|
||||
= additionals_settings_checkbox :new_issue_on_profile
|
||||
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
|
||||
= additionals_settings_checkbox :issue_assign_to_me
|
||||
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
|
||||
= additionals_settings_checkbox :issue_change_status_in_sidebar
|
||||
p
|
||||
= content_tag(:label, l(:label_issue_autowatch_involved))
|
||||
= check_box_tag 'settings[issue_autowatch_involved]', 1, @settings[:issue_autowatch_involved].to_i == 1
|
||||
= additionals_settings_checkbox :issue_autowatch_involved
|
||||
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
|
||||
= additionals_settings_checkbox :issue_freezed_with_close
|
||||
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
|
||||
= additionals_settings_checkbox :issue_status_change
|
||||
span[style="vertical-align: top; margin-left: 15px;"]
|
||||
= l(:field_status)
|
||||
| x:
|
||||
|
@ -58,8 +43,7 @@ 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
|
||||
= additionals_settings_checkbox :issue_current_user_status
|
||||
span[style="vertical-align: top; margin-left: 15px;"]
|
||||
= l(:field_status)
|
||||
| x:
|
||||
|
@ -72,8 +56,7 @@ 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
|
||||
= additionals_settings_checkbox :issue_auto_assign
|
||||
span[style="vertical-align: top; margin-left: 15px;"]
|
||||
= l(:field_status)
|
||||
| x:
|
||||
|
@ -92,8 +75,7 @@ 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
|
||||
= additionals_settings_checkbox :issue_timelog_required
|
||||
span[style="vertical-align: top; margin-left: 15px;"]
|
||||
= l(:label_tracker_plural)
|
||||
| :
|
||||
|
|
|
@ -4,7 +4,7 @@ em.info
|
|||
br
|
||||
|
||||
p
|
||||
= content_tag(:label, l(:label_hidden_macros_in_toolbar))
|
||||
= 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
|
||||
|
|
|
@ -1,30 +1,27 @@
|
|||
.info = t(:label_top_menu_help_html)
|
||||
.info = t :label_top_menu_help_html
|
||||
br
|
||||
h3 = l(:label_custom_menu_items)
|
||||
h3 = l :label_custom_menu_items
|
||||
|
||||
- 5.times do |i|
|
||||
fieldset
|
||||
legend
|
||||
b = "#{l(:label_menu_entry)} ##{i + 1}"
|
||||
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)
|
||||
= additionals_settings_textfield "custom_menu#{i}_name".to_sym, label: l(:field_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)
|
||||
= additionals_settings_textfield "custom_menu#{i}_url".to_sym, label: l(:field_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)
|
||||
= additionals_settings_textfield "custom_menu#{i}_title".to_sym, label: l(:field_title), size: 80
|
||||
i
|
||||
| (
|
||||
= l(:label_optional)
|
||||
= l :label_optional
|
||||
| )
|
||||
p
|
||||
label = h l(:label_permissions)
|
||||
- permission_field = 'custom_menu' + i.to_s + '_roles'
|
||||
- permission_field = "custom_menu#{i}_roles"
|
||||
- menu_roles = Struct.new(:id, :name)
|
||||
= select_tag('settings[' + permission_field + ']',
|
||||
= select_tag("settings[#{permission_field}]",
|
||||
options_from_collection_for_select(Role.sorted.collect { |m| menu_roles.new(m.id, m.name) },
|
||||
:id,
|
||||
:name,
|
||||
|
@ -33,12 +30,12 @@ h3 = l(:label_custom_menu_items)
|
|||
em.info = l(:menu_roles_info)
|
||||
|
||||
br
|
||||
h3 = l(:label_setting_plural)
|
||||
|
||||
h3 = l :label_settings
|
||||
|
||||
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)
|
||||
= additionals_settings_checkbox :remove_help
|
||||
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)
|
||||
= additionals_settings_checkbox :remove_mypage
|
||||
em.info = l :remove_mypage_info
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
.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)
|
|
@ -1,26 +0,0 @@
|
|||
.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)
|
|
@ -1,10 +1,5 @@
|
|||
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?)
|
||||
= additionals_settings_checkbox :invisible_captcha,
|
||||
disabled: (true unless Setting.self_registration?)
|
||||
em.info
|
||||
= t(:invisible_captcha_info_html)
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
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)
|
||||
= additionals_settings_textfield :google_maps_api_key, size: 60
|
||||
em.info = t(:google_maps_embed_api_html)
|
||||
= call_hook(:additionals_settings_web_apis, settings: @settings)
|
||||
|
||||
= call_hook :additionals_settings_web_apis, settings: @settings
|
||||
|
|
|
@ -1,34 +1,23 @@
|
|||
.info = t(:top_wiki_help)
|
||||
em.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)
|
||||
fieldset.settings
|
||||
legend = l(:label_content_plural)
|
||||
|
||||
br
|
||||
h3 = l(:label_pdf_wiki_settings)
|
||||
p
|
||||
= additionals_settings_textarea :global_wiki_sidebar
|
||||
em.info
|
||||
= l(:global_wiki_sidebar_info)
|
||||
|
||||
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)
|
||||
fieldset.settings
|
||||
legend = l(:label_pdf_wiki_settings)
|
||||
|
||||
p
|
||||
= additionals_settings_checkbox :wiki_pdf_remove_title
|
||||
em.info
|
||||
= l(:wiki_pdf_remove_title_info)
|
||||
p
|
||||
= additionals_settings_checkbox :wiki_pdf_remove_attachments
|
||||
em.info
|
||||
= l(:wiki_pdf_remove_attachments_info)
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
table.list
|
||||
tr
|
||||
td.name
|
||||
= "#{l(:label_system_info)}:"
|
||||
= l :label_system_info
|
||||
| :
|
||||
td.name
|
||||
= system_info
|
||||
tr
|
||||
td.name
|
||||
= "#{l(:label_uptime)}:"
|
||||
= l :label_uptime
|
||||
| :
|
||||
td.name
|
||||
= system_uptime
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<%= raw @assignee.map { |principal| {
|
||||
'id' => principal.id,
|
||||
'text' => principal.name,
|
||||
'value' => principal.id
|
||||
}
|
||||
}.to_json
|
||||
%>
|
43
plugins/additionals/app/views/common/_dashboard.html.slim
Normal file
43
plugins/additionals/app/views/common/_dashboard.html.slim
Normal file
|
@ -0,0 +1,43 @@
|
|||
= call_hook :view_dashboard_top, dashboard: dashboard, project: @project
|
||||
|
||||
#my-page.splitcontent class="#{dashboard_css_classes(dashboard)}"
|
||||
- dashboard.available_groups.each do |group|
|
||||
.block-receiver id="list-#{group}" class="splitcontent#{group}"
|
||||
= render_dashboard_blocks dashboard.layout[group], dashboard
|
||||
|
||||
= call_hook :view_dashboard_bottom, dashboard: dashboard, project: @project
|
||||
|
||||
= context_menu
|
||||
|
||||
/ required for drap & drop work
|
||||
/ (this should always set, because to support new entries)
|
||||
- include_calendar_headers_tags
|
||||
|
||||
- if dashboard.content.with_chartjs?
|
||||
- content_for :header_tags do
|
||||
= additionals_library_load %i[chartjs chartjs_colorschemes chartjs_datalabels]
|
||||
|
||||
javascript:
|
||||
$(function() {
|
||||
$('#block-select').val('');
|
||||
$('.block-receiver').sortable({
|
||||
connectWith: '.block-receiver',
|
||||
tolerance: 'pointer',
|
||||
handle: '.sort-handle',
|
||||
start: function(event, ui){$(this).parent().addClass('dragging');},
|
||||
stop: function(event, ui){$(this).parent().removeClass('dragging');},
|
||||
update: function(event, ui){
|
||||
// trigger the call on the list that receives the block only
|
||||
if ($(this).find(ui.item).length > 0) {
|
||||
$.ajax({
|
||||
url: "#{escape_javascript _order_blocks_dashboard_path(@project, dashboard)}",
|
||||
type: 'post',
|
||||
data: {
|
||||
'group': $(this).attr('id').replace(/^list-/, ''),
|
||||
'blocks': $.map($(this).children(), function(el){return $(el).attr('id').replace(/^block-/, '');})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
|
@ -1,11 +1,13 @@
|
|||
- 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 = []
|
||||
ruby:
|
||||
if Additionals.setting?(:issue_freezed_with_close) &&
|
||||
!User.current.allowed_to?(:edit_closed_issues, project) &&
|
||||
@issues.detect(&:closed?)
|
||||
@safe_attributes = []
|
||||
@can[:edit] = false
|
||||
@can[:edit] = false
|
||||
@allowed_statuses = nil
|
||||
@trackers = nil
|
||||
@can[:add_watchers] = nil
|
||||
@can[:delete] = nil
|
||||
@options_by_custom_field = []
|
||||
end
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
- if custom_fields_with_full_with_layout.include? @custom_field.class.name
|
||||
p
|
||||
= f.check_box :full_width_layout
|
|
@ -0,0 +1 @@
|
|||
$("#block-<%= block %>").replaceWith("<%= escape_javascript render_dashboard_block(block.to_s, dashboard, sort_options) %>");
|
90
plugins/additionals/app/views/dashboards/_form.html.slim
Normal file
90
plugins/additionals/app/views/dashboards/_form.html.slim
Normal file
|
@ -0,0 +1,90 @@
|
|||
= error_messages_for 'dashboard'
|
||||
|
||||
.box.tabular.attributes
|
||||
p
|
||||
= f.text_field :name, size: 255, required: true
|
||||
|
||||
p
|
||||
= f.text_area :description, rows: addtionals_textarea_cols(@dashboard.description, min: 4), class: 'wiki-edit'
|
||||
|
||||
.splitcontent
|
||||
.splitcontentleft
|
||||
|
||||
- if @dashboard.new_record?
|
||||
= hidden_field_tag 'dashboard[dashboard_type]', @dashboard.dashboard_type
|
||||
|
||||
- if @project && @allowed_projects.present? && @allowed_projects.count > 1
|
||||
p
|
||||
= f.select :project_id,
|
||||
project_tree_options_for_select(@allowed_projects,
|
||||
selected: @dashboard.project,
|
||||
include_blank: true),
|
||||
{},
|
||||
disabled: !@dashboard.project_id_can_change?
|
||||
em.info
|
||||
= l(:info_dashboard_project_select)
|
||||
- else
|
||||
= hidden_field_tag 'dashboard[project_id]', @project&.id
|
||||
|
||||
- if User.current.allowed_to?(:share_dashboards, @project, global: true) || \
|
||||
User.current.allowed_to?(:set_system_dashboards, @project, global: true)
|
||||
|
||||
p
|
||||
label = l(:field_visible)
|
||||
label.block
|
||||
= radio_button 'dashboard', 'visibility', Dashboard::VISIBILITY_PRIVATE
|
||||
'
|
||||
= l(:label_visibility_private)
|
||||
label.block
|
||||
= radio_button 'dashboard', 'visibility', Dashboard::VISIBILITY_PUBLIC
|
||||
'
|
||||
= l(:label_visibility_public)
|
||||
label.block
|
||||
= radio_button 'dashboard', 'visibility', Dashboard::VISIBILITY_ROLES
|
||||
'
|
||||
= l(:label_visibility_roles)
|
||||
' :
|
||||
- Role.givable.sorted.each do |role|
|
||||
label.block.role-visibility
|
||||
= check_box_tag 'dashboard[role_ids][]', role.id, @dashboard.role_ids.include?(role.id), id: nil
|
||||
'
|
||||
= role.name
|
||||
= hidden_field_tag 'dashboard[role_ids][]', ''
|
||||
|
||||
.splitcontentright
|
||||
p
|
||||
= f.check_box :enable_sidebar
|
||||
|
||||
- if User.current.allowed_to? :set_system_dashboards, @project, global: true
|
||||
p = f.check_box :system_default, disabled: !@dashboard.destroyable?
|
||||
p#always-expose = f.check_box :always_expose
|
||||
- elsif @dashboard.system_default?
|
||||
p = f.check_box :system_default, disabled: true
|
||||
p = f.check_box :always_expose
|
||||
|
||||
- if @dashboard.persisted?
|
||||
p.object-select
|
||||
= f.select :author_id,
|
||||
author_options_for_select(@project, @dashboard, :save_dashboards),
|
||||
required: true
|
||||
|
||||
= call_hook :view_dashboard_form_details_bottom, dashboard: @dashboard, form: f
|
||||
|
||||
javascript:
|
||||
$(function() {
|
||||
$("input[name='dashboard[visibility]']").change(function(){
|
||||
var roles_checked = $('#dashboard_visibility_1').is(':checked');
|
||||
var private_checked = $('#dashboard_visibility_0').is(':checked');
|
||||
$("input[name='dashboard[role_ids][]'][type=checkbox]").attr('disabled', !roles_checked);
|
||||
}).trigger('change');
|
||||
|
||||
$("input[name='dashboard[system_default]']").change(function(){
|
||||
var selection = $('#dashboard_system_default').is(':checked');
|
||||
if (selection) {
|
||||
$('#always-expose').show();
|
||||
}
|
||||
else {
|
||||
$('#always-expose').hide();
|
||||
}
|
||||
}).trigger('change');
|
||||
});
|
|
@ -0,0 +1,3 @@
|
|||
$("#block-<%= escape_javascript @block %>").remove();
|
||||
$("#list-top").prepend("<%= escape_javascript render_dashboard_blocks([@block], @dashboard) %>");
|
||||
$("#block-select").replaceWith("<%= escape_javascript dashboard_block_select_tag(@dashboard) %>");
|
|
@ -0,0 +1,4 @@
|
|||
p#errorExplanation
|
||||
' An error occurred while executing dashboard block
|
||||
= tag.i @block
|
||||
' and has been logged. Please report this error to your Redmine administrator.
|
|
@ -0,0 +1,11 @@
|
|||
- cache render_async_cache_key(_dashboard_async_blocks_path(@project,
|
||||
dashboard.async_params(block, async, settings))),
|
||||
expires_in: async[:cache_expires_in] || DashboardContent::RENDER_ASYNC_CACHE_EXPIRES_IN,
|
||||
skip_digest: true do
|
||||
|
||||
- events_by_day = activity_dashboard_data settings, dashboard
|
||||
- title = Additionals.true?(settings[:me_only]) ? l(:label_my_activity) : l(:label_activity)
|
||||
h3 = link_to title, activity_path(user_id: User.current,
|
||||
from: events_by_day.keys.first)
|
||||
|
||||
= render partial: 'activities/activities', locals: { events_by_day: events_by_day }
|
|
@ -0,0 +1,21 @@
|
|||
- max_entries = settings[:max_entries].presence || DashboardContent::DEFAULT_MAX_ENTRIES
|
||||
div id="#{block}-settings" style="#{'display: none;' if hide}"
|
||||
= form_tag(_update_layout_setting_dashboard_path(@project, @dashboard), remote: true) do
|
||||
= hidden_field_tag "settings[#{block}][me_only]", '0'
|
||||
.box
|
||||
p
|
||||
label
|
||||
= l(:label_max_entries)
|
||||
' :
|
||||
= number_field_tag "settings[#{block}][max_entries]", max_entries, min: 1, max: 1000, required: true
|
||||
|
||||
p
|
||||
label
|
||||
= l(:label_only_my_activities)
|
||||
' :
|
||||
= check_box_tag "settings[#{block}][me_only]", '1', Additionals.true?(settings[:me_only])
|
||||
|
||||
p
|
||||
= submit_tag l(:button_save)
|
||||
'
|
||||
= link_to_function l(:button_cancel), "$('##{block}-settings').toggle();"
|
|
@ -0,0 +1,31 @@
|
|||
- with_async = dashboard_async_required_settings? settings, async
|
||||
|
||||
- unless with_async
|
||||
h3 = settings[:title].presence || block_definition[:label]
|
||||
|
||||
- if @can_edit && \
|
||||
block_definition[:no_settings].blank? && \
|
||||
(!block_definition.key?(:with_settings_if) || block_definition[:with_settings_if].call(@project))
|
||||
= render partial: block_definition[:settings_partial].presence || "#{async[:partial]}_settings",
|
||||
locals: build_dashboard_partial_locals(block,
|
||||
block_definition,
|
||||
settings,
|
||||
dashboard).merge({ hide: with_async })
|
||||
|
||||
- if with_async
|
||||
= render_async_cache _dashboard_async_blocks_path(@project,
|
||||
dashboard.async_params(block, async, settings)) do
|
||||
.clear-both
|
||||
p
|
||||
i.fas.fa-sync.fa-spin
|
||||
'
|
||||
= l(:label_loading)
|
||||
|
||||
= content_for :render_async
|
||||
|
||||
javascript:
|
||||
$(function() {
|
||||
$('#ajax-indicator').hide();
|
||||
})
|
||||
- else
|
||||
p.nodata = l :label_no_data
|
|
@ -0,0 +1,27 @@
|
|||
h3.icon.icon-document = l :label_document_plural
|
||||
|
||||
- if @can_edit
|
||||
div id="#{block}-settings" style='display: none;'
|
||||
= form_tag(_update_layout_setting_dashboard_path(@project, @dashboard), remote: true) do
|
||||
.box
|
||||
p
|
||||
label
|
||||
= l(:label_max_entries)
|
||||
' :
|
||||
= number_field_tag "settings[#{block}][max_entries]", max_entries, min: 1, max: 1000, required: true
|
||||
p
|
||||
= submit_tag l(:button_save)
|
||||
'
|
||||
= link_to_function l(:button_cancel), "$('##{block}-settings').toggle();"
|
||||
|
||||
- if documents.any?
|
||||
= render partial: 'documents/document', collection: documents
|
||||
p
|
||||
- if @project
|
||||
= link_to l(:label_document_view_all), project_documents_path(@project)
|
||||
/- else
|
||||
/ no route available
|
||||
/= link_to l(:label_news_view_all), documents_path
|
||||
|
||||
- else
|
||||
p.nodata = l :label_no_data
|
|
@ -0,0 +1,23 @@
|
|||
- cache render_async_cache_key(_dashboard_async_blocks_path(@project,
|
||||
dashboard.async_params(block, async, settings))),
|
||||
expires_in: async[:cache_expires_in],
|
||||
skip_digest: true do
|
||||
|
||||
- feed = dashboard_feed_catcher settings[:url], settings[:max_entries]
|
||||
h3
|
||||
= dashboard_feed_title settings[:title], block_definition
|
||||
|
||||
- if feed[:valid]
|
||||
- if feed[:items].count.positive?
|
||||
ul.reporting-list.feed
|
||||
- feed[:items].each do |item|
|
||||
li
|
||||
= link_to item[:title],
|
||||
item[:link],
|
||||
class: 'external', rel: 'noopener noreferrer', target: '_blank'
|
||||
- else
|
||||
p.nodata = l :label_no_data
|
||||
- elsif settings[:url].blank?
|
||||
p.nodata = l :label_no_data
|
||||
- else
|
||||
p.nodata = l(:label_invalid_feed_data)
|
|
@ -0,0 +1,25 @@
|
|||
- max_entries = settings[:max_entries].presence || DashboardContent::DEFAULT_MAX_ENTRIES
|
||||
|
||||
div id="#{block}-settings" style="#{'display: none;' if hide}"
|
||||
= form_tag(_update_layout_setting_dashboard_path(@project, @dashboard), remote: true) do
|
||||
.box
|
||||
p
|
||||
label
|
||||
= l :field_title
|
||||
' :
|
||||
= text_field_tag "settings[#{block}][title]", dashboard_feed_title(settings[:title], block_definition)
|
||||
p
|
||||
label
|
||||
= l :field_url
|
||||
' :
|
||||
= url_field_tag "settings[#{block}][url]", settings[:url], required: true
|
||||
p
|
||||
label
|
||||
= l(:label_max_entries)
|
||||
' :
|
||||
= number_field_tag "settings[#{block}][max_entries]", max_entries, min: 1, max: 100, required: true
|
||||
|
||||
p
|
||||
= submit_tag l(:button_save)
|
||||
'
|
||||
= link_to_function l(:button_cancel), "$('##{block}-settings').toggle();"
|
|
@ -0,0 +1,35 @@
|
|||
h3 = block_definition[:label]
|
||||
|
||||
- if @can_edit
|
||||
div id="#{block}-settings" style='display: none;'
|
||||
= form_tag(_update_layout_setting_dashboard_path(@project, @dashboard), remote: true) do
|
||||
.box
|
||||
p
|
||||
label
|
||||
= l :button_show
|
||||
' :
|
||||
= number_field_tag "settings[#{block}][days]", days, min: 1, max: 1000, required: true
|
||||
'
|
||||
= l :label_day_plural
|
||||
p
|
||||
= submit_tag l(:button_save)
|
||||
'
|
||||
= link_to_function l(:button_cancel), "$('#my_spent_time-settings').toggle();"
|
||||
|
||||
ul.reporting-list
|
||||
li.today
|
||||
= l :label_today
|
||||
' :
|
||||
= l_hours_short entries_today.sum(&:hours)
|
||||
|
||||
li.days
|
||||
= l :label_last_n_days, days
|
||||
' :
|
||||
= l_hours_short entries_days.sum(&:hours)
|
||||
|
||||
= link_to l(:label_spent_time), _time_entries_path(@project, nil, user_id: 'me')
|
||||
'
|
||||
= link_to l(:button_log_time),
|
||||
_new_time_entry_path(@project, nil),
|
||||
class: 'icon-only icon-add',
|
||||
title: l(:button_log_time)
|
|
@ -0,0 +1,25 @@
|
|||
h3.icon.icon-news = l :label_news_latest
|
||||
|
||||
- if @can_edit
|
||||
div id="#{block}-settings" style='display: none;'
|
||||
= form_tag(_update_layout_setting_dashboard_path(@project, @dashboard), remote: true) do
|
||||
.box
|
||||
p
|
||||
label
|
||||
= l(:label_max_entries)
|
||||
' :
|
||||
= number_field_tag "settings[#{block}][max_entries]", max_entries, min: 1, max: 1000, required: true
|
||||
p
|
||||
= submit_tag l(:button_save)
|
||||
'
|
||||
= link_to_function l(:button_cancel), "$('##{block}-settings').toggle();"
|
||||
|
||||
- if news.any?
|
||||
= render partial: 'news/news', collection: news
|
||||
p
|
||||
- if @project
|
||||
= link_to l(:label_news_view_all), project_news_index_path(@project)
|
||||
- else
|
||||
= link_to l(:label_news_view_all), news_index_path
|
||||
- else
|
||||
p.nodata = l :label_no_data
|
|
@ -0,0 +1,21 @@
|
|||
h3 = block_definition[:label]
|
||||
|
||||
- if @project.description.present?
|
||||
.wiki.project-description
|
||||
= textilizable @project.description
|
||||
- if @project.homepage.present? || @project.visible_custom_field_values.any? { |o| o.value.present? }
|
||||
ul.reporting-list
|
||||
- if @project.homepage.present?
|
||||
li
|
||||
span.label
|
||||
= l :field_homepage
|
||||
' :
|
||||
= link_to_if uri_with_safe_scheme?(@project.homepage), @project.homepage, @project.homepage, class: 'external'
|
||||
- render_custom_field_values(@project) do |custom_field, formatted|
|
||||
li class="#{custom_field.css_classes}"
|
||||
span.label
|
||||
= custom_field.name
|
||||
' :
|
||||
= formatted
|
||||
|
||||
= call_hook :view_projects_show_dashboard_info_block, project: @project, dashboard: dashboard
|
|
@ -0,0 +1,42 @@
|
|||
h3.icon.icon-issue
|
||||
= l :label_issue_tracking
|
||||
'
|
||||
= link_to l(:label_details),
|
||||
project_issues_report_details_path(@project, detail: 'tracker'),
|
||||
class: 'icon-only icon-zoom-in',
|
||||
title: l(:label_details)
|
||||
|
||||
- if @trackers.present?
|
||||
table.list.issue-report
|
||||
thead
|
||||
tr
|
||||
th
|
||||
th
|
||||
= l :label_open_issues_plural
|
||||
th
|
||||
= l :label_closed_issues_plural
|
||||
th
|
||||
= l :label_total
|
||||
tbody
|
||||
- @trackers.each do |tracker|
|
||||
tr
|
||||
td.name
|
||||
= link_to tracker.name, project_issues_path(@project, set_filter: 1, tracker_id: tracker.id), title: tracker.description
|
||||
td
|
||||
= link_to @open_issues_by_tracker[tracker].to_i, project_issues_path(@project, set_filter: 1, tracker_id: tracker.id)
|
||||
td
|
||||
= link_to (@total_issues_by_tracker[tracker].to_i - @open_issues_by_tracker[tracker].to_i),
|
||||
project_issues_path(@project, set_filter: 1, tracker_id: tracker.id, status_id: 'c')
|
||||
td.total
|
||||
= link_to @total_issues_by_tracker[tracker].to_i,
|
||||
project_issues_path(@project, set_filter: 1, tracker_id: tracker.id, status_id: '*')
|
||||
p
|
||||
= link_to l(:label_issue_view_all), project_issues_path(@project, set_filter: 1)
|
||||
' |
|
||||
= link_to l(:field_summary), project_issues_report_path(@project)
|
||||
- if User.current.allowed_to? :view_calendar, @project, global: true
|
||||
' |
|
||||
= link_to l(:label_calendar), project_calendar_path(@project)
|
||||
- if User.current.allowed_to? :view_gantt, @project, global: true
|
||||
' |
|
||||
= link_to l(:label_gantt), project_gantt_path(@project)
|
|
@ -0,0 +1,7 @@
|
|||
- if @subprojects.any?
|
||||
h3.icon.icon-projects
|
||||
= l(:label_subproject_plural)
|
||||
ul.subprojects
|
||||
- @subprojects.each do |project|
|
||||
li
|
||||
= link_to(project.name, project_path(project), class: project.css_classes).html_safe
|
|
@ -0,0 +1,20 @@
|
|||
h3.icon.icon-time
|
||||
= block_definition[:label]
|
||||
ul
|
||||
- if @total_estimated_hours.present?
|
||||
li
|
||||
= l :field_estimated_hours
|
||||
' :
|
||||
= l_hours @total_estimated_hours
|
||||
- if @total_hours.present?
|
||||
li
|
||||
= l :label_spent_time
|
||||
' :
|
||||
= l_hours @total_hours
|
||||
p
|
||||
- if User.current.allowed_to? :log_time, @project
|
||||
= link_to l(:button_log_time), new_project_time_entry_path(@project)
|
||||
' |
|
||||
= link_to l(:label_details), project_time_entries_path(@project)
|
||||
' |
|
||||
= link_to l(:label_report), report_project_time_entries_path(@project)
|
|
@ -0,0 +1,34 @@
|
|||
- cache render_async_cache_key(_dashboard_async_blocks_path(@project, dashboard.async_params(block, async, settings))),
|
||||
expires_in: DashboardContent::RENDER_ASYNC_CACHE_EXPIRES_IN,
|
||||
skip_digest: true do
|
||||
|
||||
- query = klass.visible.find_by(id: settings[:query_id])
|
||||
- if query
|
||||
ruby:
|
||||
query.project = @project if query_block[:with_project]
|
||||
count = query.send query_block[:count_method]
|
||||
query.column_names = settings[:columns].split(',').map(&:to_sym) if settings[:columns].present?
|
||||
query.sort_criteria = params[:sort] if params[:sort].present?
|
||||
|
||||
h3.query-list-block
|
||||
= dashboard_query_list_block_title query, query_block, @project
|
||||
= " (#{count})"
|
||||
= dashboard_query_list_block_alerts dashboard, query, block_definition
|
||||
|
||||
- if query.respond_to?(:description) && query.description.present?
|
||||
.query-description
|
||||
= textilizable query, :description
|
||||
|
||||
- if count.positive?
|
||||
/ required by some helpers of other plugins
|
||||
- @query = query
|
||||
= render partial: query_block[:list_partial],
|
||||
locals: { query_block[:entities_var] => query.send(query_block[:entries_method],
|
||||
limit: settings[:max_entries] || DashboardContent::DEFAULT_MAX_ENTRIES),
|
||||
query: query,
|
||||
query_options: { sort_param: 'sort',
|
||||
sort_link_options: { method: :post, remote: true } } }
|
||||
- else
|
||||
p.nodata = l :label_no_data
|
||||
- else
|
||||
p.nodata = l :label_no_data
|
|
@ -0,0 +1,27 @@
|
|||
- query = klass.find_by id: settings[:query_id]
|
||||
- query.column_names = settings[:columns].map(&:to_sym) if query && settings[:columns].present?
|
||||
|
||||
div id="#{block}-settings" style="#{'display: none;' if hide}"
|
||||
= form_tag(_update_layout_setting_dashboard_path(@project, dashboard), remote: true) do
|
||||
.box
|
||||
- if query
|
||||
= render_query_columns_selection query, name: "settings[#{block}][columns]"
|
||||
- else
|
||||
p
|
||||
label
|
||||
= block_definition[:label]
|
||||
'
|
||||
= select_tag "settings[#{block}][query_id]",
|
||||
options_for_query_select(klass, @project),
|
||||
required: true
|
||||
p
|
||||
label
|
||||
= l :label_max_entries
|
||||
' :
|
||||
= number_field_tag "settings[#{block}][max_entries]",
|
||||
settings[:max_entries].presence || DashboardContent::DEFAULT_MAX_ENTRIES,
|
||||
min: 1, max: 100, required: true
|
||||
p
|
||||
= submit_tag l(:button_save)
|
||||
'
|
||||
= link_to_function l(:button_cancel), "$('##{block}-settings').toggle();"
|
|
@ -0,0 +1,26 @@
|
|||
ruby:
|
||||
title = settings[:title] || l(:label_text)
|
||||
text = settings[:text]
|
||||
|
||||
- if title.present?
|
||||
h3 = title
|
||||
|
||||
- if @can_edit
|
||||
div id="#{block}-settings" style='display: none;'
|
||||
= form_tag(_update_layout_setting_dashboard_path(@project, @dashboard), remote: true) do
|
||||
.box
|
||||
p
|
||||
label
|
||||
= l :field_title
|
||||
' :
|
||||
= text_field_tag "settings[#{block}][title]", title
|
||||
p
|
||||
= text_area_tag "settings[#{block}][text]", text, rows: addtionals_textarea_cols(text), class: 'wiki-edit'
|
||||
= wikitoolbar_for "settings_#{block}_text"
|
||||
p
|
||||
= submit_tag l(:button_save)
|
||||
'
|
||||
= link_to_function l(:button_cancel), "$('##{block}-settings').toggle();"
|
||||
|
||||
.wiki
|
||||
= textilizable text
|
|
@ -0,0 +1,2 @@
|
|||
.wiki
|
||||
= textilizable Setting.welcome_text
|
7
plugins/additionals/app/views/dashboards/edit.html.slim
Normal file
7
plugins/additionals/app/views/dashboards/edit.html.slim
Normal file
|
@ -0,0 +1,7 @@
|
|||
h2 = l(:button_dashboard_edit)
|
||||
= labelled_form_for :dashboard,
|
||||
@dashboard,
|
||||
url: { action: 'update', id: @dashboard.id },
|
||||
html: { multipart: true, method: :put, id: 'dashboard-form' } do |f|
|
||||
= render partial: 'form', locals: { f: f }
|
||||
= submit_tag l(:button_save)
|
20
plugins/additionals/app/views/dashboards/index.api.rsb
Normal file
20
plugins/additionals/app/views/dashboards/index.api.rsb
Normal file
|
@ -0,0 +1,20 @@
|
|||
api.array :dashboards, api_meta(total_count: @query_count, offset: @offset, limit: @limit) do
|
||||
@dashboards.each do |dashboard|
|
||||
api.dashboard do
|
||||
api.id dashboard.id
|
||||
api.name dashboard.name
|
||||
api.dashboard_type dashboard.dashboard_type
|
||||
api.description dashboard.description
|
||||
api.enable_sidebar dashboard.enable_sidebar
|
||||
api.system_default dashboard.system_default
|
||||
api.always_expose dashboard.always_expose
|
||||
api.project(id: dashboard.project_id, name: dashboard.project.name) unless dashboard.project.nil?
|
||||
api.author id: dashboard.author_id, name: dashboard.author.name
|
||||
api.visibility dashboard.visibility
|
||||
api.created_on dashboard.created_at
|
||||
api.updated_on dashboard.updated_at
|
||||
|
||||
call_hook :api_dashboard_show, dashboard: dashboard
|
||||
end
|
||||
end
|
||||
end
|
7
plugins/additionals/app/views/dashboards/new.html.slim
Normal file
7
plugins/additionals/app/views/dashboards/new.html.slim
Normal file
|
@ -0,0 +1,7 @@
|
|||
h2 = l(:label_new_additional_dashboard)
|
||||
= labelled_form_for :dashboard,
|
||||
@dashboard,
|
||||
url: { action: 'create', project_id: @project },
|
||||
html: { multipart: true, id: 'dashboard-form' } do |f|
|
||||
= render partial: 'form', locals: { f: f }
|
||||
= submit_tag l(:button_save)
|
|
@ -0,0 +1,2 @@
|
|||
$("#block-<%= escape_javascript @block %>").remove();
|
||||
$("#block-select").replaceWith("<%= escape_javascript dashboard_block_select_tag(@dashboard) %>");
|
17
plugins/additionals/app/views/dashboards/show.api.rsb
Normal file
17
plugins/additionals/app/views/dashboards/show.api.rsb
Normal file
|
@ -0,0 +1,17 @@
|
|||
api.dashboard do
|
||||
api.id @dashboard.id
|
||||
api.name @dashboard.name
|
||||
api.dashboard_type @dashboard.dashboard_type
|
||||
api.description @dashboard.description
|
||||
api.enable_sidebar @dashboard.enable_sidebar
|
||||
api.system_default @dashboard.system_default
|
||||
api.always_expose @dashboard.always_expose
|
||||
api.project(id: @dashboard.project_id, name: @dashboard.project.name) unless @dashboard.project.nil?
|
||||
api.author id: @dashboard.author_id, name: @dashboard.author.name
|
||||
api.visibility @dashboard.visibility
|
||||
api.options @dashboard.options
|
||||
api.created_on @dashboard.created_at
|
||||
api.updated_on @dashboard.updated_at
|
||||
|
||||
call_hook :api_dashboard_show, dashboard: @dashboard
|
||||
end
|
|
@ -0,0 +1,14 @@
|
|||
<% @updated_blocks.each do |block| %>
|
||||
$("#block-<%= block %>").replaceWith("<%= escape_javascript render_dashboard_block(block.to_s, @dashboard) %>");
|
||||
<% end %>
|
||||
|
||||
|
||||
$('[title]').tooltip({
|
||||
show: {
|
||||
delay: 400
|
||||
},
|
||||
position: {
|
||||
my: "center bottom-5",
|
||||
at: "center top"
|
||||
}
|
||||
});
|
|
@ -0,0 +1 @@
|
|||
= call_hook :view_contacts_form_details_bottom, contact: @contact, form: f
|
|
@ -1 +0,0 @@
|
|||
= call_hook(:view_users_show_contextual, user: @user)
|
|
@ -1 +0,0 @@
|
|||
= call_hook(:view_users_show_info, user: @user)
|
|
@ -0,0 +1 @@
|
|||
= call_hook :view_users_show_contextual, user: @user
|
|
@ -0,0 +1 @@
|
|||
= call_hook :view_users_show_info, user: @user
|
|
@ -1,5 +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)),
|
||||
= 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')
|
||||
class: 'assign-to-me'
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
- if User.current.allowed_to?(:log_time, @project) && @issue.log_time_allowed?
|
||||
= link_to l(:button_log_time), new_issue_time_entry_path(@issue), class: 'icon icon-time-add'
|
|
@ -17,5 +17,3 @@
|
|||
= 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)
|
|
@ -0,0 +1,4 @@
|
|||
- if Additionals.setting(:global_sidebar).present?
|
||||
br
|
||||
.sidebar-additionals
|
||||
= textilizable(Additionals.setting(:global_sidebar))
|
|
@ -1,9 +1,9 @@
|
|||
- if show_issue_change_author?(issue) && issue.safe_attribute?('author_id')
|
||||
- author_options = issue_author_options_for_select(issue.project, issue)
|
||||
- author_options = 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()'
|
||||
= link_to_function 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());
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- if @project && User.current.allowed_to?(:edit_issue_author, @project)
|
||||
- author_options = issue_author_options_for_select(@project)
|
||||
- author_options = 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)
|
||||
tag.option(l(:label_no_change_option), value: '') + author_options)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
- if @issue.new_ticket_message.present?
|
||||
.nodata.nodata-left
|
||||
= textilizable(@issue.new_ticket_message).html_safe
|
||||
= textilizable @issue, :new_ticket_message, inline_attachments: false
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
- if Additionals.setting(:global_sidebar).present?
|
||||
br
|
||||
.sidebar-additionals
|
||||
= textilizable Additionals.setting(:global_sidebar)
|
|
@ -1,4 +0,0 @@
|
|||
- project_overview_content = Additionals.settings[:project_overview_content]
|
||||
- if project_overview_content.present?
|
||||
.project-content.wiki.box
|
||||
= textilizable(project_overview_content)
|
97
plugins/additionals/app/views/projects/show.html.slim
Normal file
97
plugins/additionals/app/views/projects/show.html.slim
Normal file
|
@ -0,0 +1,97 @@
|
|||
/ Some plugins use @news (e.g. redmine_wysiwyg_editor), to detect news
|
||||
- @news = nil
|
||||
.contextual
|
||||
- if User.current.allowed_to?(:save_dashboards, @project) && @dashboard&.editable?
|
||||
= link_to l(:button_dashboard_edit),
|
||||
edit_project_dashboard_path(@project, @dashboard),
|
||||
class: 'icon icon-edit'
|
||||
|
||||
- unless Redmine::Plugin.installed? 'redmine_reporting'
|
||||
= bookmark_link @project
|
||||
= call_hook :view_project_contextual_links, project: @project
|
||||
|
||||
- if @dashboard&.editable?
|
||||
= form_tag(_add_block_dashboard_path(@project, @dashboard), remote: true, id: 'block-form', authenticity_token: true) do
|
||||
= dashboard_block_select_tag @dashboard
|
||||
|
||||
= actions_dropdown do
|
||||
- if User.current.allowed_to? :add_subprojects, @project
|
||||
= link_to l(:label_subproject_new), new_project_path(parent_id: @project), class: 'icon icon-add'
|
||||
- if User.current.allowed_to?(:close_project, @project)
|
||||
- if @project.active?
|
||||
= link_to l(:button_close),
|
||||
close_project_path(@project),
|
||||
data: { confirm: l(:text_are_you_sure) }, method: :post, class: 'icon icon-lock'
|
||||
- else
|
||||
= link_to l(:button_reopen),
|
||||
reopen_project_path(@project),
|
||||
data: { confirm: l(:text_are_you_sure) }, method: :post, class: 'icon icon-unlock'
|
||||
|
||||
- if User.current.admin?
|
||||
- if @project.archived?
|
||||
= link_to l(:button_unarchive),
|
||||
unarchive_project_path(@project, status: params[:status]),
|
||||
method: :post, class: 'icon icon-unlock'
|
||||
- else
|
||||
= link_to l(:button_archive),
|
||||
archive_project_path(@project, status: params[:status]),
|
||||
data: { confirm: l(:text_are_you_sure) }, method: :post, class: 'icon icon-lock'
|
||||
= link_to l(:button_copy), copy_project_path(@project), class: 'icon icon-copy'
|
||||
= link_to l(:button_delete), project_path(@project), method: :delete, class: 'icon icon-del'
|
||||
|
||||
- if User.current.allowed_to? :save_dashboards, @project
|
||||
= link_to l(:label_new_dashboard),
|
||||
new_project_dashboard_path(@project),
|
||||
class: 'icon icon-add new-additionals-dashboard'
|
||||
|
||||
- if @dashboard&.destroyable?
|
||||
= delete_dashboard_link project_dashboard_path(@project, @dashboard),
|
||||
class: 'icon icon-del'
|
||||
|
||||
= sidebar_action_toggle @dashboard_sidebar, @dashboard, @project
|
||||
- unless @dashboard_sidebar
|
||||
= render_dashboard_actionlist @dashboard, @project
|
||||
|
||||
= call_hook :view_project_actions_dropdown, project: @project
|
||||
|
||||
- if User.current.allowed_to?(:edit_project, @project)
|
||||
= link_to_if_authorized l(:label_settings),
|
||||
{ controller: 'projects', action: 'settings', id: @project },
|
||||
class: 'icon icon-settings'
|
||||
|
||||
h2 = project_overview_name @project, @dashboard
|
||||
|
||||
- unless @project.active?
|
||||
p.warning
|
||||
span.icon.icon-lock
|
||||
= l(:text_project_closed)
|
||||
|
||||
= render partial: 'common/dashboard', locals: { dashboard: @dashboard }
|
||||
|
||||
javascript:
|
||||
$(function() {
|
||||
$('#block-projectmembers div.members').removeClass('box');
|
||||
});
|
||||
|
||||
= call_hook :view_projects_show_bottom, project: @project
|
||||
|
||||
- if @dashboard_sidebar
|
||||
- content_for :sidebar do
|
||||
= call_hook :view_projects_show_sidebar_top, project: @project
|
||||
= render_sidebar_dashboards @dashboard, @project
|
||||
- if Additionals.setting(:global_sidebar).present?
|
||||
br
|
||||
.sidebar-additionals
|
||||
= textilizable Additionals.setting(:global_sidebar)
|
||||
|
||||
= call_hook :view_projects_show_sidebar_bottom, project: @project
|
||||
|
||||
- content_for :header_tags do
|
||||
= auto_discovery_link_tag :atom,
|
||||
{ controller: 'activities',
|
||||
action: 'index',
|
||||
id: @project,
|
||||
format: 'atom',
|
||||
key: User.current.rss_key }
|
||||
|
||||
- html_title l(:label_overview)
|
|
@ -0,0 +1,13 @@
|
|||
- reset_cycle
|
||||
tr.group.open
|
||||
td colspan="#{query.inline_columns.size + 2}"
|
||||
span.expander.icon.icon-expended[onclick="toggleRowGroup(this);"]
|
||||
'
|
||||
span.name = group_name
|
||||
- if group_count.present?
|
||||
'
|
||||
span.badge.badge-count.count = group_count
|
||||
'
|
||||
span.totals = group_totals
|
||||
= link_to_function("#{l :button_collapse_all}/#{l :button_expand_all}",
|
||||
'toggleAllRowGroups(this)', class: 'toggle-all')
|
|
@ -0,0 +1,7 @@
|
|||
ruby:
|
||||
case field_name
|
||||
when 'assigned_to_id'
|
||||
rows = Setting.issue_group_assignment? ? @project.visible_principals : @project.visible_users # rubocop:disable Lint/UselessAssignment
|
||||
when 'author_id'
|
||||
rows = @project.visible_users # rubocop:disable Lint/UselessAssignment
|
||||
end
|
|
@ -1,5 +0,0 @@
|
|||
- overview_bottom = Additionals.settings[:overview_bottom]
|
||||
- if overview_bottom.present?
|
||||
.clear-both
|
||||
.overview-bottom.wiki.box
|
||||
= textilizable(overview_bottom)
|
|
@ -1,5 +0,0 @@
|
|||
- 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
|
|
@ -1,4 +0,0 @@
|
|||
- overview_right = Additionals.settings[:overview_right]
|
||||
- if overview_right.present?
|
||||
.overview-right.wiki.box
|
||||
= textilizable(overview_right)
|
|
@ -1,4 +0,0 @@
|
|||
- overview_top = Additionals.settings[:overview_top]
|
||||
- if overview_top.present?
|
||||
.overview-top.wiki.box
|
||||
= textilizable(overview_top)
|
6
plugins/additionals/app/views/welcome/_sidebar.html.slim
Normal file
6
plugins/additionals/app/views/welcome/_sidebar.html.slim
Normal file
|
@ -0,0 +1,6 @@
|
|||
- if Additionals.setting(:global_sidebar).present?
|
||||
br
|
||||
.sidebar-additionals
|
||||
= textilizable Additionals.setting(:global_sidebar)
|
||||
|
||||
= render_sidebar_dashboards @dashboard
|
54
plugins/additionals/app/views/welcome/index.html.slim
Normal file
54
plugins/additionals/app/views/welcome/index.html.slim
Normal file
|
@ -0,0 +1,54 @@
|
|||
/ Some plugins use @news (e.g. redmine_wysiwyg_editor), to detect news
|
||||
- @news = nil
|
||||
.contextual
|
||||
- if User.current.allowed_to?(:save_dashboards, nil, global: true) && @dashboard&.editable?
|
||||
= link_to l(:button_dashboard_edit),
|
||||
edit_dashboard_path(@dashboard),
|
||||
class: 'icon icon-edit'
|
||||
|
||||
= call_hook :view_welcome_contextual_links
|
||||
|
||||
- if @dashboard&.editable?
|
||||
= form_tag(add_block_dashboard_path(@dashboard), remote: true, id: 'block-form', authenticity_token: true) do
|
||||
= dashboard_block_select_tag @dashboard
|
||||
|
||||
= actions_dropdown do
|
||||
- if User.current.allowed_to? :save_dashboards, nil, global: true
|
||||
= link_to l(:label_new_dashboard),
|
||||
new_dashboard_path,
|
||||
class: 'icon icon-add new-additionals-dashboard'
|
||||
- if @dashboard&.destroyable?
|
||||
= delete_dashboard_link dashboard_path(@dashboard),
|
||||
class: 'icon icon-del'
|
||||
= sidebar_action_toggle @dashboard_sidebar, @dashboard
|
||||
- unless @dashboard_sidebar
|
||||
= render_dashboard_actionlist @dashboard
|
||||
|
||||
= call_hook :view_welcome_show_actions_dropdown
|
||||
|
||||
h2 = welcome_overview_name @dashboard
|
||||
|
||||
= call_hook :view_welcome_index_top
|
||||
|
||||
= render partial: 'common/dashboard', locals: { dashboard: @dashboard }
|
||||
|
||||
= call_hook :view_welcome_index_bottom
|
||||
|
||||
- if @dashboard_sidebar
|
||||
- content_for :sidebar do
|
||||
= render partial: 'sidebar'
|
||||
= call_hook :view_welcome_show_sidebar_bottom
|
||||
|
||||
- content_for :header_tags do
|
||||
= auto_discovery_link_tag :atom,
|
||||
{ controller: 'news',
|
||||
action: 'index',
|
||||
key: User.current.rss_key,
|
||||
format: 'atom' },
|
||||
title: "#{Setting.app_title}: #{l :label_news_latest}"
|
||||
= auto_discovery_link_tag :atom,
|
||||
{ controller: 'activities',
|
||||
action: 'index',
|
||||
key: User.current.rss_key,
|
||||
format: 'atom' },
|
||||
title: "#{Setting.app_title}: #{l :label_activity}"
|
|
@ -0,0 +1,4 @@
|
|||
- if Additionals.setting(:global_sidebar).present?
|
||||
.sidebar-additionals
|
||||
= textilizable Additionals.setting(:global_sidebar)
|
||||
br
|
|
@ -1,17 +0,0 @@
|
|||
.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});
|
|
@ -1,5 +0,0 @@
|
|||
- sidebar = Additionals.settings[:global_sidebar]
|
||||
- if sidebar.present?
|
||||
.sidebar-additionals
|
||||
= textilizable(sidebar)
|
||||
br
|
|
@ -1,15 +1,20 @@
|
|||
.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))
|
||||
|
||||
table.list.projects
|
||||
- project_tree(@projects, init_level: false) do |project, level|
|
||||
tr id="project-#{project.id}" class="#{project_list_css_classes project, level}"
|
||||
td.name
|
||||
span[style='font-weight: bold;']
|
||||
- if Redmine::Plugin.installed? 'redmine_reporting'
|
||||
= project_name_with_icon project
|
||||
- else
|
||||
= 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)
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
- 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
|
|
@ -2,22 +2,22 @@
|
|||
- if list_title
|
||||
h3 = list_title
|
||||
- users.each do |user|
|
||||
.user.box class="#{cycle('odd', 'even')}"
|
||||
.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)
|
||||
= link_to_user user
|
||||
- if !user_roles.nil? && user_roles[user.id]
|
||||
.user.line
|
||||
= l(:field_role)
|
||||
= l :field_role
|
||||
' :
|
||||
= user_roles[user.id].join(', ').html_safe
|
||||
.user.line
|
||||
= l(:field_login)
|
||||
= l :field_login
|
||||
' :
|
||||
= link_to user.login, '/users/' + user.id.to_s
|
||||
= link_to user.login, "/users/#{user.id}"
|
||||
- unless user.pref.hide_mail
|
||||
.user.line
|
||||
= l(:field_mail)
|
||||
= l :field_mail
|
||||
' :
|
||||
= mail_to(user.mail, nil, encode: 'javascript')
|
||||
= mail_to user.mail, nil, encode: 'javascript'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue