mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
API-CHANGE sapphire folder can now be renamed.
This commit is contained in:
parent
b8e86ae261
commit
c4e018928e
@ -1,6 +1,6 @@
|
|||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
PHP5 Content Management System (CMS), see [http://silverstripe.org](http://silverstripe.org). Requires the [`sapphire`](http://github.com/silverstripe/sapphire) module and a [`silverstripe-installer`](http://github.com/silverstripe/silverstripe-installer) base project.
|
PHP5 Content Management System (CMS), see [http://silverstripe.org](http://silverstripe.org). Requires the [`framework`](http://github.com/silverstripe/sapphire) module and a [`silverstripe-installer`](http://github.com/silverstripe/silverstripe-installer) base project.
|
||||||
|
|
||||||
## Installation ##
|
## Installation ##
|
||||||
|
|
||||||
|
@ -62,13 +62,13 @@ class AssetAdmin extends LeftAndMain implements PermissionProvider{
|
|||||||
Requirements::javascript(CMS_DIR . '/javascript/CMSMain.GridField.js');
|
Requirements::javascript(CMS_DIR . '/javascript/CMSMain.GridField.js');
|
||||||
Requirements::add_i18n_javascript(CMS_DIR . '/javascript/lang', false, true);
|
Requirements::add_i18n_javascript(CMS_DIR . '/javascript/lang', false, true);
|
||||||
Requirements::css(CMS_DIR . "/css/screen.css");
|
Requirements::css(CMS_DIR . "/css/screen.css");
|
||||||
|
$frameworkDir = FRAMEWORK_DIR;
|
||||||
Requirements::customScript(<<<JS
|
Requirements::customScript(<<<JS
|
||||||
_TREE_ICONS = {};
|
_TREE_ICONS = {};
|
||||||
_TREE_ICONS['Folder'] = {
|
_TREE_ICONS['Folder'] = {
|
||||||
fileIcon: 'sapphire/javascript/tree/images/page-closedfolder.gif',
|
fileIcon: '$frameworkDir/javascript/tree/images/page-closedfolder.gif',
|
||||||
openFolderIcon: 'sapphire/javascript/tree/images/page-openfolder.gif',
|
openFolderIcon: '$frameworkDir/javascript/tree/images/page-openfolder.gif',
|
||||||
closedFolderIcon: 'sapphire/javascript/tree/images/page-closedfolder.gif'
|
closedFolderIcon: '$frameworkDir/javascript/tree/images/page-closedfolder.gif'
|
||||||
};
|
};
|
||||||
JS
|
JS
|
||||||
);
|
);
|
||||||
|
@ -52,8 +52,8 @@ class CMSFileAddController extends LeftAndMain {
|
|||||||
* @todo what template is used here? AssetAdmin_UploadContent.ss doesn't seem to be used anymore
|
* @todo what template is used here? AssetAdmin_UploadContent.ss doesn't seem to be used anymore
|
||||||
*/
|
*/
|
||||||
public function getEditForm($id = null, $fields = null) {
|
public function getEditForm($id = null, $fields = null) {
|
||||||
Requirements::javascript(SAPPHIRE_DIR . '/javascript/AssetUploadField.js');
|
Requirements::javascript(FRAMEWORK_DIR . '/javascript/AssetUploadField.js');
|
||||||
Requirements::css(SAPPHIRE_DIR . '/css/AssetUploadField.css');
|
Requirements::css(FRAMEWORK_DIR . '/css/AssetUploadField.css');
|
||||||
|
|
||||||
$folder = $this->currentPage();
|
$folder = $this->currentPage();
|
||||||
|
|
||||||
|
@ -1163,12 +1163,12 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function CMSVersion() {
|
public function CMSVersion() {
|
||||||
$cmsVersion = file_get_contents(BASE_PATH . '/cms/silverstripe_version');
|
$cmsVersion = file_get_contents(CMS_PATH . '/silverstripe_version');
|
||||||
if(!$cmsVersion) $cmsVersion = _t('LeftAndMain.VersionUnknown');
|
if(!$cmsVersion) $cmsVersion = _t('LeftAndMain.VersionUnknown');
|
||||||
$sapphireVersion = file_get_contents(BASE_PATH . '/cms/silverstripe_version');
|
$sapphireVersion = file_get_contents(CMS_PATH . '/silverstripe_version');
|
||||||
if(!$sapphireVersion) $sapphireVersion = _t('LeftAndMain.VersionUnknown');
|
if(!$sapphireVersion) $sapphireVersion = _t('LeftAndMain.VersionUnknown');
|
||||||
return sprintf(
|
return sprintf(
|
||||||
"cms: %s, sapphire: %s",
|
"cms: %s, framework: %s",
|
||||||
$cmsVersion,
|
$cmsVersion,
|
||||||
$sapphireVersion
|
$sapphireVersion
|
||||||
);
|
);
|
||||||
|
@ -339,7 +339,7 @@ class ContentController extends Controller {
|
|||||||
if(Director::isDev() || Permission::check('CMS_ACCESS_CMSMain') || Permission::check('VIEW_DRAFT_CONTENT')) {
|
if(Director::isDev() || Permission::check('CMS_ACCESS_CMSMain') || Permission::check('VIEW_DRAFT_CONTENT')) {
|
||||||
if($this->dataRecord) {
|
if($this->dataRecord) {
|
||||||
Requirements::css(CMS_DIR . '/css/SilverStripeNavigator.css');
|
Requirements::css(CMS_DIR . '/css/SilverStripeNavigator.css');
|
||||||
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
|
Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js');
|
||||||
Requirements::javascript(CMS_DIR . '/javascript/SilverStripeNavigator.js');
|
Requirements::javascript(CMS_DIR . '/javascript/SilverStripeNavigator.js');
|
||||||
|
|
||||||
$return = $nav = SilverStripeNavigator::get_for_record($this->dataRecord);
|
$return = $nav = SilverStripeNavigator::get_for_record($this->dataRecord);
|
||||||
|
@ -50,7 +50,7 @@ class ReportAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
HtmlEditorConfig::get('cms')->setOption('Lang', i18n::get_tinymce_lang());
|
HtmlEditorConfig::get('cms')->setOption('Lang', i18n::get_tinymce_lang());
|
||||||
|
|
||||||
// Always block the HtmlEditorField.js otherwise it will be sent with an ajax request
|
// Always block the HtmlEditorField.js otherwise it will be sent with an ajax request
|
||||||
Requirements::block(SAPPHIRE_DIR . '/javascript/HtmlEditorField.js');
|
Requirements::block(FRAMEWORK_DIR . '/javascript/HtmlEditorField.js');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2687,8 +2687,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
function provideI18nEntities() {
|
function provideI18nEntities() {
|
||||||
$entities = parent::provideI18nEntities();
|
$entities = parent::provideI18nEntities();
|
||||||
|
|
||||||
if(isset($entities['Page.SINGULARNAME'])) $entities['Page.SINGULARNAME'][3] = 'sapphire';
|
if(isset($entities['Page.SINGULARNAME'])) $entities['Page.SINGULARNAME'][3] = FRAMEWORK_DIR;
|
||||||
if(isset($entities['Page.PLURALNAME'])) $entities['Page.PLURALNAME'][3] = 'sapphire';
|
if(isset($entities['Page.PLURALNAME'])) $entities['Page.PLURALNAME'][3] = FRAMEWORK_DIR;
|
||||||
|
|
||||||
$types = self::page_type_classes();
|
$types = self::page_type_classes();
|
||||||
foreach($types as $type) {
|
foreach($types as $type) {
|
||||||
|
@ -50,7 +50,7 @@ class FilesystemPublisher extends StaticPublisher {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $destFolder The folder to save the cached site into.
|
* @param $destFolder The folder to save the cached site into.
|
||||||
* This needs to be set in sapphire/static-main.php as well through the {@link $cacheBaseDir} variable.
|
* This needs to be set in framework/static-main.php as well through the {@link $cacheBaseDir} variable.
|
||||||
* @param $fileExtension The file extension to use, e.g 'html'.
|
* @param $fileExtension The file extension to use, e.g 'html'.
|
||||||
* If omitted, then each page will be placed in its own directory,
|
* If omitted, then each page will be placed in its own directory,
|
||||||
* with the filename 'index.html'. If you set the extension to PHP, then a simple PHP script will
|
* with the filename 'index.html'. If you set the extension to PHP, then a simple PHP script will
|
||||||
@ -69,7 +69,7 @@ class FilesystemPublisher extends StaticPublisher {
|
|||||||
/**
|
/**
|
||||||
* Transforms relative or absolute URLs to their static path equivalent.
|
* Transforms relative or absolute URLs to their static path equivalent.
|
||||||
* This needs to be the same logic that's used to look up these paths through
|
* This needs to be the same logic that's used to look up these paths through
|
||||||
* sapphire/static-main.php. Does not include the {@link $destFolder} prefix.
|
* framework/static-main.php. Does not include the {@link $destFolder} prefix.
|
||||||
* Replaces various special characters in the resulting filename similar to {@link SiteTree::generateURLSegment()}.
|
* Replaces various special characters in the resulting filename similar to {@link SiteTree::generateURLSegment()}.
|
||||||
*
|
*
|
||||||
* Examples (without $domain_based_caching):
|
* Examples (without $domain_based_caching):
|
||||||
|
@ -39,6 +39,7 @@ class RsyncMultiHostPublisher extends FilesystemPublisher {
|
|||||||
function publishPages($urls) {
|
function publishPages($urls) {
|
||||||
parent::publishPages($urls);
|
parent::publishPages($urls);
|
||||||
$base = Director::baseFolder();
|
$base = Director::baseFolder();
|
||||||
|
$framework = FRAMEWORK_DIR;
|
||||||
|
|
||||||
// Get variable that can turn off the rsync component of publication
|
// Get variable that can turn off the rsync component of publication
|
||||||
if(isset($_GET['norsync']) && $_GET['norsync']) return;
|
if(isset($_GET['norsync']) && $_GET['norsync']) return;
|
||||||
@ -53,8 +54,8 @@ class RsyncMultiHostPublisher extends FilesystemPublisher {
|
|||||||
$rsyncOutput = `cd $base; rsync -av -e ssh --exclude /.htaccess --exclude /web.config --exclude '*.php' --exclude '*.svn' --exclude '*.git' --exclude '*~' $extraArg --delete . $target`;
|
$rsyncOutput = `cd $base; rsync -av -e ssh --exclude /.htaccess --exclude /web.config --exclude '*.php' --exclude '*.svn' --exclude '*.git' --exclude '*~' $extraArg --delete . $target`;
|
||||||
// Then transfer "safe" PHP from the cache/ directory
|
// Then transfer "safe" PHP from the cache/ directory
|
||||||
$rsyncOutput .= `cd $base; rsync -av -e ssh --exclude '*.svn' --exclude '*~' $extraArg --delete cache $target`;
|
$rsyncOutput .= `cd $base; rsync -av -e ssh --exclude '*.svn' --exclude '*~' $extraArg --delete cache $target`;
|
||||||
// Transfer sapphire/static-main.php to the target
|
// Transfer framework/static-main.php to the target
|
||||||
$rsyncOutput .= `cd $base; rsync -av -e ssh --delete sapphire/static-main.php $target/sapphire`;
|
$rsyncOutput .= `cd $base; rsync -av -e ssh --delete $framework/static-main.php $target/$framework`;
|
||||||
if(StaticPublisher::echo_progress()) echo $rsyncOutput;
|
if(StaticPublisher::echo_progress()) echo $rsyncOutput;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,5 +44,5 @@ RewriteRule .* /cache/index.html [L]
|
|||||||
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
|
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
|
||||||
RewriteCond %{REQUEST_URI} ^(.*)$
|
RewriteCond %{REQUEST_URI} ^(.*)$
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
|
RewriteRule .* framework/main.php?url=%1&%{QUERY_STRING} [L]
|
||||||
### SILVERSTRIPE END ###
|
### SILVERSTRIPE END ###
|
@ -133,7 +133,7 @@ class Widget extends DataObject {
|
|||||||
* within a {@link ContentController}.
|
* within a {@link ContentController}.
|
||||||
*
|
*
|
||||||
* ## Forms
|
* ## Forms
|
||||||
* You can add forms like in any other sapphire controller.
|
* You can add forms like in any other SilverStripe controller.
|
||||||
* If you need access to the widget from within a form,
|
* If you need access to the widget from within a form,
|
||||||
* you can use `$this->controller->getWidget()` inside the form logic.
|
* you can use `$this->controller->getWidget()` inside the form logic.
|
||||||
* Note: Widget controllers currently only work on {@link Page} objects,
|
* Note: Widget controllers currently only work on {@link Page} objects,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/** Style custom to the CMSMain admin interface. CMSMain extends the built in sapphire admin section styles. As much as possible we want to use those built in styles. If anything in this file can be implemented in a generic way then it should be include in the admin scss files. @package cms */
|
/** Style custom to the CMSMain admin interface. CMSMain extends the built in SilverStripe admin section styles. As much as possible we want to use those built in styles. If anything in this file can be implemented in a generic way then it should be include in the admin scss files. @package cms */
|
||||||
/** ------------------------------------------------------------------ Page History Section. ----------------------------------------------------------------- */
|
/** ------------------------------------------------------------------ Page History Section. ----------------------------------------------------------------- */
|
||||||
#cms-page-history-versions tr.loading { color: #999; }
|
#cms-page-history-versions tr.loading { color: #999; }
|
||||||
#cms-page-history-versions tr.loading td:hover { cursor: none; }
|
#cms-page-history-versions tr.loading td:hover { cursor: none; }
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** This file is the central collection of included modules, links to custom SCSS files, and any global SCSS variable definitions. DO NOT ADD stylesheet rules to this file directly! Note: By prefixing files with an underscore, they won't create individual CSS files. */
|
/** This file is the central collection of included modules, links to custom SCSS files, and any global SCSS variable definitions. DO NOT ADD stylesheet rules to this file directly! Note: By prefixing files with an underscore, they won't create individual CSS files. */
|
||||||
/** ----------------------------- Core Compass Libraries ------------------------------ */
|
/** ----------------------------- Core Compass Libraries ------------------------------ */
|
||||||
/** ----------------------------- CMS Components ------------------------------ */
|
/** ----------------------------- CMS Components ------------------------------ */
|
||||||
/** Style custom to the CMSMain admin interface. CMSMain extends the built in sapphire admin section styles. As much as possible we want to use those built in styles. If anything in this file can be implemented in a generic way then it should be include in the admin scss files. @package cms */
|
/** Style custom to the CMSMain admin interface. CMSMain extends the built in SilverStripe admin section styles. As much as possible we want to use those built in styles. If anything in this file can be implemented in a generic way then it should be include in the admin scss files. @package cms */
|
||||||
/** ------------------------------------------------------------------ Page History Section. ----------------------------------------------------------------- */
|
/** ------------------------------------------------------------------ Page History Section. ----------------------------------------------------------------- */
|
||||||
#cms-page-history-versions tr.loading { color: #999; }
|
#cms-page-history-versions tr.loading { color: #999; }
|
||||||
#cms-page-history-versions tr.loading td:hover { cursor: none; }
|
#cms-page-history-versions tr.loading td:hover { cursor: none; }
|
||||||
@ -29,5 +29,5 @@
|
|||||||
.cms .AssetAdmin #Form_EditForm_File td.bottom-all { padding: 0.7em; }
|
.cms .AssetAdmin #Form_EditForm_File td.bottom-all { padding: 0.7em; }
|
||||||
.cms .AssetAdmin #Form_EditForm_File td.col-StripThumbnail { padding: 0; width: 32px; height: 32px; display: block; }
|
.cms .AssetAdmin #Form_EditForm_File td.col-StripThumbnail { padding: 0; width: 32px; height: 32px; display: block; }
|
||||||
.cms .AssetAdmin #Form_EditForm_File td.col-StripThumbnail img { width: 32px; height: 32px; }
|
.cms .AssetAdmin #Form_EditForm_File td.col-StripThumbnail img { width: 32px; height: 32px; }
|
||||||
.cms .AssetAdmin #Form_EditForm_File tr[data-class=Folder] td.col-StripThumbnail { background: transparent url(../../sapphire/admin/images/sprites-32x32/blue-folder-horizontal.png) no-repeat top left; }
|
.cms .AssetAdmin #Form_EditForm_File tr[data-class=Folder] td.col-StripThumbnail { background: transparent url(../images/treeicons/blue-folder-horizontal.png) no-repeat top left; }
|
||||||
.cms .AssetAdmin #Form_EditForm_File tr[data-class=File] td.col-StripThumbnail { background: transparent url(../../sapphire/admin/images/sprites-32x32/blue-document.png) no-repeat top left; }
|
.cms .AssetAdmin #Form_EditForm_File tr[data-class=File] td.col-StripThumbnail { background: transparent url(../images/treeicons/blue-document.png) no-repeat top left; }
|
||||||
|
BIN
images/treeicons/blue-document.png
Executable file
BIN
images/treeicons/blue-document.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 813 B |
BIN
images/treeicons/blue-folder-horizontal.png
Executable file
BIN
images/treeicons/blue-folder-horizontal.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@ -87,15 +87,14 @@
|
|||||||
height: 32px;
|
height: 32px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO Figure out how to share sprites and SCSS rules between sapphire/admin/scss and cms/scss
|
|
||||||
tr[data-class=Folder] {
|
tr[data-class=Folder] {
|
||||||
td.col-StripThumbnail {
|
td.col-StripThumbnail {
|
||||||
background: transparent url(../../sapphire/admin/images/sprites-32x32/blue-folder-horizontal.png) no-repeat top left;
|
background: transparent url(../images/treeicons/blue-folder-horizontal.png) no-repeat top left;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tr[data-class=File] {
|
tr[data-class=File] {
|
||||||
td.col-StripThumbnail {
|
td.col-StripThumbnail {
|
||||||
background: transparent url(../../sapphire/admin/images/sprites-32x32/blue-document.png) no-repeat top left;
|
background: transparent url(../images/treeicons/blue-document.png) no-repeat top left;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* Style custom to the CMSMain admin interface. CMSMain extends the built in
|
* Style custom to the CMSMain admin interface. CMSMain extends the built in
|
||||||
* sapphire admin section styles. As much as possible we want to use those
|
* SilverStripe admin section styles. As much as possible we want to use those
|
||||||
* built in styles. If anything in this file can be implemented in a generic
|
* built in styles. If anything in this file can be implemented in a generic
|
||||||
* way then it should be include in the admin scss files.
|
* way then it should be include in the admin scss files.
|
||||||
*
|
*
|
||||||
|
@ -61,7 +61,7 @@ in the other stage:<br />
|
|||||||
}
|
}
|
||||||
|
|
||||||
function index() {
|
function index() {
|
||||||
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
|
Requirements::javascript(FRAMEWORK_DIR . '/thirdparty/jquery/jquery.js');
|
||||||
Requirements::customCSS('#OrphanIDs .middleColumn {width: auto;}');
|
Requirements::customCSS('#OrphanIDs .middleColumn {width: auto;}');
|
||||||
Requirements::customCSS('#OrphanIDs label {display: inline;}');
|
Requirements::customCSS('#OrphanIDs label {display: inline;}');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user