MINOR Fixed hardcoded links from admin/page to admin/pages

This commit is contained in:
Ingo Schommer 2012-04-18 23:33:37 +02:00
parent 8a72b32e95
commit 1b3a634a56
4 changed files with 13 additions and 13 deletions

View File

@ -20,7 +20,7 @@
'_class': 'class-' + val.ssclass,
'action': function(obj) {
// TODO Fix hardcoding of link
$('.cms-container').loadPanel('admin/page/add/?ParentID=' + id + '&Type=' + val.ssclass);
$('.cms-container').loadPanel('admin/pages/add/?ParentID=' + id + '&Type=' + val.ssclass);
}
};
}
@ -31,7 +31,7 @@
'label': ss.i18n._t('Tree.EditPage'),
'action': function(obj) {
// TODO Fix hardcoding of link
$('.cms-container').loadPanel('admin/page/add/show/' + obj.data('id'));
$('.cms-container').loadPanel('admin/pages/add/show/' + obj.data('id'));
}
}
};
@ -41,7 +41,7 @@
'label': ss.i18n._t('Tree.AddSubPage'),
'action': function(obj) {
// TODO Fix hardcoding of link
$('.cms-container').loadPanel('admin/page/add/?ParentID=' + obj.data('id'));
$('.cms-container').loadPanel('admin/pages/add/?ParentID=' + obj.data('id'));
},
'submenu': allowedChildren
};

View File

@ -62,7 +62,7 @@ class CMSMainTest extends FunctionalTest {
//$this->assertRegexp('/Done: Published 4 pages/', $response->getBody())
/*
$response = Director::test("admin/page/publishitems", array(
$response = Director::test("admin/pages/publishitems", array(
'ID' => ''
'Title' => ''
'action_publish' => 'Save and publish',
@ -198,9 +198,9 @@ class CMSMainTest extends FunctionalTest {
// with insufficient permissions
$cmsUser->logIn();
$this->get('admin/page/add');
$this->get('admin/pages/add');
$response = $this->post(
'admin/page/add/AddForm',
'admin/pages/add/AddForm',
array('ParentID' => '0', 'ClassName' => 'Page', 'Locale' => 'en_US', 'action_doAdd' => 1)
);
// should redirect, which is a permission error
@ -208,10 +208,10 @@ class CMSMainTest extends FunctionalTest {
// with correct permissions
$rootEditUser->logIn();
$response = $this->get('admin/page/add');
$response = $this->get('admin/pages/add');
$response = $this->post(
'admin/page/add/AddForm',
'admin/pages/add/AddForm',
array('ParentID' => '0', 'ClassName' => 'Page', 'Locale' => 'en_US', 'action_doAdd' => 1)
);

View File

@ -85,7 +85,7 @@ class CMSPageHistoryControllerTest extends FunctionalTest {
* @todo check highlighting for comparing pages.
*/
function testVersionsForm() {
$history = $this->get('admin/page/history/show/'. $this->page->ID);
$history = $this->get('admin/pages/history/show/'. $this->page->ID);
$form = $this->cssParser()->getBySelector("#Form_VersionsForm");
$this->assertEquals(1, count($form));
@ -102,7 +102,7 @@ class CMSPageHistoryControllerTest extends FunctionalTest {
}
function testVersionsFormTableContainsInformation() {
$history = $this->get('admin/page/history/show/'. $this->page->ID);
$history = $this->get('admin/pages/history/show/'. $this->page->ID);
$form = $this->cssParser()->getBySelector("#Form_VersionsForm");
$rows = $form[0]->xpath("fieldset/table/tbody/tr");
@ -127,7 +127,7 @@ class CMSPageHistoryControllerTest extends FunctionalTest {
}
function testVersionsFormSelectsUnpublishedCheckbox() {
$history = $this->get('admin/page/history/show/'. $this->page->ID);
$history = $this->get('admin/pages/history/show/'. $this->page->ID);
$checkbox = $this->cssParser()->getBySelector("#Form_VersionsForm #ShowUnpublished input");
$this->assertThat($checkbox[0], $this->logicalNot($this->isNull()));
@ -136,7 +136,7 @@ class CMSPageHistoryControllerTest extends FunctionalTest {
$this->assertThat($checked, $this->logicalNot($this->stringContains('checked')));
// viewing an unpublished
$history = $this->get('admin/page/history/show/'.$this->page->ID .'/'.$this->versionUnpublishedCheck);
$history = $this->get('admin/pages/history/show/'.$this->page->ID .'/'.$this->versionUnpublishedCheck);
$checkbox = $this->cssParser()->getBySelector("#Form_VersionsForm #ShowUnpublished input");
$this->assertThat($checkbox[0], $this->logicalNot($this->isNull()));

View File

@ -9,7 +9,7 @@ class CMSMainSearchFormTest extends FunctionalTest {
$this->session()->inst_set('loggedInAs', $this->idFromFixture('Member', 'admin'));
$response = $this->get(
'admin/page/SearchForm/?' .
'admin/pages/SearchForm/?' .
http_build_query(array(
'Title' => 'Page 10',
'FilterClass' => 'CMSSiteTreeFilter_Search',