refinerycms-dashboard 2.0.10 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/refinery/admin/dashboard_controller.rb +3 -9
- data/app/helpers/refinery/admin/dashboard_helper.rb +28 -15
- data/app/views/refinery/admin/dashboard/_actions.html.erb +19 -21
- data/app/views/refinery/admin/dashboard/index.html.erb +0 -4
- data/config/locales/hu.yml +27 -0
- data/config/locales/nl.yml +12 -12
- data/config/locales/pt.yml +27 -0
- data/config/locales/sk.yml +1 -1
- data/config/locales/tr.yml +27 -0
- data/config/locales/uk.yml +32 -0
- data/config/routes.rb +2 -6
- data/lib/refinery/dashboard/engine.rb +1 -2
- data/refinerycms-dashboard.gemspec +1 -2
- data/spec/{requests → features}/refinery/admin/dashboard_spec.rb +3 -5
- metadata +10 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 405d4152889811e11625a5fadbb092e709785ae7
|
4
|
+
data.tar.gz: c1a6da62aec1fbc11f289a3b5aa5df14dd16ed12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fe22ddc076ec10906a315a341967ae56ac70fea8481ec7ffc30d3616400e6c68047abc355503b361aa3b9accded4f00f312c09e17673ce3b561a662568f41ea
|
7
|
+
data.tar.gz: f74a046e207659724c97d1cd55ebd207bbe346ae2dabb276d29d73b89e33e29fcbab2c71e78f842fd611983f91613889a2fe53b7bfe499caeb9230895b0c350a
|
@@ -8,7 +8,7 @@ module Refinery
|
|
8
8
|
::Refinery::Plugins.active.each do |plugin|
|
9
9
|
begin
|
10
10
|
plugin.activity.each do |activity|
|
11
|
-
@recent_activity
|
11
|
+
@recent_activity += activity.klass.where(activity.conditions).
|
12
12
|
order(activity.order).
|
13
13
|
limit(activity.limit)
|
14
14
|
end
|
@@ -19,9 +19,8 @@ module Refinery
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
@recent_activity = @recent_activity.
|
23
|
-
|
24
|
-
}.first(Refinery::Dashboard.activity_show_limit)
|
22
|
+
@recent_activity = @recent_activity.sort_by(&:updated_at).reverse.
|
23
|
+
first(Refinery::Dashboard.activity_show_limit)
|
25
24
|
|
26
25
|
@recent_inquiries = if Refinery::Plugins.active.find_by_name("refinerycms_inquiries")
|
27
26
|
Refinery::Inquiries::Inquiry.latest(Refinery::Dashboard.activity_show_limit)
|
@@ -30,11 +29,6 @@ module Refinery
|
|
30
29
|
end
|
31
30
|
end
|
32
31
|
|
33
|
-
def disable_upgrade_message
|
34
|
-
Refinery::Core.show_internet_explorer_upgrade_message = false
|
35
|
-
render :nothing => true
|
36
|
-
end
|
37
|
-
|
38
32
|
end
|
39
33
|
end
|
40
34
|
end
|
@@ -3,21 +3,34 @@ module Refinery
|
|
3
3
|
module DashboardHelper
|
4
4
|
|
5
5
|
def activity_message_for(record)
|
6
|
-
if (plugin =
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
6
|
+
return if (plugin = find_plugin(record)).blank? || (activity = find_activity(record, plugin)).blank?
|
7
|
+
|
8
|
+
link_to t('.latest_activity_message',
|
9
|
+
:what => record.send(activity.title),
|
10
|
+
:kind => record.class.model_name.human,
|
11
|
+
:action => t("with_article \"#{plugin_article(plugin)}\"",
|
12
|
+
:scope => "refinery.#{record_action(record)}")
|
13
|
+
).downcase.capitalize, eval("#{activity.url}(#{activity.nesting('record')})")
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def find_plugin(record)
|
19
|
+
Refinery::Plugins.active.find_by_model record.class
|
20
|
+
end
|
21
|
+
|
22
|
+
def find_activity(record, plugin = nil)
|
23
|
+
plugin ||= find_plugin(record) # avoid double lookup if we already have it
|
24
|
+
plugin.activity_by_class_name(record.class.name).first
|
25
|
+
end
|
26
|
+
|
27
|
+
def record_action(record)
|
28
|
+
record.updated_at.eql?(record.created_at) ? 'created' : 'updated'
|
29
|
+
end
|
30
|
+
|
31
|
+
# get article to define gender of model name, some languages require this for proper grammar
|
32
|
+
def plugin_article(plugin)
|
33
|
+
article = t('article', :scope => "refinery.plugins.#{plugin.name}.", :default => 'the')
|
21
34
|
end
|
22
35
|
|
23
36
|
end
|
@@ -32,26 +32,24 @@
|
|
32
32
|
<%= render 'additional_dashboard_menu_items' %>
|
33
33
|
</ul>
|
34
34
|
|
35
|
-
<%
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
<
|
35
|
+
<% locales = Refinery::I18n.locales.clone %>
|
36
|
+
<% current_locale = ::I18n.locale %>
|
37
|
+
<% current_locale_title = locales.delete(current_locale) %>
|
38
|
+
<ul id='current_locale'>
|
39
|
+
<li>
|
40
|
+
<%= link_to "#", :style => "background-image: url('#{asset_path "refinery/icons/flags/#{current_locale}.png"}');" do %>
|
41
|
+
<%= current_locale_title.respond_to?(:force_encoding) ? current_locale_title.force_encoding('utf-8') : current_locale_title %>
|
42
|
+
<span><%= t('.change_language') %></span>
|
43
|
+
<span style='display:none;'><%= t('cancel', :scope => 'refinery.admin.form_actions') %></span>
|
44
|
+
<% end %>
|
45
|
+
</li>
|
46
|
+
</ul>
|
47
|
+
<ul id='other_locales' style='display: none'>
|
48
|
+
<% locales.sort_by{|key, value| value}.each do |locale, locale_title| %>
|
40
49
|
<li>
|
41
|
-
<%= link_to
|
42
|
-
|
43
|
-
|
44
|
-
<span style='display:none;'><%= t('cancel', :scope => 'refinery.admin.form_actions') %></span>
|
45
|
-
<% end %>
|
50
|
+
<%= link_to locale_title.respond_to?(:force_encoding) ? locale_title.force_encoding('utf-8') : locale_title,
|
51
|
+
refinery.admin_dashboard_path(:set_locale => locale),
|
52
|
+
:style => "background-image: url('#{asset_path "refinery/icons/flags/#{locale}.png"}');" %>
|
46
53
|
</li>
|
47
|
-
|
48
|
-
|
49
|
-
<% locales.sort_by{|key, value| value}.each do |locale, locale_title| %>
|
50
|
-
<li>
|
51
|
-
<%= link_to locale_title.respond_to?(:force_encoding) ? locale_title.force_encoding('utf-8') : locale_title,
|
52
|
-
refinery.admin_dashboard_path(:set_locale => locale),
|
53
|
-
:style => "background-image: url('#{asset_path "refinery/icons/flags/#{locale}.png"}');" %>
|
54
|
-
</li>
|
55
|
-
<% end %>
|
56
|
-
</ul>
|
57
|
-
<% end %>
|
54
|
+
<% end %>
|
55
|
+
</ul>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
hu:
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinery_dashboard:
|
5
|
+
title: Műszerfal
|
6
|
+
description: Összefoglalót kapsz a Refinery-ben történt tevékenységekről
|
7
|
+
admin:
|
8
|
+
dashboard:
|
9
|
+
index:
|
10
|
+
quick_tasks: Gyors Feladatok
|
11
|
+
actions:
|
12
|
+
add_a_new_page: Új oldal hozzáadása
|
13
|
+
update_a_page: Oldal frissítése
|
14
|
+
upload_a_image: Kép feltöltése
|
15
|
+
upload_a_file: Fájl feltöltése
|
16
|
+
change_language: Nyelvváltás
|
17
|
+
see_home_page: Nyitóoldal megtekintése
|
18
|
+
recent_activity:
|
19
|
+
empty: Mostanában nem történt semmilyen tevékenység.
|
20
|
+
latest_activity: Legutóbbi Tevékenységek
|
21
|
+
latest_activity_message: '%{what} %{kind} lett %{action}'
|
22
|
+
recent_inquiries:
|
23
|
+
latest_inquiries: Legfrissebb megkeresések
|
24
|
+
updated:
|
25
|
+
'with_article "the"': frissítve
|
26
|
+
created:
|
27
|
+
'with_article "the"': hozzáadva
|
data/config/locales/nl.yml
CHANGED
@@ -3,25 +3,25 @@ nl:
|
|
3
3
|
plugins:
|
4
4
|
refinery_dashboard:
|
5
5
|
title: Overzicht
|
6
|
-
description:
|
6
|
+
description: Een overzicht van activiteit binnen Refinery
|
7
7
|
admin:
|
8
8
|
dashboard:
|
9
9
|
index:
|
10
|
-
quick_tasks: Algemene
|
10
|
+
quick_tasks: Algemene Taken
|
11
11
|
actions:
|
12
|
-
add_a_new_page:
|
13
|
-
update_a_page:
|
14
|
-
upload_a_image:
|
15
|
-
upload_a_file:
|
16
|
-
change_language:
|
17
|
-
see_home_page:
|
12
|
+
add_a_new_page: Een nieuwe pagina toevoegen
|
13
|
+
update_a_page: Een pagina bewerken
|
14
|
+
upload_a_image: Een afbeelding uploaden
|
15
|
+
upload_a_file: Een bestand uploaden
|
16
|
+
change_language: De taal veranderen
|
17
|
+
see_home_page: De homepage bezoeken
|
18
18
|
recent_activity:
|
19
19
|
empty: Er hebben zich recentelijk geen activiteiten voorgedaan.
|
20
|
-
latest_activity: Laatste
|
20
|
+
latest_activity: Laatste activiteit
|
21
21
|
latest_activity_message: '%{what} %{kind} is %{action}'
|
22
22
|
recent_inquiries:
|
23
|
-
latest_inquiries:
|
23
|
+
latest_inquiries: Laatste contactaanvragen
|
24
24
|
updated:
|
25
|
-
'with_article "the"':
|
25
|
+
'with_article "the"': bewerkt
|
26
26
|
created:
|
27
|
-
'with_article "the"':
|
27
|
+
'with_article "the"': toegevoegd
|
@@ -0,0 +1,27 @@
|
|
1
|
+
pt:
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinery_dashboard:
|
5
|
+
title: Dashboard
|
6
|
+
description: "Apresenta uma visão geral da actividade no Refinery"
|
7
|
+
admin:
|
8
|
+
dashboard:
|
9
|
+
index:
|
10
|
+
quick_tasks: "Tarefas Rápidas"
|
11
|
+
actions:
|
12
|
+
add_a_new_page: "Adicionar nova página"
|
13
|
+
update_a_page: "Actualizar uma página"
|
14
|
+
upload_a_image: "Carregar uma imagem"
|
15
|
+
upload_a_file: "Carregar um ficheiro"
|
16
|
+
change_language: "Mudar de Língua"
|
17
|
+
see_home_page: "Ver página inicial"
|
18
|
+
recent_activity:
|
19
|
+
empty: "Não houve qualquer actividade recentemente."
|
20
|
+
latest_activity: "Últimas actividades"
|
21
|
+
latest_activity_message: '%{what} %{kind} foi %{action}'
|
22
|
+
recent_inquiries:
|
23
|
+
latest_inquiries: "Últimas consultas"
|
24
|
+
updated:
|
25
|
+
'with_article "the"': 'Actualizado'
|
26
|
+
created:
|
27
|
+
'with_article "the"': 'Adicionado'
|
data/config/locales/sk.yml
CHANGED
@@ -20,7 +20,7 @@ sk:
|
|
20
20
|
latest_activity: Najnovšie Akcie
|
21
21
|
latest_activity_message: '%{what} %{kind} bol/a %{action}'
|
22
22
|
recent_inquiries:
|
23
|
-
latest_inquiries: Najnovšie
|
23
|
+
latest_inquiries: Najnovšie otázky z webu
|
24
24
|
updated:
|
25
25
|
'with_article "the"': upravený/á
|
26
26
|
created:
|
@@ -0,0 +1,27 @@
|
|
1
|
+
tr:
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinery_dashboard:
|
5
|
+
title: Kontrol Paneli
|
6
|
+
description: RefineryCMS aktivite ekrani
|
7
|
+
admin:
|
8
|
+
dashboard:
|
9
|
+
index:
|
10
|
+
quick_tasks: Hizli Gorev
|
11
|
+
actions:
|
12
|
+
add_a_new_page: Yeni bir sayfa ekle
|
13
|
+
update_a_page: Yeni bir sayfa guncelle
|
14
|
+
upload_a_image: Fotograf ekle
|
15
|
+
upload_a_file: Dosya ekle
|
16
|
+
change_language: Dil'i Degistir
|
17
|
+
see_home_page: Ana Sayfayi Gor
|
18
|
+
recent_activity:
|
19
|
+
empty: Son zamanlarda herhangi bir aktivite yok
|
20
|
+
latest_activity: Son Aktivite
|
21
|
+
latest_activity_message: '%{what} %{kind} was %{action}'
|
22
|
+
recent_inquiries:
|
23
|
+
latest_inquiries: En Son Talepler
|
24
|
+
updated:
|
25
|
+
'with_article "the"': guncellendi
|
26
|
+
created:
|
27
|
+
'with_article "the"': eklendi
|
@@ -0,0 +1,32 @@
|
|
1
|
+
uk:
|
2
|
+
refinery:
|
3
|
+
plugins:
|
4
|
+
refinery_dashboard:
|
5
|
+
title: Зведення
|
6
|
+
description: Огляд останніх дій у Refinery
|
7
|
+
admin:
|
8
|
+
dashboard:
|
9
|
+
index:
|
10
|
+
quick_tasks: Швидкі завдання
|
11
|
+
actions:
|
12
|
+
add_a_new_page: Додати нову сторінку
|
13
|
+
update_a_page: Змінити сторінку
|
14
|
+
upload_a_image: Завантажити зображення
|
15
|
+
upload_a_file: Завантажити файл
|
16
|
+
change_language: Змінити мову
|
17
|
+
see_home_page: Переглянути домашню сторінку
|
18
|
+
recent_activity:
|
19
|
+
empty: Останнім часом не було активності.
|
20
|
+
latest_activity: Останні дії
|
21
|
+
latest_activity_message: "%{action} %{kind} «%{what}»"
|
22
|
+
recent_inquiries:
|
23
|
+
latest_inquiries: Останні запити
|
24
|
+
updated:
|
25
|
+
'with_article "masculine"': Оновлений
|
26
|
+
'with_article "feminine"': Оновлена
|
27
|
+
'with_article "neuter"': Оновлено
|
28
|
+
created:
|
29
|
+
'with_article "masculine"': Доданий
|
30
|
+
'with_article "feminine"': Додана
|
31
|
+
'with_article "neuter"': Додано
|
32
|
+
|
data/config/routes.rb
CHANGED
@@ -1,9 +1,5 @@
|
|
1
|
-
Refinery::Core::Engine.routes.
|
2
|
-
namespace :admin, :path =>
|
1
|
+
Refinery::Core::Engine.routes.draw do
|
2
|
+
namespace :admin, :path => Refinery::Core.backend_route do
|
3
3
|
get 'dashboard', :to => 'dashboard#index', :as => :dashboard
|
4
|
-
|
5
|
-
match 'disable_upgrade_message',
|
6
|
-
:to => 'dashboard#disable_upgrade_message',
|
7
|
-
:as => :disable_upgrade_message
|
8
4
|
end
|
9
5
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Refinery
|
2
2
|
module Dashboard
|
3
3
|
class Engine < ::Rails::Engine
|
4
|
-
|
4
|
+
extend Refinery::Engine
|
5
5
|
|
6
6
|
isolate_namespace Refinery
|
7
7
|
engine_name :refinery_dashboard
|
@@ -13,7 +13,6 @@ module Refinery
|
|
13
13
|
plugin.pathname = root
|
14
14
|
plugin.name = 'refinery_dashboard'
|
15
15
|
plugin.menu_match = %r{refinery/(refinery_)?dashboard$}
|
16
|
-
plugin.version = %q{2.0.0}
|
17
16
|
plugin.always_allow_access = true
|
18
17
|
plugin.dashboard = true
|
19
18
|
plugin.url = proc { Refinery::Core::Engine.routes.url_helpers.admin_dashboard_path }
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
describe "dashboard" do
|
4
|
-
|
4
|
+
refinery_login_with :refinery_user
|
5
5
|
|
6
6
|
describe "quick tasks" do
|
7
7
|
specify "buttons" do
|
@@ -37,12 +37,10 @@ describe "dashboard" do
|
|
37
37
|
3.times { |n| FactoryGirl.create :page, :title => "Refinery CMS #{n}" }
|
38
38
|
end
|
39
39
|
|
40
|
-
it "shows
|
40
|
+
it "shows created tracked objects" do
|
41
41
|
visit refinery.admin_dashboard_path
|
42
42
|
|
43
43
|
page.should have_content("Latest Activity")
|
44
|
-
# This comes from login_refinery_user
|
45
|
-
page.should have_content("Refinerycms user was")
|
46
44
|
3.times { |n| page.should have_content("Ugisozols#{n} user was added") }
|
47
45
|
3.times { |n| page.should have_content("Refinery cms #{n} page was added") }
|
48
46
|
end
|
@@ -56,7 +54,7 @@ describe "dashboard" do
|
|
56
54
|
|
57
55
|
visit refinery.admin_dashboard_path
|
58
56
|
|
59
|
-
page.should have_selector("a[href='#{refinery.edit_admin_page_path(nested.
|
57
|
+
page.should have_selector("a[href='#{refinery.edit_admin_page_path(nested.nested_url)}']")
|
60
58
|
end
|
61
59
|
end
|
62
60
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinerycms-dashboard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philip Arndt
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-08-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: refinerycms-core
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 2.0
|
21
|
+
version: 2.1.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 2.0
|
28
|
+
version: 2.1.0
|
29
29
|
description: The dashboard is usually the first extension the user sees in the backend
|
30
30
|
of Refinery CMS. It displays useful information and contains links to common functionality.
|
31
31
|
email: info@refinerycms.com
|
@@ -51,6 +51,7 @@ files:
|
|
51
51
|
- config/locales/es.yml
|
52
52
|
- config/locales/fi.yml
|
53
53
|
- config/locales/fr.yml
|
54
|
+
- config/locales/hu.yml
|
54
55
|
- config/locales/it.yml
|
55
56
|
- config/locales/ja.yml
|
56
57
|
- config/locales/ko.yml
|
@@ -60,11 +61,14 @@ files:
|
|
60
61
|
- config/locales/nl.yml
|
61
62
|
- config/locales/pl.yml
|
62
63
|
- config/locales/pt-BR.yml
|
64
|
+
- config/locales/pt.yml
|
63
65
|
- config/locales/rs.yml
|
64
66
|
- config/locales/ru.yml
|
65
67
|
- config/locales/sk.yml
|
66
68
|
- config/locales/sl.yml
|
67
69
|
- config/locales/sv.yml
|
70
|
+
- config/locales/tr.yml
|
71
|
+
- config/locales/uk.yml
|
68
72
|
- config/locales/vi.yml
|
69
73
|
- config/locales/zh-CN.yml
|
70
74
|
- config/locales/zh-TW.yml
|
@@ -75,7 +79,7 @@ files:
|
|
75
79
|
- lib/refinerycms-dashboard.rb
|
76
80
|
- license.md
|
77
81
|
- refinerycms-dashboard.gemspec
|
78
|
-
- spec/
|
82
|
+
- spec/features/refinery/admin/dashboard_spec.rb
|
79
83
|
homepage: http://refinerycms.com
|
80
84
|
licenses:
|
81
85
|
- MIT
|
@@ -101,4 +105,4 @@ signing_key:
|
|
101
105
|
specification_version: 4
|
102
106
|
summary: Dashboard extension for Refinery CMS
|
103
107
|
test_files:
|
104
|
-
- spec/
|
108
|
+
- spec/features/refinery/admin/dashboard_spec.rb
|