Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop:
  prepared new version
  [IMP] new feature: disble current link in PD menu
  support for plugin translator
  updated plugin version
  [FIX] 18236
  • Loading branch information
chfsx committed Apr 13, 2016
2 parents 0682963 + 2d366f9 commit 38d7e4c
Show file tree
Hide file tree
Showing 18 changed files with 1,606 additions and 420 deletions.
8 changes: 4 additions & 4 deletions classes/Entry/class.ctrlmmEntryFormGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private function initForm() {
$mode = $this->entry->getId() == 0 ? 'create' : 'edit';

$te = new ilFormSectionHeaderGUI();
$te->setTitle($this->pl->txt('title'));
$te->setTitle($this->pl->txt('common_title'));
$this->addItem($te);
$this->setTitle($this->pl->txt('form_title'));
$this->setFormAction($this->ctrl->getFormAction($this->parent_gui));
Expand All @@ -127,14 +127,14 @@ private function initForm() {
$this->addItem($link);
if (count(ctrlmmEntry::getAdditionalFieldsAsArray($this->entry)) > 0) {
$te = new ilFormSectionHeaderGUI();
$te->setTitle($this->pl->txt('settings'));
$te->setTitle($this->pl->txt('common_settings'));
$this->addItem($te);
}
$this->addCommandButton($mode . 'Object', $this->pl->txt('create'));
$this->addCommandButton($mode . 'Object', $this->pl->txt('common_create'));
if ($mode != 'create') {
$this->addCommandButton($mode . 'ObjectAndStay', $this->pl->txt('create_and_stay'));
}
$this->addCommandButton('configure', $this->pl->txt('cancel'));
$this->addCommandButton('configure', $this->pl->txt('common_cancel'));

$this->addFields();
}
Expand Down
8 changes: 4 additions & 4 deletions classes/Entry/class.ctrlmmEntryGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function initForm($mode = 'create') {
$this->form = new ilPropertyFormGUI();
$this->initPermissionSelectionForm();
$te = new ilFormSectionHeaderGUI();
$te->setTitle($this->pl->txt('title'));
$te->setTitle($this->pl->txt('common_title'));
$this->form->addItem($te);
$this->form->setTitle($this->pl->txt('form_title'));
$this->form->setFormAction($this->ctrl->getFormAction($this->parent_gui));
Expand All @@ -145,14 +145,14 @@ public function initForm($mode = 'create') {

if (count(ctrlmmEntry::getAdditionalFieldsAsArray($this->entry)) > 0) {
$te = new ilFormSectionHeaderGUI();
$te->setTitle($this->pl->txt('settings'));
$te->setTitle($this->pl->txt('common_settings'));
$this->form->addItem($te);
}
$this->form->addCommandButton($mode . 'Object', $this->pl->txt('create'));
$this->form->addCommandButton($mode . 'Object', $this->pl->txt('common_create'));
if ($mode != 'create') {
$this->form->addCommandButton($mode . 'ObjectAndStay', $this->pl->txt('create_and_stay'));
}
$this->form->addCommandButton('configure', $this->pl->txt('cancel'));
$this->form->addCommandButton('configure', $this->pl->txt('common_cancel'));
}


Expand Down
14 changes: 7 additions & 7 deletions classes/Entry/class.ctrlmmEntryTableGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ public function __construct(ilCtrlMainMenuConfigGUI $a_parent_obj, $a_parent_cmd
//
// Columns
$this->addColumn('', 'position', '20px');
$this->addColumn($this->pl->txt('title'), 'title', 'auto');
$this->addColumn($this->pl->txt('type'), 'type', 'auto');
$this->addColumn($this->pl->txt('actions'), 'actions', '100px');
$this->addColumn($this->pl->txt('common_title'), 'title', 'auto');
$this->addColumn($this->pl->txt('common_type'), 'type', 'auto');
$this->addColumn($this->pl->txt('common_actions'), 'actions', '100px');
// ...
// Header
$ilToolbar->addButton($this->pl->txt('add_new'), $this->ctrl->getLinkTarget($a_parent_obj, 'selectEntryType'));
Expand Down Expand Up @@ -92,13 +92,13 @@ public function fillRow($a_set) {

$actions = new ilAdvancedSelectionListGUI();
$actions->setId('actions_' . $obj->getId());
$actions->setListTitle($this->pl->txt('actions'));
$actions->setListTitle($this->pl->txt('common_actions'));
if ($obj->getType() != ctrlmmMenu::TYPE_SEPARATOR) {
$actions->addItem($this->pl->txt('edit'), 'edit', $this->ctrl->getLinkTarget($this->parent_obj, 'editEntry'));
// $actions->addItem($this->pl->txt('edit'), 'edit', $this->ctrl->getLinkTargetByClass('ctrlmmEntryGUI', 'edit')); FSX TODO REFACTORING
$actions->addItem($this->pl->txt('common_edit'), 'edit', $this->ctrl->getLinkTarget($this->parent_obj, 'editEntry'));
// $actions->addItem($this->pl->txt('common_edit'), 'edit', $this->ctrl->getLinkTargetByClass('ctrlmmEntryGUI', 'edit')); FSX TODO REFACTORING
}
if ($obj->getType() != ctrlmmMenu::TYPE_ADMIN) {
$actions->addItem($this->pl->txt('delete'), 'delete', $this->ctrl->getLinkTarget($this->parent_obj, 'deleteEntry'));
$actions->addItem($this->pl->txt('common_delete'), 'delete', $this->ctrl->getLinkTarget($this->parent_obj, 'deleteEntry'));
}
if ($obj->getType() == ctrlmmMenu::TYPE_DROPDOWN) {
$actions->addItem($this->pl->txt('edit_childs'), 'edit_childs', $this->ctrl->getLinkTarget($this->parent_obj, 'editChilds'));
Expand Down
4 changes: 2 additions & 2 deletions classes/EntryTypes/Ctrl/class.ctrlmmEntryCtrlGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function initForm($mode = 'create') {
$te->setRequired(true);
$this->form->addItem($te);

$te = new ilTextInputGUI($this->pl->txt('cmd'), 'my_cmd');
$te = new ilTextInputGUI($this->pl->txt('common_cmd'), 'my_cmd');
$te->setRequired(false);
$this->form->addItem($te);

Expand All @@ -43,7 +43,7 @@ public function initForm($mode = 'create') {
$te->setValue($this->entry->getType());
$this->form->addItem($te);

$se = new ilSelectInputGUI($this->pl->txt('target'), 'target');
$se = new ilSelectInputGUI($this->pl->txt('common_target'), 'target');
$opt = array( '_top' => $this->pl->txt('same_page'), '_blank' => $this->pl->txt('new_page') );
$se->setOptions($opt);
$this->form->addItem($se);
Expand Down
21 changes: 19 additions & 2 deletions classes/EntryTypes/Desktop/class.ctrlmmEntryDesktop.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ class ctrlmmEntryDesktop extends ctrlmmEntry {
*/
protected $show_logout = true;
/**
* @var int
* @var bool
*/
//protected $type = ctrlmmMenu::TYPE_DESKTOP;
protected $disable_active = false;


public function __construct($primary_key = 0) {
$this->setType(ctrlmmMenu::TYPE_DESKTOP);
Expand All @@ -67,6 +68,22 @@ public function getShowLogout() {
}


/**
* @return boolean
*/
public function isDisableActive() {
return $this->disable_active;
}


/**
* @param boolean $disable_active
*/
public function setDisableActive($disable_active) {
$this->disable_active = $disable_active;
}


/**
* @return bool
*/
Expand Down
Loading

0 comments on commit 38d7e4c

Please sign in to comment.