refinerycms-dashboard 0.9.9.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,38 @@
1
+ module Admin
2
+ class DashboardController < Admin::BaseController
3
+
4
+ def index
5
+ @recent_activity = []
6
+
7
+ Refinery::Plugins.active.each do |plugin|
8
+ begin
9
+ plugin.activity.each do |activity|
10
+ @recent_activity << activity.class.where(activity.conditions).
11
+ order(activity.order).
12
+ limit(activity.limit).
13
+ all
14
+ end
15
+ rescue
16
+ logger.warn "#{$!.class.name} raised while getting recent activity for dashboard."
17
+ logger.warn $!.message
18
+ logger.warn $!.backtrace.collect { |b| " > #{b}" }.join("\n")
19
+ end
20
+ end
21
+
22
+ @recent_activity = @recent_activity.flatten.compact.sort { |x,y|
23
+ y.updated_at <=> x.updated_at
24
+ }.first(activity_show_limit=RefinerySetting.find_or_set(:activity_show_limit, 7))
25
+
26
+ @recent_inquiries = defined?(Inquiry) ? Inquiry.latest(activity_show_limit) : []
27
+ end
28
+
29
+ def disable_upgrade_message
30
+ RefinerySetting.update_all({ :value => false }, {
31
+ :name => 'show_internet_explorer_upgrade_message',
32
+ :scoping => 'refinery'
33
+ })
34
+ render :nothing => true
35
+ end
36
+
37
+ end
38
+ end
@@ -0,0 +1,24 @@
1
+ module Admin
2
+ module DashboardHelper
3
+
4
+ def activity_message_for(record)
5
+ plugin = Refinery::Plugins.active.find_by_model(record.class)
6
+
7
+ if (activity = plugin.activity.first).present?
8
+ # work out which action occured
9
+ action = record.updated_at.eql?(record.created_at) ? "created" : "updated"
10
+
11
+ # get article to define gender of model name, some languages require this for proper grammar
12
+ article = t('article', :scope => "plugins.#{plugin.name}.", :default => 'the')
13
+
14
+ # now create a link to the notification's corresponding record.
15
+ link_to t(".latest_activity_message",
16
+ :what => record.send(activity.title),
17
+ :kind => record.class.model_name.human,
18
+ :action => t("with_article \"#{article}\"", :scope => action)
19
+ ).downcase.capitalize, eval("#{activity.url}(#{activity.nesting("record")}record)")
20
+ end
21
+ end
22
+
23
+ end
24
+ end
@@ -0,0 +1 @@
1
+ <%# Add items here to have them appear on your dashboard's right hand side menu %>
@@ -0,0 +1,14 @@
1
+ <div id='recent_activity'>
2
+ <h2><%= t('.latest_activity').titleize %></h2>
3
+ <% if (activity = @recent_activity.collect{|a| activity_message_for(a) rescue ''}.reject(&:blank?)).present? %>
4
+ <ul class='clickable'>
5
+ <% activity.each do |message| %>
6
+ <li class='<%= cycle("on", "on-hover", :name => 'recent_activity_cycle') %>'>
7
+ <%= message.html_safe %>
8
+ </li>
9
+ <% end %>
10
+ </ul>
11
+ <% else %>
12
+ <%= t('.empty') %>
13
+ <% end %>
14
+ </div>
@@ -0,0 +1,11 @@
1
+ <div id='recent_inquiries'>
2
+ <h2><%= t('.latest_inquiries').titleize %></h2>
3
+ <ul class='clickable'>
4
+ <% @recent_inquiries.each do |inquiry| %>
5
+ <li class='<%= cycle("on", "on-hover", :name => 'recent_inquiries_cycle') %>'>
6
+ <%= link_to truncate("#{inquiry.name} - #{inquiry.message}", :length => 100),
7
+ admin_inquiry_url(inquiry) %>
8
+ </li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
@@ -0,0 +1,70 @@
1
+ <div class='clearfix'>
2
+ <div id='records' class='clearfix<%= ' one_list' if @recent_activity.empty? or @recent_inquiries.empty? %>'>
3
+ <%= render :partial => "recent_activity" if @recent_activity.present? %>
4
+ <%= render :partial => "recent_inquiries" if @recent_inquiries.present? %>
5
+ </div>
6
+ <div id='actions'>
7
+ <h2><%= t('.quick_tasks').titleize %></h2>
8
+ <ul>
9
+ <% if Refinery::Plugins.active.names.include?("refinery_pages") %>
10
+ <li>
11
+ <%= link_to t('.add_a_new_page'),
12
+ new_admin_page_path,
13
+ :class => "add_icon" %>
14
+ </li>
15
+ <li>
16
+ <%= link_to t('.update_a_page'),
17
+ admin_pages_path,
18
+ :class => "edit_icon" %>
19
+ </li>
20
+ <% end %>
21
+ <% if Refinery::Plugins.active.names.include?("refinery_files") %>
22
+ <li>
23
+ <%= link_to t('.upload_a_file'),
24
+ new_admin_resource_path(:dialog => true,
25
+ :width => 600,
26
+ :height => 300),
27
+ :class => "add_icon" %>
28
+ </li>
29
+ <% end %>
30
+ <% if Refinery::Plugins.active.names.include?("refinery_images") %>
31
+ <li>
32
+ <%= link_to t('.upload_a_image'),
33
+ new_admin_image_path(:dialog => true,
34
+ :width => 600,
35
+ :height => 300),
36
+ :class => "add_icon" %>
37
+ </li>
38
+ <% end %>
39
+ <%= render :partial => 'additional_dashboard_menu_items' %>
40
+ </ul>
41
+
42
+ <% if defined?(::Refinery::I18n) and ::Refinery::I18n.enabled? %>
43
+ <% locales = ::Refinery::I18n.locales.clone %>
44
+ <% current_locale = ::I18n.locale %>
45
+ <% current_locale_title = locales.delete(current_locale) %>
46
+ <ul id='current_locale'>
47
+ <li>
48
+ <%= link_to "#", :style => "background-image: url('/images/refinery/icons/flags/#{current_locale}.png');" do %>
49
+ <%= current_locale_title.respond_to?(:force_encoding) ? current_locale_title.force_encoding('utf-8') : current_locale_title %>
50
+ <span><%= t('.change_language') %></span>
51
+ <span style='display:none;'><%= t('cancel', :scope => 'shared.admin.form_actions') %></span>
52
+ <% end %>
53
+ </li>
54
+ </ul>
55
+ <ul id='other_locales' style='display: none'>
56
+ <% locales.sort_by{|key, value| value}.each do |locale, locale_title| %>
57
+ <li>
58
+ <%= link_to locale_title.respond_to?(:force_encoding) ? locale_title.force_encoding('utf-8') : locale_title,
59
+ params.dup.tap { |p| p[:set_locale] = locale },
60
+ :style => "background-image: url('/images/refinery/icons/flags/#{locale}.png');" %>
61
+ </li>
62
+ <% end %>
63
+ </ul>
64
+ <% end %>
65
+ </div>
66
+ </div>
67
+ <% if request.env["HTTP_USER_AGENT"] =~ /MSIE/ and
68
+ RefinerySetting.find_or_set(:show_internet_explorer_upgrade_message, true, :scoping => 'refinery') %>
69
+ <% flash.now[:message] = render(:partial => "/shared/ie6check") %>
70
+ <% end %>
@@ -0,0 +1,26 @@
1
+ xml.instruct! :xml, :version => "1.0"
2
+ xml.rss :version => "2.0", "xmlns:atom" => "http://www.w3.org/2005/Atom" do
3
+ xml.channel do
4
+ # Required to pass W3C validation.
5
+ xml.atom :link, nil, {
6
+ :href => admin_dashboard_index_url(:format => 'rss'),
7
+ :rel => 'self', :type => 'application/rss+xml'
8
+ }
9
+
10
+ # Feed basics.
11
+ xml.title "Refinery Updates"
12
+ xml.description "See the recent activity on your Refinery site."
13
+ xml.link admin_dashboard_index_url(:format => 'rss')
14
+
15
+ # Recent activity.
16
+ @recent_activity.each do |change|
17
+ xml.item do
18
+ xml.title change.class
19
+ #xml.link link
20
+ xml.description activity_message_for change
21
+ #xml.pubDate date.to_s(:rfc822)
22
+ #xml.guid unique
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,25 @@
1
+ cs:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: Nástěnka
5
+ description: Přehled akcí provedených v administraci
6
+ admin:
7
+ dashboard:
8
+ index:
9
+ quick_tasks: Rychlé příkazy
10
+ add_a_new_page: Přidat novou stránku
11
+ update_a_page: Upravit stránku
12
+ upload_a_image: Nahrát obrázek
13
+ upload_a_file: Nahrát soubor
14
+ change_language: Změnit jazyk
15
+ see_home_page: Zobrazit titulní stránku
16
+ recent_activity:
17
+ empty: V poslední době nebyla provedena žádná akce.
18
+ latest_activity: Nejnovější akce
19
+ latest_activity_message: %{what} %{kind} byla %{action}
20
+ recent_inquiries:
21
+ latest_inquiries: Nejnovější dotazy z webu
22
+ updated:
23
+ 'with_article "the"': upraven
24
+ created:
25
+ 'with_article "the"': přidán
@@ -0,0 +1,25 @@
1
+ da:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: Overblik
5
+ description: Giver et overblik over aktiviteterne i Refinery
6
+ admin:
7
+ dashboard:
8
+ index:
9
+ quick_tasks: Handlinger
10
+ add_a_new_page: Tilføj en ny side
11
+ update_a_page: Redigér en side
12
+ upload_a_image: Upload et billede
13
+ upload_a_file: Upload en fil
14
+ change_language: Skift sprog
15
+ see_home_page: Vis forside
16
+ recent_activity:
17
+ empty: Der her ingen aktititeter været for nylig.
18
+ latest_activity: Seneste aktiviteter
19
+ latest_activity_message: %{what} %{kind} blev %{action}
20
+ recent_inquiries:
21
+ latest_inquiries: Seneste henvendelser
22
+ updated:
23
+ 'with_article "the"': opdateret
24
+ created:
25
+ 'with_article "the"': oprettet
@@ -0,0 +1,25 @@
1
+ de:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: Armaturenbrett
5
+ description: Gibt eine Übersicht über Aktivitäten in Refinery
6
+ admin:
7
+ dashboard:
8
+ index:
9
+ quick_tasks: Allgemeine Aufgaben
10
+ add_a_new_page: Neue Seite erstellen
11
+ update_a_page: Eine Seite aktualisieren
12
+ upload_a_image: Ein Bild hochladen
13
+ upload_a_file: Eine Datei hochladen
14
+ change_language: Sprache wechseln
15
+ see_home_page: Homepage ansehen
16
+ recent_activity:
17
+ empty: Zuletzt gab es keine Aktivitäten.
18
+ latest_activity: Letzte Aktivität
19
+ latest_activity_message: %{what} %{kind} wurde %{action}
20
+ recent_inquiries:
21
+ latest_inquiries: Letzte Anfragen
22
+ updated:
23
+ 'with_article "the"': aktualisiert
24
+ created:
25
+ 'with_article "the"': erstellt
@@ -0,0 +1,25 @@
1
+ el:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: Πανόπτης
5
+ description: Περίληψη δραστηριοτήτων στο Refinery
6
+ admin:
7
+ dashboard:
8
+ index:
9
+ quick_tasks: Γρήγορες ενέργειες
10
+ add_a_new_page: Προσθήκη σελίδας
11
+ update_a_page: Ενημέρωση σελίδας
12
+ upload_a_image: Μεταφόρτωση εικόνας
13
+ upload_a_file: Μεταφόρτωση αρχείου
14
+ change_language: Επιλογή γλώσσας
15
+ see_home_page: Προβολή αρχικής
16
+ recent_activity:
17
+ empty: Δεν υπάρχει πρόσφατη δραστηριότητα.
18
+ latest_activity: Τελευταίες δραστηριότητες
19
+ latest_activity_message: %{what} %{kind} ήταν %{action}
20
+ recent_inquiries:
21
+ latest_inquiries: Τελευταία μηνύματα
22
+ updated:
23
+ 'with_article "the"': ενημερώθηκε
24
+ created:
25
+ 'with_article "the"': προστέθηκε
@@ -0,0 +1,25 @@
1
+ en:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: Dashboard
5
+ description: Gives an overview of activity in Refinery
6
+ admin:
7
+ dashboard:
8
+ index:
9
+ quick_tasks: Quick tasks
10
+ add_a_new_page: Add a new page
11
+ update_a_page: Update a page
12
+ upload_a_image: Upload an image
13
+ upload_a_file: Upload a file
14
+ change_language: Change language
15
+ see_home_page: See home page
16
+ recent_activity:
17
+ empty: There has not been any activity recently.
18
+ latest_activity: Latest activity
19
+ latest_activity_message: %{what} %{kind} was %{action}
20
+ recent_inquiries:
21
+ latest_inquiries: Latest inquiries
22
+ updated:
23
+ 'with_article "the"': updated
24
+ created:
25
+ 'with_article "the"': added
@@ -0,0 +1,28 @@
1
+ es:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: Panel de control
5
+ admin:
6
+ dashboard:
7
+ index:
8
+ quick_tasks: Tareas comunes
9
+ add_a_new_page: Añadir nueva página
10
+ update_a_page: Actualizar una página
11
+ upload_a_image: Subir una imagen
12
+ upload_a_file: Subir un archivo
13
+ change_language: Cambiar el idioma
14
+ see_home_page: Ver la página principal
15
+ recent_activity:
16
+ empty: No hay actividad reciente.
17
+ latest_activity: Última actividad
18
+ latest_activity_message: %{kind} %{what} ha sido %{action}
19
+ recent_inquiries:
20
+ latest_inquiries: Últimas solicitudes
21
+ updated:
22
+ 'with_article "las"': actualizadas
23
+ 'with_article "los"': actualizados
24
+ 'with_article "the"': actualizado
25
+ created:
26
+ 'with_article "las"': creadas
27
+ 'with_article "los"': creados
28
+ 'with_article "the"': creado
@@ -0,0 +1,25 @@
1
+ fr:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: Tableau de bord
5
+ description: Donne un aperçu des activités de votre site.
6
+ admin:
7
+ dashboard:
8
+ index:
9
+ quick_tasks: Tâches courantes
10
+ add_a_new_page: Ajouter une page
11
+ update_a_page: Mettre à jour une page
12
+ upload_a_image: Ajouter une image
13
+ upload_a_file: Ajouter un fichier
14
+ change_language: Changer la langue
15
+ see_home_page: Aller à la page d'accueil
16
+ recent_activity:
17
+ empty: Il n'y a pas eu d'activité récemment
18
+ latest_activity: Derniers changements
19
+ latest_activity_message: "%{kind} '%{what}' a été %{action}"
20
+ recent_inquiries:
21
+ latest_inquiries: Dernières requêtes
22
+ updated:
23
+ 'with_article "the"': mis(e) à jour
24
+ created:
25
+ 'with_article "the"': créé(e)
@@ -0,0 +1,27 @@
1
+ it:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: Cruscotto
5
+ admin:
6
+ dashboard:
7
+ index:
8
+ quick_tasks: Attività comuni
9
+ add_a_new_page: Aggiungere una nuova pagina
10
+ update_a_page: Aggiornamento di una pagina
11
+ upload_a_image: Carica un immagine
12
+ upload_a_file: Carica un file
13
+ change_language: Cambia lingua
14
+ see_home_page: Vedi pagina iniziale
15
+ recent_activity:
16
+ empty: non c'è stata nessuna attivitá recente
17
+ latest_activity: Ultime attività
18
+ latest_activity_message: %{what} %{kind} è stato %{action}
19
+ see: Vedere '%{what}'
20
+ recent_inquiries:
21
+ latest_inquiries: Ultimi messaggi
22
+ updated:
23
+ 'with_article "the"': aggiornato
24
+ created:
25
+ 'with_article "the"': creato
26
+ ago: "%{time} fa"
27
+ see: Vedere
@@ -0,0 +1,24 @@
1
+ lolcat:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: DASHBORD
5
+ description: GIVEZ AN OVERVIEW OV ACTIVITY IN REFINERY
6
+ admin:
7
+ dashboard:
8
+ index:
9
+ quick_tasks: QUICK TASKZ
10
+ add_a_new_page: ADD NEW PAEG
11
+ update_a_page: UPDATE PAEG
12
+ upload_a_image: UPLOAD AN IMAGE
13
+ upload_a_file: UPLOAD FILE
14
+ change_language: CHANGE LANGUAGE
15
+ see_home_page: C HOME PAEG
16
+ recent_activity:
17
+ latest_activity: LATEST ACTIVITY
18
+ latest_activity_message: %{what} %{kind} WUZ %{action}
19
+ recent_inquiries:
20
+ latest_inquiries: LATEST INQUIRIEZ
21
+ updated:
22
+ 'with_article "the"': UPDATD
23
+ created:
24
+ 'with_article "the"': ADDD
@@ -0,0 +1,25 @@
1
+ lt:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: Valdymo skydelis
5
+ description: Pateikia Refinery aktyvumo apžvalgą
6
+ admin:
7
+ dashboard:
8
+ index:
9
+ quick_tasks: Greiti veiksmai
10
+ add_a_new_page: Pridėti naują puslapį
11
+ update_a_page: Atnaujinti puslapį
12
+ upload_a_image: Įkelti paveikslėlį
13
+ upload_a_file: Įkelti failą
14
+ change_language: Pakeisti kalbą
15
+ see_home_page: Peržiūrėti titulinį puslapį
16
+ recent_activity:
17
+ empty: Paskutiniu metu niekas neįvyko.
18
+ latest_activity: Naujausi įvykiai
19
+ latest_activity_message: %{what} %{kind} buvo %{action}
20
+ recent_inquiries:
21
+ latest_inquiries: Naujausios užklausos
22
+ updated:
23
+ 'with_article "the"': atnaujintas
24
+ created:
25
+ 'with_article "the"': pridėtas
@@ -0,0 +1,27 @@
1
+ lv:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: Vadības panelis
5
+ description: Aktivitāšu apkopojums iekš Refinery
6
+ admin:
7
+ dashboard:
8
+ index:
9
+ quick_tasks: Ātrie uzdevumi
10
+ add_a_new_page: Pievienot jaunu lapu
11
+ update_a_page: Atjaunināt lapu
12
+ upload_a_image: Augšupielādēt bildi
13
+ upload_a_file: Augšupielādēt failu
14
+ change_language: Mainīt valodu
15
+ see_home_page: Skatīt sākuma lapu
16
+ recent_activity:
17
+ empty: Nav bijusi neviena aktivitāte.
18
+ latest_activity: Jaunākās aktivitātes
19
+ latest_activity_message: "%{action} %{what} %{kind}"
20
+ recent_inquiries:
21
+ latest_inquiries: Jaunākie pieprasījumi
22
+ updated:
23
+ 'with_article "s"': atjaunota
24
+ 'with_article "the"': atjaunots
25
+ created:
26
+ 'with_article "s"': izveidota
27
+ 'with_article "the"': izveidots
@@ -0,0 +1,25 @@
1
+ nb:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: Skrivebord
5
+ description: Gir en oversikt over den siste aktiviteten i Refinery
6
+ admin:
7
+ dashboard:
8
+ index:
9
+ quick_tasks: Vanlige oppgaver
10
+ add_a_new_page: Legg til en ny side
11
+ update_a_page: Oppdater en side
12
+ upload_a_image: Last opp et bilde
13
+ upload_a_file: Last opp en fil
14
+ change_language: Endre språk
15
+ see_home_page: Se hjemmesiden
16
+ recent_activity:
17
+ empty: Det har ikke vært noen aktivitet her i det siste.
18
+ latest_activity: Siste aktivitet
19
+ latest_activity_message: "%{what} %{kind} ble %{action}"
20
+ recent_inquiries:
21
+ latest_inquiries: Siste forespørsler
22
+ updated:
23
+ 'with_article "the"': oppdatert
24
+ created:
25
+ 'with_article "the"': opprettet
@@ -0,0 +1,25 @@
1
+ nl:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: Overzicht
5
+ description: Gives an overview of activity in Refinery
6
+ admin:
7
+ dashboard:
8
+ index:
9
+ quick_tasks: Algemene taken
10
+ add_a_new_page: Voeg een nieuwe pagina toe
11
+ update_a_page: Bewerk een pagina
12
+ upload_a_image: Upload een afbeelding
13
+ upload_a_file: Upload een bestand
14
+ change_language: Verander de taal
15
+ see_home_page: Bezoek de homepage
16
+ recent_activity:
17
+ empty: Er hebben zich recentelijk geen activiteiten voorgedaan.
18
+ latest_activity: Laatste wijzigingen
19
+ latest_activity_message: %{what} %{kind} is %{action}
20
+ recent_inquiries:
21
+ latest_inquiries: Latest inquiries
22
+ updated:
23
+ 'with_article "the"': bewerkt
24
+ created:
25
+ 'with_article "the"': aangemaakt
@@ -0,0 +1,29 @@
1
+ pl:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: Pulpit
5
+ description: Przegląd aktywności w Refinery
6
+ admin:
7
+ dashboard:
8
+ index:
9
+ quick_tasks: Szybkie zadania
10
+ add_a_new_page: Dodaj nową stronę
11
+ update_a_page: Aktualizuj stronę
12
+ upload_a_image: Wgraj obrazek
13
+ upload_a_file: Wgraj plik
14
+ change_language: Zmień język
15
+ see_home_page: Zobacz stronę główną
16
+ recent_activity:
17
+ empty: Nie było ostatnio żadnej aktywności.
18
+ latest_activity: Najnowsza aktywność
19
+ latest_activity_message: %{kind} %{what} %{action}
20
+ recent_inquiries:
21
+ latest_inquiries: Najnowsze zapytania
22
+ updated:
23
+ 'with_article "masculine"': został uaktualniony
24
+ 'with_article "feminine"': została uaktualniona
25
+ 'with_article "neutral"': zostało uaktualnione
26
+ created:
27
+ 'with_article "masculine"': został dodany
28
+ 'with_article "feminine"': została dodana
29
+ 'with_article "neutral"': zostało dodane
@@ -0,0 +1,29 @@
1
+ pt-BR:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: Painel
5
+ description: Mostra um sumário das atividades no sistema
6
+ admin:
7
+ dashboard:
8
+ index:
9
+ quick_tasks: Tarefas comuns
10
+ add_a_new_page: Adicionar uma nova página
11
+ update_a_page: Atualizar uma página
12
+ upload_a_image: Enviar uma imagem
13
+ upload_a_file: Enviar um arquivo
14
+ change_language: Mudar Língua
15
+ see_home_page: Ver página inicial
16
+ recent_activity:
17
+ empty: Não houve atividades recentemente.
18
+ latest_activity: Atividades Recentes
19
+ latest_activity_message: %{kind} %{what} foi %{action}
20
+ recent_inquiries:
21
+ latest_inquiries: Últimas mensagens
22
+ updated:
23
+ 'with_article "a"': atualizada
24
+ 'with_article "o"': atualizado
25
+ 'with_article "the"': atualizado
26
+ created:
27
+ 'with_article "a"': criada
28
+ 'with_article "o"': criado
29
+ 'with_article "the"': criado
@@ -0,0 +1,26 @@
1
+ rs:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: Kontrolna tabla
5
+ description: Omogućava pregled aktivnosti Refinery-ja
6
+ admin:
7
+ dashboard:
8
+ index:
9
+ quick_tasks: Brzi zadaci
10
+ add_a_new_page: Dodaj novu stranu
11
+ update_a_page: Izmeni stranu
12
+ upload_a_image: Upload-uj sliku
13
+ upload_a_file: Upload-uj fajl
14
+ change_language: Promeni jezik
15
+ see_home_page: Otvori home stranu
16
+ recent_activity:
17
+ empty: Nije bilo aktivnosti u skorije vreme.
18
+ latest_activity: Poslednja aktivnost
19
+ latest_activity_message: %{what} %{kind} je %{action}
20
+ recent_inquiries:
21
+ latest_inquiries: Poslednja pitanja
22
+ updated:
23
+ 'with_article "the"': izmenjen(a)
24
+ created:
25
+ 'with_article "the"': dodat(a)
26
+
@@ -0,0 +1,29 @@
1
+ ru:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: Сводка
5
+ description: Обзор последних действий в Refinery
6
+ admin:
7
+ dashboard:
8
+ index:
9
+ quick_tasks: Быстрые задачи
10
+ add_a_new_page: Добавить новую страницу
11
+ update_a_page: Изменить страницу
12
+ upload_a_image: Загрузить изображение
13
+ upload_a_file: Загрузить файл
14
+ change_language: Сменить язык
15
+ see_home_page: Просмотреть домашнюю страницу
16
+ recent_activity:
17
+ latest_activity: Последние действия
18
+ latest_activity_message: "%{action} %{kind} «%{what}»"
19
+ recent_inquiries:
20
+ latest_inquiries: Последние запросы
21
+ updated:
22
+ 'with_article "masculine"': Обновлен
23
+ 'with_article "feminine"': Обновлена
24
+ 'with_article "neuter"': Обновлено
25
+ created:
26
+ 'with_article "masculine"': Добавлен
27
+ 'with_article "feminine"': Добавлена
28
+ 'with_article "neuter"': Добавлено
29
+
@@ -0,0 +1,24 @@
1
+ sl:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: Nadzorna plošča
5
+ admin:
6
+ dashboard:
7
+ index:
8
+ quick_tasks: Pogosta opravila
9
+ add_a_new_page: Dodaj novo stran
10
+ update_a_page: Uredi stran
11
+ upload_a_image: Naloži sliko
12
+ upload_a_file: Naloži datoteko
13
+ change_language: Spremeni Jezik
14
+ see_home_page: Poglej domačo stran
15
+ recent_activity:
16
+ empty: V zadnjem času ni bilo nobene aktivnosti.
17
+ latest_activity: Zadnje aktivnosti
18
+ see: Poglej '%{what}'
19
+ recent_inquiries:
20
+ latest_inquiries: Latest inquiries
21
+ updated:
22
+ 'with_article "the"': posodobitev
23
+ created:
24
+ 'with_article "the"': ustvarjena
@@ -0,0 +1,25 @@
1
+ sv:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: Dashboard
5
+ description: Ger en översikt över aktivitet i Refinery
6
+ admin:
7
+ dashboard:
8
+ index:
9
+ quick_tasks: Genvägar
10
+ add_a_new_page: Lägg till en ny sida
11
+ update_a_page: Redigera en sida
12
+ upload_a_image: Ladda upp en bild
13
+ upload_a_file: Ladda upp en fil
14
+ change_language: Välj språk
15
+ see_home_page: Se förstasidan
16
+ recent_activity:
17
+ empty: Det har inte varit någon aktivitet på senare tid.
18
+ latest_activity: Senaste aktivitet
19
+ latest_activity_message: %{what} %{kind} var %{action}
20
+ recent_inquiries:
21
+ latest_inquiries: Senaste utredningarna
22
+ updated:
23
+ 'with_article "the"': uppdaterades
24
+ created:
25
+ 'with_article "the"': lades till
@@ -0,0 +1,25 @@
1
+ vi:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: Dashboard
5
+ description: Cung cấp cái nhìn tổng quan về các hoạt động của Refinery
6
+ admin:
7
+ dashboard:
8
+ index:
9
+ quick_tasks: Truy cập nhanh các tác vụ
10
+ add_a_new_page: Thêm một trang mới
11
+ update_a_page: Cập nhật một trang
12
+ upload_a_image: Upload một tệp hình ảnh
13
+ upload_a_file: Upload một tệp
14
+ change_language: Thay đổi ngôn ngữ
15
+ see_home_page: Xem trang chủ
16
+ recent_activity:
17
+ empty: Không có hoạt động gì gần đây.
18
+ latest_activity: Các hoạt động mới nhất
19
+ latest_activity_message: %{what} %{kind} là %{action}
20
+ recent_inquiries:
21
+ latest_inquiries: Các truy vấn mới nhất
22
+ updated:
23
+ 'with_article "the"': đã được cập nhật
24
+ created:
25
+ 'with_article "the"': đã được thêm mới
@@ -0,0 +1,25 @@
1
+ zh-CN:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: 主面板
5
+ description: 提供 Refinery 上的活动概览
6
+ admin:
7
+ dashboard:
8
+ index:
9
+ quick_tasks: 快速任务
10
+ add_a_new_page: 添加页面
11
+ update_a_page: 更新页面
12
+ upload_a_image: 上传图片
13
+ upload_a_file: 上传文件
14
+ change_language: 改变语言
15
+ see_home_page: 查看主页
16
+ recent_activity:
17
+ empty: 近期没有任何活动.
18
+ latest_activity: 近期活动
19
+ latest_activity_message: %{action}了 %{kind} %{what}
20
+ recent_inquiries:
21
+ latest_inquiries: 近期的来询
22
+ updated:
23
+ 'with_article "the"': 更新
24
+ created:
25
+ 'with_article "the"': 添加
@@ -0,0 +1,25 @@
1
+ zh-TW:
2
+ plugins:
3
+ refinery_dashboard:
4
+ title: 控制面板
5
+ description: 提供 Refinery 上的活動總覽
6
+ admin:
7
+ dashboard:
8
+ index:
9
+ quick_tasks: 快速啟動
10
+ add_a_new_page: 新增頁面
11
+ update_a_page: 更新頁面
12
+ upload_a_image: 上傳圖片
13
+ upload_a_file: 上傳檔案
14
+ change_language: 改變語言
15
+ see_home_page: 瀏覽首頁
16
+ recent_activity:
17
+ empty: 最近沒有發生任何活動.
18
+ latest_activity: 最新活動
19
+ latest_activity_message: %{what} %{kind} 被%{action}
20
+ recent_inquiries:
21
+ latest_inquiries: 最新查詢
22
+ updated:
23
+ 'with_article "the"': 更新
24
+ created:
25
+ 'with_article "the"': 新增
data/config/routes.rb ADDED
@@ -0,0 +1,11 @@
1
+ ::Refinery::Application.routes.draw do
2
+ scope(:path => 'refinery', :as => 'admin', :module => 'admin') do
3
+ match 'dashboard',
4
+ :to => 'dashboard#index',
5
+ :as => :dashboard
6
+
7
+ match 'disable_upgrade_message',
8
+ :to => 'dashboard#disable_upgrade_message',
9
+ :as => :disable_upgrade_message
10
+ end
11
+ end
@@ -0,0 +1,35 @@
1
+ @refinerycms @dashboard
2
+ Feature: Dashboard
3
+ In order to see recent changes to my website
4
+ As an administrator
5
+ I want to use the dashboard
6
+
7
+ Background:
8
+ Given I am a logged in refinery user
9
+ When I go to the Dashboard
10
+
11
+ @dashboard-add
12
+ Scenario: Add New Page Button
13
+ Given I have no pages
14
+ When I follow "Add a new page"
15
+ Then I should be on the new page form
16
+ When I fill in "Title" with "Page test from Dashboard"
17
+ And I press "Save"
18
+ Then I should be on the Dashboard
19
+ And I should see "'Page test from Dashboard' was successfully added."
20
+ And I should have 1 page
21
+
22
+ @dashboard-edit
23
+ Scenario: Update a Page Button
24
+ When I follow "Update a page"
25
+ Then I should be on the list of pages
26
+
27
+ @dashboard-edit
28
+ Scenario: Upload a File Button
29
+ When I follow "Upload a file"
30
+ Then I should be on the new file form
31
+
32
+ @dashboard-edit
33
+ Scenario: Upload an Image Button
34
+ When I follow "Upload an image"
35
+ Then I should be on the new image form
@@ -0,0 +1,14 @@
1
+ module NavigationHelpers
2
+ module Refinery
3
+ module Dashboard
4
+ def path_to(page_name)
5
+ case page_name
6
+ when /the (d|D)ashboard/
7
+ admin_dashboard_path
8
+ else
9
+ nil
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
data/lib/gemspec.rb ADDED
@@ -0,0 +1,33 @@
1
+ require 'pathname'
2
+ gempath = Pathname.new(File.expand_path('../../', __FILE__))
3
+ require gempath.join('..', 'base', 'lib', 'base', 'refinery')
4
+
5
+ gemspec = <<EOF
6
+ # DO NOT EDIT THIS FILE DIRECTLY! Instead, use lib/gemspec.rb to generate it.
7
+
8
+ Gem::Specification.new do |s|
9
+ s.name = %q{#{gemname = 'refinerycms-dashboard'}}
10
+ s.version = %q{#{::Refinery.version}}
11
+ s.summary = %q{Dashboard engine for Refinery CMS}
12
+ s.description = %q{The dashboard is usually the first engine the user sees in the backend of Refinery CMS. It displays useful information and contains links to common functionality.}
13
+ s.date = %q{#{Time.now.strftime('%Y-%m-%d')}}
14
+ s.email = %q{info@refinerycms.com}
15
+ s.homepage = %q{http://refinerycms.com}
16
+ s.rubyforge_project = %q{refinerycms}
17
+ s.authors = ['Resolve Digital', 'Philip Arndt', 'David Jones', 'Steven Heidel']
18
+ s.license = %q{MIT}
19
+ s.require_paths = %w(lib)
20
+ s.executables = %w(#{Pathname.glob(gempath.join('bin/*')).map{|d| d.relative_path_from(gempath)}.sort.join(" ")})
21
+
22
+ s.files = [
23
+ '#{%w( **/{*,.rspec,.gitignore,.yardopts} ).map { |file| Pathname.glob(gempath.join(file)) }.flatten.reject{|f|
24
+ !f.exist? or f.to_s =~ /\.gem$/ or (f.directory? and f.children.empty?)
25
+ }.map{|d| d.relative_path_from(gempath)}.uniq.sort.join("',\n '")}'
26
+ ]
27
+
28
+ s.add_dependency 'refinerycms-core', '~> #{::Refinery::Version}'
29
+ end
30
+ EOF
31
+
32
+ (gemfile = gempath.join("#{gemname}.gemspec")).open('w') {|f| f.puts(gemspec)}
33
+ puts `cd #{gempath} && gem build #{gemfile}` if ARGV.any?{|a| a == "BUILD=true"}
@@ -0,0 +1,28 @@
1
+ module Refinery
2
+ module Dashboard
3
+ class << self
4
+ attr_accessor :root
5
+ def root
6
+ @root ||= Pathname.new(File.expand_path('../../', __FILE__))
7
+ end
8
+ end
9
+
10
+ class Engine < ::Rails::Engine
11
+
12
+ config.after_initialize do
13
+ ::Refinery::Plugin.register do |plugin|
14
+ plugin.name = "refinery_dashboard"
15
+ plugin.url = {:controller => '/admin/dashboard', :action => 'index'}
16
+ plugin.menu_match = /(admin|refinery)\/(refinery_)?dashboard$/
17
+ plugin.directory = "dashboard"
18
+ plugin.version = %q{0.9.9}
19
+ plugin.always_allow_access = true
20
+ plugin.dashboard = true
21
+ end
22
+ end
23
+
24
+ end
25
+ end
26
+ end
27
+
28
+ ::Refinery.engines << 'dashboard'
data/license.md ADDED
@@ -0,0 +1,21 @@
1
+ # MIT License
2
+
3
+ Copyright (c) 2005-2010 [Resolve Digital](http://www.resolvedigital.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/readme.md ADDED
@@ -0,0 +1,22 @@
1
+ # Dashboard
2
+
3
+ ![Refinery Dashboard](http://refinerycms.com/system/images/0000/0576/dashboard.png)
4
+
5
+ ## About
6
+
7
+ Refinery's dashboard is a plugin that does two simple things
8
+
9
+ * Reports recent activity on all the core and custom plugins
10
+ * Provides convenient links to common tasks.
11
+
12
+ ## How do I Hook my Custom Plugin into the Recent Activity log?
13
+
14
+ Read ["Getting your Plugin to Report Activity in the Dashboard"](http://github.com/resolve/refinerycms/blob/master/vendor/plugins/refinery/plugins.md) in the Plugin documentation.
15
+
16
+ ## Related Settings
17
+
18
+ ### "Activity Show Limit"
19
+
20
+ This allows you to specify how many items should show up in your recent activity list.
21
+
22
+ Example: if we set the activity show limit to 5, only 5 items will show in the recent activity.
@@ -0,0 +1,72 @@
1
+ # DO NOT EDIT THIS FILE DIRECTLY! Instead, use lib/gemspec.rb to generate it.
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{refinerycms-dashboard}
5
+ s.version = %q{0.9.9.1}
6
+ s.summary = %q{Dashboard engine for Refinery CMS}
7
+ s.description = %q{The dashboard is usually the first engine the user sees in the backend of Refinery CMS. It displays useful information and contains links to common functionality.}
8
+ s.date = %q{2011-02-15}
9
+ s.email = %q{info@refinerycms.com}
10
+ s.homepage = %q{http://refinerycms.com}
11
+ s.rubyforge_project = %q{refinerycms}
12
+ s.authors = ['Resolve Digital', 'Philip Arndt', 'David Jones', 'Steven Heidel']
13
+ s.license = %q{MIT}
14
+ s.require_paths = %w(lib)
15
+ s.executables = %w()
16
+
17
+ s.files = [
18
+ 'app',
19
+ 'app/controllers',
20
+ 'app/controllers/admin',
21
+ 'app/controllers/admin/dashboard_controller.rb',
22
+ 'app/helpers',
23
+ 'app/helpers/admin',
24
+ 'app/helpers/admin/dashboard_helper.rb',
25
+ 'app/views',
26
+ 'app/views/admin',
27
+ 'app/views/admin/dashboard',
28
+ 'app/views/admin/dashboard/_additional_dashboard_menu_items.html.erb',
29
+ 'app/views/admin/dashboard/_recent_activity.html.erb',
30
+ 'app/views/admin/dashboard/_recent_inquiries.html.erb',
31
+ 'app/views/admin/dashboard/index.html.erb',
32
+ 'app/views/admin/dashboard/index.rss.builder',
33
+ 'config',
34
+ 'config/locales',
35
+ 'config/locales/cs.yml',
36
+ 'config/locales/da.yml',
37
+ 'config/locales/de.yml',
38
+ 'config/locales/el.yml',
39
+ 'config/locales/en.yml',
40
+ 'config/locales/es.yml',
41
+ 'config/locales/fr.yml',
42
+ 'config/locales/it.yml',
43
+ 'config/locales/lolcat.yml',
44
+ 'config/locales/lt.yml',
45
+ 'config/locales/lv.yml',
46
+ 'config/locales/nb.yml',
47
+ 'config/locales/nl.yml',
48
+ 'config/locales/pl.yml',
49
+ 'config/locales/pt-BR.yml',
50
+ 'config/locales/rs.yml',
51
+ 'config/locales/ru.yml',
52
+ 'config/locales/sl.yml',
53
+ 'config/locales/sv.yml',
54
+ 'config/locales/vi.yml',
55
+ 'config/locales/zh-CN.yml',
56
+ 'config/locales/zh-TW.yml',
57
+ 'config/routes.rb',
58
+ 'features',
59
+ 'features/dashboard.feature',
60
+ 'features/step_definitions',
61
+ 'features/support',
62
+ 'features/support/paths.rb',
63
+ 'lib',
64
+ 'lib/gemspec.rb',
65
+ 'lib/refinerycms-dashboard.rb',
66
+ 'license.md',
67
+ 'readme.md',
68
+ 'refinerycms-dashboard.gemspec'
69
+ ]
70
+
71
+ s.add_dependency 'refinerycms-core', '~> 0.9.9.1'
72
+ end
metadata ADDED
@@ -0,0 +1,105 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: refinerycms-dashboard
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.9.9.1
6
+ platform: ruby
7
+ authors:
8
+ - Resolve Digital
9
+ - Philip Arndt
10
+ - David Jones
11
+ - Steven Heidel
12
+ autorequire:
13
+ bindir: bin
14
+ cert_chain: []
15
+
16
+ date: 2011-02-15 00:00:00 +13:00
17
+ default_executable:
18
+ dependencies:
19
+ - !ruby/object:Gem::Dependency
20
+ name: refinerycms-core
21
+ prerelease: false
22
+ requirement: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ~>
26
+ - !ruby/object:Gem::Version
27
+ version: 0.9.9.1
28
+ type: :runtime
29
+ version_requirements: *id001
30
+ description: The dashboard is usually the first engine the user sees in the backend of Refinery CMS. It displays useful information and contains links to common functionality.
31
+ email: info@refinerycms.com
32
+ executables: []
33
+
34
+ extensions: []
35
+
36
+ extra_rdoc_files: []
37
+
38
+ files:
39
+ - app/controllers/admin/dashboard_controller.rb
40
+ - app/helpers/admin/dashboard_helper.rb
41
+ - app/views/admin/dashboard/_additional_dashboard_menu_items.html.erb
42
+ - app/views/admin/dashboard/_recent_activity.html.erb
43
+ - app/views/admin/dashboard/_recent_inquiries.html.erb
44
+ - app/views/admin/dashboard/index.html.erb
45
+ - app/views/admin/dashboard/index.rss.builder
46
+ - config/locales/cs.yml
47
+ - config/locales/da.yml
48
+ - config/locales/de.yml
49
+ - config/locales/el.yml
50
+ - config/locales/en.yml
51
+ - config/locales/es.yml
52
+ - config/locales/fr.yml
53
+ - config/locales/it.yml
54
+ - config/locales/lolcat.yml
55
+ - config/locales/lt.yml
56
+ - config/locales/lv.yml
57
+ - config/locales/nb.yml
58
+ - config/locales/nl.yml
59
+ - config/locales/pl.yml
60
+ - config/locales/pt-BR.yml
61
+ - config/locales/rs.yml
62
+ - config/locales/ru.yml
63
+ - config/locales/sl.yml
64
+ - config/locales/sv.yml
65
+ - config/locales/vi.yml
66
+ - config/locales/zh-CN.yml
67
+ - config/locales/zh-TW.yml
68
+ - config/routes.rb
69
+ - features/dashboard.feature
70
+ - features/support/paths.rb
71
+ - lib/gemspec.rb
72
+ - lib/refinerycms-dashboard.rb
73
+ - license.md
74
+ - readme.md
75
+ - refinerycms-dashboard.gemspec
76
+ has_rdoc: true
77
+ homepage: http://refinerycms.com
78
+ licenses:
79
+ - MIT
80
+ post_install_message:
81
+ rdoc_options: []
82
+
83
+ require_paths:
84
+ - lib
85
+ required_ruby_version: !ruby/object:Gem::Requirement
86
+ none: false
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: "0"
91
+ required_rubygems_version: !ruby/object:Gem::Requirement
92
+ none: false
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: "0"
97
+ requirements: []
98
+
99
+ rubyforge_project: refinerycms
100
+ rubygems_version: 1.5.2
101
+ signing_key:
102
+ specification_version: 3
103
+ summary: Dashboard engine for Refinery CMS
104
+ test_files: []
105
+