Actualiza el plugin Additionals a 3.0.2-master
This commit is contained in:
parent
3b6a41320c
commit
cfa0d58b18
164 changed files with 2027 additions and 58190 deletions
|
@ -9,10 +9,7 @@
|
|||
|
||||
.splitcontent
|
||||
.splitcontentleft
|
||||
|
||||
- if @dashboard.new_record?
|
||||
= hidden_field_tag 'dashboard[dashboard_type]', @dashboard.dashboard_type
|
||||
|
||||
= hidden_field_tag 'dashboard[dashboard_type]', @dashboard.dashboard_type if @dashboard.new_record?
|
||||
- if @project && @allowed_projects.present? && @allowed_projects.count > 1
|
||||
p
|
||||
= f.select :project_id,
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
- 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)
|
||||
from: events_by_day.keys.first)
|
||||
|
||||
= render partial: 'activities/activities', locals: { events_by_day: events_by_day }
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
- 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)
|
||||
= l :label_max_entries
|
||||
' :
|
||||
= number_field_tag "settings[#{block}][max_entries]", max_entries, min: 1, max: 1000, required: true
|
||||
|
||||
= number_field_tag "settings[#{block}][max_entries]",
|
||||
settings[:max_entries].presence || DashboardContent::DEFAULT_MAX_ENTRIES,
|
||||
min: 1, max: 1000, required: true
|
||||
p
|
||||
label
|
||||
= l(:label_only_my_activities)
|
||||
= l :label_only_my_activities
|
||||
' :
|
||||
= check_box_tag "settings[#{block}][me_only]", '1', Additionals.true?(settings[:me_only])
|
||||
|
||||
|
|
|
@ -11,10 +11,7 @@
|
|||
- 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'
|
||||
li = link_to_external item[:title], item[:link]
|
||||
- else
|
||||
p.nodata = l :label_no_data
|
||||
- elsif settings[:url].blank?
|
||||
|
|
|
@ -6,7 +6,7 @@ h3.icon.icon-news = l :label_news_latest
|
|||
.box
|
||||
p
|
||||
label
|
||||
= l(:label_max_entries)
|
||||
= l :label_max_entries
|
||||
' :
|
||||
= number_field_tag "settings[#{block}][max_entries]", max_entries, min: 1, max: 1000, required: true
|
||||
p
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- if @subprojects.any?
|
||||
h3.icon.icon-projects
|
||||
= l(:label_subproject_plural)
|
||||
= l :label_subproject_plural
|
||||
ul.subprojects
|
||||
- @subprojects.each do |project|
|
||||
li
|
||||
= link_to(project.name, project_path(project), class: project.css_classes).html_safe
|
||||
= link_to project.name, project_path(project), class: project.css_classes
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
- 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),
|
||||
|
|
|
@ -1,26 +1,12 @@
|
|||
ruby:
|
||||
title = settings[:title] || l(:label_text)
|
||||
text = settings[:text]
|
||||
|
||||
- if title.present?
|
||||
h3 = title
|
||||
- if settings[:text].nil?
|
||||
h3
|
||||
= l :label_text_sync
|
||||
- elsif settings[:title].present?
|
||||
h3
|
||||
= settings[: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();"
|
||||
= render partial: 'dashboards/blocks/text_async_settings', locals: { block: block, settings: settings }
|
||||
|
||||
.wiki
|
||||
= textilizable text
|
||||
= textilizable settings[:text]
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
- 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
|
||||
|
||||
- if settings[:title].present?
|
||||
h3 = settings[:title]
|
||||
|
||||
.wiki
|
||||
= textilizable settings[:text]
|
|
@ -0,0 +1,15 @@
|
|||
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]", (settings[:title] || l(:label_text_sync))
|
||||
p
|
||||
= text_area_tag "settings[#{block}][text]", settings[:text], rows: addtionals_textarea_cols(settings[:text]), class: 'wiki-edit'
|
||||
= wikitoolbar_for "settings_#{block}_text"
|
||||
p
|
||||
= submit_tag l :button_save
|
||||
'
|
||||
= link_to_function l(:button_cancel), "$('##{block}-settings').toggle();"
|
|
@ -1,7 +1,6 @@
|
|||
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|
|
||||
html: { multipart: true, id: 'dashboard-form' } do |f|
|
||||
= render partial: 'form', locals: { f: f }
|
||||
= submit_tag l(:button_save)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue