Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PATCH: a few fixes - sorry, out of time, but may help #3

Open
wants to merge 12 commits into
base: 1
Choose a base branch
from
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ welcome any feedback that a user may have.
If you encounter any issues, have any ideas or want to request a feature,
please use the following links:

* [Sharing your opinion and raising issues](https://github.com/i-lateral/silverstripe-dashboard/issues)
* [Submit a pull request](https://github.com/i-lateral/silverstripe-dashboard/pulls)
* [Sharing your opinion and raising issues](https://github.com/sunnysideup/dashboard/issues)
* [Submit a pull request](https://github.com/sunnysideup/dashboard/pulls)

## Translations

If you would like to add some translations to this module, please either
provide us with a pull request or alternativley submit an issue with the
translations you would like implemented
translations you would like implemented
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The Dashboard module provides a splash page for the CMS in SilverStripe 4 with c


## Screenshot & Videos
Images and videos about this module can be found [in this blog post.](https://www.silverstripe.org/blog/the-dashboard-module-make-a-splash-in-silverstripe-3/)
Images and videos about this module can be found [in this blog post.](https://www.silverstripe.org/blog/the-dashboard-module-make-a-splash-in-3/)


## Included panels
Expand Down Expand Up @@ -41,38 +41,38 @@ First, create a class for the panel as a descendant of DashboardPanel. We'll inc

use SilverStripe\Forms\TextField;
use SilverStripe\Forms\CheckboxField;
use ilateral\SilverStripe\Dashboard\DashboardPanel;
use Sunnysideup\Dashboard\DashboardPanel;

class DashboardRecentOrdersPanel extends DashboardPanel {

private static $db = [
'Count' => 'Int',
'OnlyShowShipped' => 'Boolean'
];


private static $icon = "mysite/images/dashboard-recent-orders.png";


public function getLabel() {
return _t('Mysite.RECENTORDERS','Recent Orders');
}


public function getDescription() {
return _t('Mysite.RECENTORDERSDESCRIPTION','Shows recent orders for this fake website.');
}


public function getConfigurationFields() {
$fields = parent::getConfigurationFields();
$fields->push(TextField::create("Count", "Number of orders to show"));
$fields->push(CheckboxField::create("OnlyShowShipped","Only show shipped orders"));
return $fields;
}



public function Orders() {
$orders = Order::get()->sort("Created DESC")->limit($this->Count);
return $this->OnlyShowShipped ? $orders->filter(['Shipped' => true]) : $orders;
Expand Down Expand Up @@ -146,7 +146,7 @@ You can create your own templates for either of these panel types which will ove
You can access all the properties of your model in the template as normal along with a EditLink method which will contain the CMS edit link for that item.


For model admin panels, create a templated called DashboardModelAdminPanel\_**ModelAdminClass**\_**ModelAdminModel**.ss and place it in your _mysite/templates/Includes folder_.
For model admin panels, create a templated called DashboardModelAdminPanel\_**ModelAdminClass**\_**ModelAdminModel**.ss and place it in your _mysite/templates/Includes folder_.
eg;
**DashboardModelAdminPanel\_MyAdmin\_Product.ss**

Expand All @@ -162,7 +162,7 @@ You need to add your Google Analytics config information to the project config.y
DashboardGoogleAnalyticsPanel:
email: [XXXXX]@developer.gserviceaccount.com
profile: 123456
key_file_path: google_oauth.p12
key_file_path: google_oauth.p12
```
To locate your profile ID, visit the Google Analytics website, login and select the website. At the end of the URL will be fragment similar to this:
```
Expand Down
19 changes: 9 additions & 10 deletions _config/adminpanels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@
Name: dashboarddefaultadmin
After: cmsdefaultadmin #Override the CMS module's setting (if CMS is installed)
---

SilverStripe\Admin\AdminRootController:
default_panel: 'ilateral\SilverStripe\Dashboard\Dashboard'
# SilverStripe\Admin\AdminRootController:
# default_panel: 'Sunnysideup\SilverStripe\Dashboard\Dashboard'

# Inject custom styles and JS
SilverStripe\Admin\LeftAndMain:
extra_requirements_javascript:
- "i-lateral/silverstripe-dashboard:javascript/jquery.flip.js"
- "i-lateral/silverstripe-dashboard:javascript/dashboard.js"
- "i-lateral/silverstripe-dashboard:javascript/thirdparty/google_jsapi_visualization.js"
- "i-lateral/silverstripe-dashboard:javascript/dashboard-chart.js"
- "i-lateral/silverstripe-dashboard:javascript/dashboard-button-options.js"
- 'sunnysideup/dashboard:javascript/jquery.flip.js'
- 'sunnysideup/dashboard:javascript/dashboard.js'
- 'sunnysideup/dashboard:javascript/thirdparty/google_jsapi_visualization.js'
- 'sunnysideup/dashboard:javascript/dashboard-chart.js'
- 'sunnysideup/dashboard:javascript/dashboard-button-options.js'
extra_requirements_css:
- "i-lateral/silverstripe-dashboard:css/dashboard.css"
- "i-lateral/silverstripe-dashboard:css/dashboard_icon.css"
- 'sunnysideup/dashboard:css/dashboard.css'
- 'sunnysideup/dashboard:css/dashboard_icon.css'
11 changes: 6 additions & 5 deletions _config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ Name: dashboardconfig

SilverStripe\Security\Member:
extensions:
- ilateral\SilverStripe\Dashboard\Extensions\DashboardMember
- Sunnysideup\Dashboard\Extensions\DashboardMember

SilverStripe\SiteConfig\SiteConfig:
extensions:
- ilateral\SilverStripe\Dashboard\Extensions\DashboardSiteConfig
- Sunnysideup\Dashboard\Extensions\DashboardSiteConfig

SilverStripe\Forms\GridField\GridFieldDetailForm_ItemRequest:
extensions:
- ilateral\SilverStripe\Dashboard\Extensions\DashboardItemEditForm
# this is so generic, it can break lots of other things.
#SilverStripe\Forms\GridField\GridFieldDetailForm_ItemRequest:
# extensions:
# - Sunnysideup\Dashboard\Extensions\DashboardItemEditForm
8 changes: 4 additions & 4 deletions _config/legacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Name: dashboardlegacy
---
SilverStripe\ORM\DatabaseAdmin:
classname_value_remapping:
DashboardPanel: 'ilateral\SilverStripe\Dashboard\DashboardPanel'
DashboardPanelDataObject: 'ilateral\SilverStripe\Dashboard\DashboardPanelDataObject'
UncleCheese\Dashboard\DashboardPanel: 'ilateral\SilverStripe\Dashboard\DashboardPanel'
UncleCheese\Dashboard\DashboardPanelDataObject: 'ilateral\SilverStripe\Dashboard\DashboardPanelDataObject'
DashboardPanel: 'Sunnysideup\Dashboard\DashboardPanel'
DashboardPanelDataObject: 'Sunnysideup\Dashboard\DashboardPanelDataObject'
UncleCheese\Dashboard\DashboardPanel: 'Sunnysideup\Dashboard\Panels\DashboardPanel'
UncleCheese\Dashboard\DashboardPanelDataObject: 'Sunnysideup\Dashboard\DashboardPanelDataObject'
15 changes: 9 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "i-lateral/silverstripe-dashboard",
"name": "sunnysideup/dashboard",
"description": "Adds a customisable dashboard to the SilverStripe CMS (fork of Unclecheese's module)",
"type": "silverstripe-vendormodule",
"type": "vendormodule",
"keywords": [
"silverstripe",
"dashboard",
"module",
"cms"
],
"license": "BSD-3-Clause",
Expand All @@ -17,17 +16,21 @@
{
"name": "Morven Lewis-Everley",
"email": "[email protected]"
},
{
"name": "Sunny Side Up",
"email": "[email protected]"
}
],
"require": {
"silverstripe/framework": "^4.0"
"silverstripe/framework": "^4.0 || ^5.0"
},
"replace": {
"silverstripe/dashboard": "*"
},
"autoload": {
"psr-4": {
"ilateral\\SilverStripe\\Dashboard\\": "src/"
"Sunnysideup\\Dashboard\\": "src/"
}
},
"extra": {
Expand All @@ -38,7 +41,7 @@
]
},
"support": {
"issues": "http://github.com/i-lateral/silverstripe-dashboard/issues"
"issues": "http://github.com/sunnysideup/dashboard/issues"
},
"minimum-stability": "dev",
"prefer-stable": true
Expand Down
32 changes: 16 additions & 16 deletions lang/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ de:
AddNew: 'Neue Seite hinzufügen'
ListFiltered: 'Gefilterte Liste.'
TreeFilteredClear: 'Filter leeren'
ilateral\SilverStripe\Dashboard\Dashboard_Content:
Sunnysideup\Dashboard\Dashboard_Content:
ADMINISTRATION: Administration
ilateral\SilverStripe\Dashboard\DashboardModelAdmin:
Sunnysideup\Dashboard\DashboardModelAdmin:
COUNT: 'Anzahl der Objekte zur Anzeige'
ilateral\SilverStripe\Dashboard\Dashboard:
Sunnysideup\Dashboard\Dashboard:
QUICKLINKSDESCRIPTION: 'Ermöglicht die Verwaltung von beliebigen Links aus dem Dashboard heraus'
SECTIONEDITORDESCRIPTION: 'Holt Seiten aus einem Bereich der Website zur Anzeige und Erstellung'
ACCESS: 'Zugriff zum ''{title}'' Bereich'
Expand Down Expand Up @@ -69,44 +69,44 @@ de:
WEATHER: Wetter
WEATHERDESCRIPTION: 'Zeigt das Wetter für den angegebenen Ort.'
WEATHERNORESPONSE: 'Der Wetter-Server antwortet nicht. Versuchen Sie es in wenigen Minuten erneut.'
ilateral\SilverStripe\Dashboard\DashboardGoogleAnalyticsPanel:
Sunnysideup\Dashboard\DashboardGoogleAnalyticsPanel:
PLURALNAME: 'Dashboard Google Analytics Felder'
SINGULARNAME: 'Dashboard Google Analytics Feld'
ilateral\SilverStripe\Dashboard\DashboardModelAdminPanel:
Sunnysideup\Dashboard\DashboardModelAdminPanel:
PLURALNAME: 'Model Admins'
SINGULARNAME: 'Model Admin'
ilateral\SilverStripe\Dashboard\DashboardPanel:
Sunnysideup\Dashboard\DashboardPanel:
PLURALNAME: 'Dashboard Felder'
SINGULARNAME: 'Dashboard Feld'
ilateral\SilverStripe\Dashboard\DashboardPanelDataObject:
Sunnysideup\Dashboard\DashboardPanelDataObject:
PLURALNAME: 'Dashboard Felder Data Objects'
SINGULARNAME: 'Dashboard Feld Data Object'
ilateral\SilverStripe\Dashboard\DashboardQuickLink:
Sunnysideup\Dashboard\DashboardQuickLink:
LINK: 'Link (mit http://)'
LINKTEXT: 'Link text'
NEWWINDOW: 'Öffnet link in einem neuen Fenster'
PLURALNAME: 'Dashboard Quick Links'
SINGULARNAME: 'Dashboard Quick Link'
ilateral\SilverStripe\Dashboard\DashboardQuickLinksPanel:
Sunnysideup\Dashboard\DashboardQuickLinksPanel:
PLURALNAME: 'Dashboard Quick Links Felder'
SINGULARNAME: 'Dashboard Quick Links Feld'
ilateral\SilverStripe\Dashboard\DashboardRSSFeedPanel:
Sunnysideup\Dashboard\DashboardRSSFeedPanel:
PLURALNAME: 'Dashboard R S S Feed Felder'
SINGULARNAME: 'Dashboard R S S Feed Feld'
ilateral\SilverStripe\Dashboard\DashboardRecentEdits:
Sunnysideup\Dashboard\DashboardRecentEdits:
COUNT: 'Anzahl der Seiten zur Anzeige'
ilateral\SilverStripe\Dashboard\DashboardRecentEditsPanel:
Sunnysideup\Dashboard\DashboardRecentEditsPanel:
PLURALNAME: 'Dashboard Zuletzt Editiert Felder'
SINGULARNAME: 'Dashboard Zuletzt Editiert Felder'
ilateral\SilverStripe\Dashboard\DashboardRecentFile:
Sunnysideup\Dashboard\DashboardRecentFile:
COUNT: 'Anzahl der Dateien zur Anzeige'
ilateral\SilverStripe\Dashboard\DashboardRecentFilesPanel:
Sunnysideup\Dashboard\DashboardRecentFilesPanel:
PLURALNAME: 'Dashboard Letzte Dateien Felder'
SINGULARNAME: 'Dashboard Letzte Dateien Felde'
ilateral\SilverStripe\Dashboard\DashboardSectionEditorPanel:
Sunnysideup\Dashboard\DashboardSectionEditorPanel:
PLURALNAME: 'Dashboard Bereichs-Editor Felder'
SINGULARNAME: 'Dashboard Bereichs-Editor Felde'
ilateral\SilverStripe\Dashboard\DashboardWeatherPanel:
Sunnysideup\Dashboard\DashboardWeatherPanel:
PLURALNAME: 'Dashboard Wetter Felder'
SINGULARNAME: 'Dashboard Wetter Feld'
SilverStripe\Security\Permission:
Expand Down
32 changes: 16 additions & 16 deletions lang/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ en:
AddNew: 'Add new page'
ListFiltered: 'Filtered list.'
TreeFilteredClear: 'Clear filter'
ilateral\SilverStripe\Dashboard\Dashboard_Content:
Sunnysideup\Dashboard\Dashboard_Content:
ADMINISTRATION: Administration
ilateral\SilverStripe\Dashboard\DashboardModelAdmin:
Sunnysideup\Dashboard\DashboardModelAdmin:
COUNT: 'Number of records to display'
ilateral\SilverStripe\Dashboard\Dashboard:
Sunnysideup\Dashboard\Dashboard:
QUICKLINKSDESCRIPTION: 'Allows management of arbitrary links from the dashboard'
SECTIONEDITORDESCRIPTION: 'Pulls pages from a section of the website for viewing and creation'
ACCESS: 'Access to ''{title}'' section'
Expand Down Expand Up @@ -69,44 +69,44 @@ en:
WEATHER: Weather
WEATHERDESCRIPTION: 'Shows the weather for a given location.'
WEATHERNORESPONSE: 'The weather server did not respond. Try again in a few minutes.'
ilateral\SilverStripe\Dashboard\DashboardGoogleAnalyticsPanel:
Sunnysideup\Dashboard\DashboardGoogleAnalyticsPanel:
PLURALNAME: 'Dashboard Google Analytics Panels'
SINGULARNAME: 'Dashboard Google Analytics Panel'
ilateral\SilverStripe\Dashboard\DashboardModelAdminPanel:
Sunnysideup\Dashboard\DashboardModelAdminPanel:
PLURALNAME: 'Model Admins'
SINGULARNAME: 'Model Admin'
ilateral\SilverStripe\Dashboard\DashboardPanel:
Sunnysideup\Dashboard\DashboardPanel:
PLURALNAME: 'Dashboard Panels'
SINGULARNAME: 'Dashboard Panel'
ilateral\SilverStripe\Dashboard\DashboardPanelDataObject:
Sunnysideup\Dashboard\DashboardPanelDataObject:
PLURALNAME: 'Dashboard Panel Data Objects'
SINGULARNAME: 'Dashboard Panel Data Object'
ilateral\SilverStripe\Dashboard\DashboardQuickLink:
Sunnysideup\Dashboard\DashboardQuickLink:
LINK: 'Link (include http://)'
LINKTEXT: 'Link text'
NEWWINDOW: 'Open link in new window'
PLURALNAME: 'Dashboard Quick Links'
SINGULARNAME: 'Dashboard Quick Link'
ilateral\SilverStripe\Dashboard\DashboardQuickLinksPanel:
Sunnysideup\Dashboard\DashboardQuickLinksPanel:
PLURALNAME: 'Dashboard Quick Links Panels'
SINGULARNAME: 'Dashboard Quick Links Panel'
ilateral\SilverStripe\Dashboard\DashboardRSSFeedPanel:
Sunnysideup\Dashboard\DashboardRSSFeedPanel:
PLURALNAME: 'Dashboard R S S Feed Panels'
SINGULARNAME: 'Dashboard R S S Feed Panel'
ilateral\SilverStripe\Dashboard\DashboardRecentEdits:
Sunnysideup\Dashboard\DashboardRecentEdits:
COUNT: 'Number of pages to display'
ilateral\SilverStripe\Dashboard\DashboardRecentEditsPanel:
Sunnysideup\Dashboard\DashboardRecentEditsPanel:
PLURALNAME: 'Dashboard Recent Edits Panels'
SINGULARNAME: 'Dashboard Recent Edits Panel'
ilateral\SilverStripe\Dashboard\DashboardRecentFile:
Sunnysideup\Dashboard\DashboardRecentFile:
COUNT: 'Number of files to display'
ilateral\SilverStripe\Dashboard\DashboardRecentFilesPanel:
Sunnysideup\Dashboard\DashboardRecentFilesPanel:
PLURALNAME: 'Dashboard Recent Files Panels'
SINGULARNAME: 'Dashboard Recent Files Panel'
ilateral\SilverStripe\Dashboard\DashboardSectionEditorPanel:
Sunnysideup\Dashboard\DashboardSectionEditorPanel:
PLURALNAME: 'Dashboard Section Editor Panels'
SINGULARNAME: 'Dashboard Section Editor Panel'
ilateral\SilverStripe\Dashboard\DashboardWeatherPanel:
Sunnysideup\Dashboard\DashboardWeatherPanel:
PLURALNAME: 'Dashboard Weather Panels'
SINGULARNAME: 'Dashboard Weather Panel'
SilverStripe\Security\Permission:
Expand Down
Loading