diff --git a/README.md b/README.md index c5e0f25d..3cb61497 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## 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 ## @@ -33,4 +33,4 @@ and [installation from source](http://doc.silverstripe.org/sapphire/en/installat LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - OF SUCH DAMAGE. \ No newline at end of file + OF SUCH DAMAGE. diff --git a/code/controllers/AssetAdmin.php b/code/controllers/AssetAdmin.php index ef5fb843..788deda5 100644 --- a/code/controllers/AssetAdmin.php +++ b/code/controllers/AssetAdmin.php @@ -62,13 +62,13 @@ class AssetAdmin extends LeftAndMain implements PermissionProvider{ Requirements::javascript(CMS_DIR . '/javascript/CMSMain.GridField.js'); Requirements::add_i18n_javascript(CMS_DIR . '/javascript/lang', false, true); Requirements::css(CMS_DIR . "/css/screen.css"); - + $frameworkDir = FRAMEWORK_DIR; Requirements::customScript(<<currentPage(); diff --git a/code/controllers/CMSMain.php b/code/controllers/CMSMain.php index 117d72bb..287a23f2 100644 --- a/code/controllers/CMSMain.php +++ b/code/controllers/CMSMain.php @@ -1163,12 +1163,12 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr * @return string */ 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'); - $sapphireVersion = file_get_contents(BASE_PATH . '/cms/silverstripe_version'); + $sapphireVersion = file_get_contents(CMS_PATH . '/silverstripe_version'); if(!$sapphireVersion) $sapphireVersion = _t('LeftAndMain.VersionUnknown'); return sprintf( - "cms: %s, sapphire: %s", + "cms: %s, framework: %s", $cmsVersion, $sapphireVersion ); diff --git a/code/controllers/ContentController.php b/code/controllers/ContentController.php index a4a49205..f79c3560 100644 --- a/code/controllers/ContentController.php +++ b/code/controllers/ContentController.php @@ -339,7 +339,7 @@ class ContentController extends Controller { if(Director::isDev() || Permission::check('CMS_ACCESS_CMSMain') || Permission::check('VIEW_DRAFT_CONTENT')) { if($this->dataRecord) { 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'); $return = $nav = SilverStripeNavigator::get_for_record($this->dataRecord); diff --git a/code/controllers/ReportAdmin.php b/code/controllers/ReportAdmin.php index b12214c9..812d11eb 100644 --- a/code/controllers/ReportAdmin.php +++ b/code/controllers/ReportAdmin.php @@ -50,7 +50,7 @@ class ReportAdmin extends LeftAndMain implements PermissionProvider { HtmlEditorConfig::get('cms')->setOption('Lang', i18n::get_tinymce_lang()); // 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'); } /** diff --git a/code/model/SiteTree.php b/code/model/SiteTree.php index 3a0be5f7..2cd9603f 100644 --- a/code/model/SiteTree.php +++ b/code/model/SiteTree.php @@ -2687,8 +2687,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid function provideI18nEntities() { $entities = parent::provideI18nEntities(); - if(isset($entities['Page.SINGULARNAME'])) $entities['Page.SINGULARNAME'][3] = 'sapphire'; - if(isset($entities['Page.PLURALNAME'])) $entities['Page.PLURALNAME'][3] = 'sapphire'; + if(isset($entities['Page.SINGULARNAME'])) $entities['Page.SINGULARNAME'][3] = FRAMEWORK_DIR; + if(isset($entities['Page.PLURALNAME'])) $entities['Page.PLURALNAME'][3] = FRAMEWORK_DIR; $types = self::page_type_classes(); foreach($types as $type) { diff --git a/code/staticpublisher/FilesystemPublisher.php b/code/staticpublisher/FilesystemPublisher.php index 4de5dcda..eb89261b 100644 --- a/code/staticpublisher/FilesystemPublisher.php +++ b/code/staticpublisher/FilesystemPublisher.php @@ -50,7 +50,7 @@ class FilesystemPublisher extends StaticPublisher { /** * @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'. * 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 @@ -69,7 +69,7 @@ class FilesystemPublisher extends StaticPublisher { /** * 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 - * 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()}. * * Examples (without $domain_based_caching): diff --git a/code/staticpublisher/RsyncMultiHostPublisher.php b/code/staticpublisher/RsyncMultiHostPublisher.php index 9962361a..18383162 100644 --- a/code/staticpublisher/RsyncMultiHostPublisher.php +++ b/code/staticpublisher/RsyncMultiHostPublisher.php @@ -39,6 +39,7 @@ class RsyncMultiHostPublisher extends FilesystemPublisher { function publishPages($urls) { parent::publishPages($urls); $base = Director::baseFolder(); + $framework = FRAMEWORK_DIR; // Get variable that can turn off the rsync component of publication 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`; // Then transfer "safe" PHP from the cache/ directory $rsyncOutput .= `cd $base; rsync -av -e ssh --exclude '*.svn' --exclude '*~' $extraArg --delete cache $target`; - // Transfer sapphire/static-main.php to the target - $rsyncOutput .= `cd $base; rsync -av -e ssh --delete sapphire/static-main.php $target/sapphire`; + // Transfer framework/static-main.php to the target + $rsyncOutput .= `cd $base; rsync -av -e ssh --delete $framework/static-main.php $target/$framework`; if(StaticPublisher::echo_progress()) echo $rsyncOutput; } } diff --git a/code/staticpublisher/htaccess_example_rsyncsingleserver b/code/staticpublisher/htaccess_example_rsyncsingleserver index ce82d6f1..8a22bd22 100644 --- a/code/staticpublisher/htaccess_example_rsyncsingleserver +++ b/code/staticpublisher/htaccess_example_rsyncsingleserver @@ -44,5 +44,5 @@ RewriteRule .* /cache/index.html [L] RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$ RewriteCond %{REQUEST_URI} ^(.*)$ RewriteCond %{REQUEST_FILENAME} !-f -RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L] -### SILVERSTRIPE END ### \ No newline at end of file +RewriteRule .* framework/main.php?url=%1&%{QUERY_STRING} [L] +### SILVERSTRIPE END ### diff --git a/code/widgets/Widget.php b/code/widgets/Widget.php index b2417d80..8ef5b7af 100644 --- a/code/widgets/Widget.php +++ b/code/widgets/Widget.php @@ -133,7 +133,7 @@ class Widget extends DataObject { * within a {@link ContentController}. * * ## 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, * you can use `$this->controller->getWidget()` inside the form logic. * Note: Widget controllers currently only work on {@link Page} objects, diff --git a/css/CMSMain.css b/css/CMSMain.css index 25db5f22..86523c25 100644 --- a/css/CMSMain.css +++ b/css/CMSMain.css @@ -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. ----------------------------------------------------------------- */ #cms-page-history-versions tr.loading { color: #999; } #cms-page-history-versions tr.loading td:hover { cursor: none; } diff --git a/css/screen.css b/css/screen.css index b8ea5263..4c04c398 100644 --- a/css/screen.css +++ b/css/screen.css @@ -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. */ /** ----------------------------- Core Compass Libraries ------------------------------ */ /** ----------------------------- 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. ----------------------------------------------------------------- */ #cms-page-history-versions tr.loading { color: #999; } #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.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 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=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=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(../images/treeicons/blue-document.png) no-repeat top left; } diff --git a/images/treeicons/blue-document.png b/images/treeicons/blue-document.png new file mode 100755 index 00000000..d2e2d5bc Binary files /dev/null and b/images/treeicons/blue-document.png differ diff --git a/images/treeicons/blue-folder-horizontal.png b/images/treeicons/blue-folder-horizontal.png new file mode 100755 index 00000000..a3672f24 Binary files /dev/null and b/images/treeicons/blue-folder-horizontal.png differ diff --git a/scss/_AssetAdmin.scss b/scss/_AssetAdmin.scss index 150ba1a6..276f69ff 100644 --- a/scss/_AssetAdmin.scss +++ b/scss/_AssetAdmin.scss @@ -87,17 +87,16 @@ height: 32px; } } - // TODO Figure out how to share sprites and SCSS rules between sapphire/admin/scss and cms/scss tr[data-class=Folder] { 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] { 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; } } } } - \ No newline at end of file + diff --git a/scss/_CMSMain.scss b/scss/_CMSMain.scss index 86c06bd0..b9ffab3f 100644 --- a/scss/_CMSMain.scss +++ b/scss/_CMSMain.scss @@ -1,6 +1,6 @@ /** * 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 * way then it should be include in the admin scss files. * @@ -42,4 +42,4 @@ padding: 2px; color: darken(#FDD, 30%); } -} \ No newline at end of file +} diff --git a/tasks/RemoveOrphanedPagesTask.php b/tasks/RemoveOrphanedPagesTask.php index 1363490b..84ed0955 100644 --- a/tasks/RemoveOrphanedPagesTask.php +++ b/tasks/RemoveOrphanedPagesTask.php @@ -61,7 +61,7 @@ in the other stage:
} 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 label {display: inline;}');