mirror of
https://github.com/silverstripe/silverstripe-widgets
synced 2024-10-22 17:05:54 +02:00
FIX Add and optimise namespaces
This commit is contained in:
parent
0916970951
commit
285b46fafb
10
lang/en.yml
10
lang/en.yml
@ -1,19 +1,19 @@
|
|||||||
en:
|
en:
|
||||||
Widget:
|
SilverStripe\Widgets\Model\Widget:
|
||||||
PLURALNAME: Widgets
|
PLURALNAME: Widgets
|
||||||
SINGULARNAME: Widget
|
SINGULARNAME: Widget
|
||||||
WidgetArea:
|
SilverStripe\Widgets\Model\WidgetArea:
|
||||||
PLURALNAME: 'Widget Areas'
|
PLURALNAME: 'Widget Areas'
|
||||||
SINGULARNAME: 'Widget Area'
|
SINGULARNAME: 'Widget Area'
|
||||||
WidgetAreaEditor_ss:
|
SilverStripe\Widgets\Templates\SilverStripe\Widgets\Forms\WidgetAreaEditor_ss:
|
||||||
AVAILABLE: 'Available Widgets'
|
AVAILABLE: 'Available Widgets'
|
||||||
AVAILWIDGETS: 'Click a widget title below to use it on this page.'
|
AVAILWIDGETS: 'Click a widget title below to use it on this page.'
|
||||||
INUSE: 'Widgets currently used'
|
INUSE: 'Widgets currently used'
|
||||||
NOAVAIL: 'There are currently no widgets available.'
|
NOAVAIL: 'There are currently no widgets available.'
|
||||||
TOSORT: 'To sort currently used widgets on this page, drag them up and down.'
|
TOSORT: 'To sort currently used widgets on this page, drag them up and down.'
|
||||||
WidgetDescription_ss:
|
SilverStripe\Widgets\Templates\WidgetDescription_ss:
|
||||||
CLICKTOADDWIDGET: 'Click to add this widget'
|
CLICKTOADDWIDGET: 'Click to add this widget'
|
||||||
WidgetEditor_ss:
|
SilverStripe\Widgets\Templates\WidgetEditor_ss:
|
||||||
DELETE: Delete
|
DELETE: Delete
|
||||||
WidgetPageExtension:
|
WidgetPageExtension:
|
||||||
INHERITSIDEBAR: 'Inherit Sidebar From Parent'
|
INHERITSIDEBAR: 'Inherit Sidebar From Parent'
|
||||||
|
@ -6,8 +6,6 @@ use SilverStripe\Admin\LeftAndMain;
|
|||||||
use SilverStripe\Control\Controller;
|
use SilverStripe\Control\Controller;
|
||||||
use SilverStripe\Control\Director;
|
use SilverStripe\Control\Director;
|
||||||
use SilverStripe\Core\ClassInfo;
|
use SilverStripe\Core\ClassInfo;
|
||||||
use SilverStripe\i18n\i18n;
|
|
||||||
use SilverStripe\Security\Member;
|
|
||||||
use SilverStripe\Widgets\Model\Widget;
|
use SilverStripe\Widgets\Model\Widget;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -10,7 +10,6 @@ use SilverStripe\Forms\FieldList;
|
|||||||
use SilverStripe\Forms\HiddenField;
|
use SilverStripe\Forms\HiddenField;
|
||||||
use SilverStripe\Forms\TextField;
|
use SilverStripe\Forms\TextField;
|
||||||
use SilverStripe\ORM\DataObject;
|
use SilverStripe\ORM\DataObject;
|
||||||
use SilverStripe\Widgets\Model\WidgetArea;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Widgets let CMS authors drag and drop small pieces of functionality into
|
* Widgets let CMS authors drag and drop small pieces of functionality into
|
||||||
|
@ -4,7 +4,6 @@ namespace SilverStripe\Widgets\Model;
|
|||||||
|
|
||||||
use SilverStripe\ORM\ArrayList;
|
use SilverStripe\ORM\ArrayList;
|
||||||
use SilverStripe\ORM\DataObject;
|
use SilverStripe\ORM\DataObject;
|
||||||
use SilverStripe\Widgets\Model\Widget;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a set of widgets shown on a page.
|
* Represents a set of widgets shown on a page.
|
||||||
|
@ -2,17 +2,14 @@
|
|||||||
|
|
||||||
namespace SilverStripe\Widgets\Tests;
|
namespace SilverStripe\Widgets\Tests;
|
||||||
|
|
||||||
use Page;
|
|
||||||
use SilverStripe\CMS\Controllers\ContentController;
|
use SilverStripe\CMS\Controllers\ContentController;
|
||||||
use SilverStripe\CMS\Model\SiteTree;
|
use SilverStripe\CMS\Model\SiteTree;
|
||||||
use SilverStripe\Control\HTTPRequest;
|
use SilverStripe\Control\HTTPRequest;
|
||||||
|
use SilverStripe\Dev\SapphireTest;
|
||||||
use SilverStripe\Forms\FieldList;
|
use SilverStripe\Forms\FieldList;
|
||||||
use SilverStripe\Forms\Form;
|
use SilverStripe\Forms\Form;
|
||||||
use SilverStripe\Dev\SapphireTest;
|
|
||||||
use SilverStripe\Dev\TestOnly;
|
|
||||||
use SilverStripe\Widgets\Extensions\WidgetPageExtension;
|
use SilverStripe\Widgets\Extensions\WidgetPageExtension;
|
||||||
use SilverStripe\Widgets\Forms\WidgetAreaEditor;
|
use SilverStripe\Widgets\Forms\WidgetAreaEditor;
|
||||||
use SilverStripe\Widgets\Model\Widget;
|
|
||||||
use SilverStripe\Widgets\Tests\WidgetAreaEditorTest\FakePage;
|
use SilverStripe\Widgets\Tests\WidgetAreaEditorTest\FakePage;
|
||||||
use SilverStripe\Widgets\Tests\WidgetAreaEditorTest\TestWidget;
|
use SilverStripe\Widgets\Tests\WidgetAreaEditorTest\TestWidget;
|
||||||
|
|
||||||
|
@ -3,13 +3,7 @@
|
|||||||
namespace SilverStripe\Widgets\Tests;
|
namespace SilverStripe\Widgets\Tests;
|
||||||
|
|
||||||
use SilverStripe\Dev\FunctionalTest;
|
use SilverStripe\Dev\FunctionalTest;
|
||||||
use SilverStripe\Widgets\Model\Widget;
|
|
||||||
use SilverStripe\Dev\TestOnly;
|
|
||||||
use SilverStripe\Forms\TextField;
|
|
||||||
use SilverStripe\Forms\FieldList;
|
|
||||||
use SilverStripe\Forms\FormAction;
|
|
||||||
use SilverStripe\Forms\Form;
|
use SilverStripe\Forms\Form;
|
||||||
use SilverStripe\Widgets\Controllers\WidgetController;
|
|
||||||
use SilverStripe\Widgets\Tests\WidgetControllerTest\TestPage;
|
use SilverStripe\Widgets\Tests\WidgetControllerTest\TestPage;
|
||||||
use SilverStripe\Widgets\Tests\WidgetControllerTest\TestWidget;
|
use SilverStripe\Widgets\Tests\WidgetControllerTest\TestWidget;
|
||||||
|
|
||||||
@ -35,7 +29,7 @@ class WidgetControllerTest extends FunctionalTest
|
|||||||
|
|
||||||
$response = $this->get($page->URLSegment);
|
$response = $this->get($page->URLSegment);
|
||||||
|
|
||||||
$formAction = sprintf('%s/widget/%d/Form', $page->URLSegment, $widget->ID);
|
$formAction = sprintf('%s/widget/%d/%s', $page->URLSegment, $widget->ID, 'Form');
|
||||||
$this->assertContains(
|
$this->assertContains(
|
||||||
$formAction,
|
$formAction,
|
||||||
$response->getBody(),
|
$response->getBody(),
|
||||||
|
@ -23,7 +23,7 @@ class TestWidgetController extends WidgetController implements TestOnly
|
|||||||
{
|
{
|
||||||
$widgetform = new Form(
|
$widgetform = new Form(
|
||||||
$this,
|
$this,
|
||||||
'Form',
|
__FUNCTION__,
|
||||||
new FieldList(
|
new FieldList(
|
||||||
new TextField('TestValue')
|
new TextField('TestValue')
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user