BUG 7955 this issue was fixed.
This commit is contained in:
@@ -149,6 +149,13 @@ class Content extends BaseContent {
|
||||
*/
|
||||
function addContent($ConCategory, $ConParent, $ConId, $ConLang, $ConValue) {
|
||||
try {
|
||||
if ($ConLang != 'en') {
|
||||
$baseLangContent = ContentPeer::retrieveByPk($ConCategory, $ConParent, $ConId, 'en');
|
||||
if ($baseLangContent === null) {
|
||||
Content::addContent($ConCategory, $ConParent, $ConId, 'en', $ConValue);
|
||||
}
|
||||
}
|
||||
|
||||
$con = ContentPeer::retrieveByPK ( $ConCategory, $ConParent, $ConId, $ConLang );
|
||||
|
||||
if (is_null ( $con )) {
|
||||
@@ -326,20 +333,4 @@ class Content extends BaseContent {
|
||||
return $aRoles;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify the if content on teh current language exists for the base language 'english
|
||||
* if not copy for it.
|
||||
*
|
||||
* @autor Erik Amaru Ortiz <erik@colosa.com>
|
||||
* @param $category
|
||||
* @param $id
|
||||
* @param $value
|
||||
*/
|
||||
function copyContentOnBaseLanguageIfNotExists($category, $id, $value)
|
||||
{
|
||||
$con = ContentPeer::retrieveByPk($category, '', $id, 'en');
|
||||
if ($con === null) {
|
||||
Content::addContent($category, '', $id, 'en', $value);
|
||||
}
|
||||
}
|
||||
} // Content
|
||||
|
||||
@@ -82,9 +82,6 @@ class Dynaform extends BaseDynaform {
|
||||
$this->dyn_title = $v;
|
||||
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('DYN_TITLE', $this->getDynUid(), $this->dyn_title);
|
||||
|
||||
$res = Content::addContent( 'DYN_TITLE', '', $this->getDynUid(), $lang, $this->dyn_title );
|
||||
}
|
||||
|
||||
@@ -131,9 +128,6 @@ class Dynaform extends BaseDynaform {
|
||||
$this->dyn_description = $v;
|
||||
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('DYN_DESCRIPTION', $this->getDynUid(), $this->dyn_description);
|
||||
|
||||
$res = Content::addContent( 'DYN_DESCRIPTION', '', $this->getDynUid(), $lang, $this->dyn_description );
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ class Groupwf extends BaseGroupwf {
|
||||
* This value goes in the content table
|
||||
* @var string
|
||||
*/
|
||||
//protected $grp_title = '';
|
||||
protected $grp_title = '';
|
||||
|
||||
/**
|
||||
@@ -312,4 +313,51 @@ class Groupwf extends BaseGroupwf {
|
||||
return $result;
|
||||
}
|
||||
|
||||
function filterGroup($filter,$start,$limit)
|
||||
{
|
||||
require_once 'classes/model/Groupwf.php';
|
||||
require_once 'classes/model/TaskUser.php';
|
||||
require_once 'classes/model/GroupUser.php';
|
||||
G::LoadClass('configuration');
|
||||
|
||||
$co = new Configurations();
|
||||
$config = $co->getConfiguration('groupList', 'pageSize','',$_SESSION['USER_LOGGED']);
|
||||
$env = $co->getConfiguration('ENVIRONMENT_SETTINGS', '');
|
||||
$limit_size = isset($config['pageSize']) ? $config['pageSize'] : 20;
|
||||
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
|
||||
$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : $limit_size;
|
||||
$filter = isset($_REQUEST['textFilter']) ? $_REQUEST['textFilter'] : '';
|
||||
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(GroupwfPeer::GRP_UID);
|
||||
$oCriteria->addJoin(GroupwfPeer::GRP_UID, ContentPeer::CON_ID, Criteria::LEFT_JOIN);
|
||||
$oCriteria->add(ContentPeer::CON_CATEGORY,'GRP_TITLE');
|
||||
$oCriteria->add(ContentPeer::CON_LANG,SYS_LANG);
|
||||
if ($filter != ''){
|
||||
$oCriteria->add(ContentPeer::CON_VALUE, '%'.$filter.'%', Criteria::LIKE);
|
||||
}
|
||||
$totalRows = GroupwfPeer::doCount($oCriteria);
|
||||
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->clearSelectColumns();
|
||||
$oCriteria->addSelectColumn(GroupwfPeer::GRP_UID);
|
||||
$oCriteria->addSelectColumn(GroupwfPeer::GRP_STATUS);
|
||||
$oCriteria->addSelectColumn(ContentPeer::CON_VALUE);
|
||||
$oCriteria->addAsColumn('GRP_TASKS', 0);
|
||||
$oCriteria->addAsColumn('GRP_USERS', 0);
|
||||
$oCriteria->addJoin(GroupwfPeer::GRP_UID, ContentPeer::CON_ID, Criteria::LEFT_JOIN);
|
||||
$oCriteria->add(ContentPeer::CON_CATEGORY,'GRP_TITLE');
|
||||
$oCriteria->add(ContentPeer::CON_LANG,SYS_LANG);
|
||||
if ($filter != ''){
|
||||
$oCriteria->add(ContentPeer::CON_VALUE, '%'.$filter.'%', Criteria::LIKE);
|
||||
}
|
||||
$oCriteria->setOffset($start);
|
||||
$oCriteria->setLimit($limit);
|
||||
|
||||
$oDataset = GroupwfPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // Groupwf
|
||||
|
||||
@@ -245,9 +245,6 @@ class InputDocument extends BaseInputDocument {
|
||||
try {
|
||||
$this->inp_doc_title = $sValue;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('INP_DOC_TITLE', $this->getInpDocUid(), $this->inp_doc_title);
|
||||
|
||||
$iResult = Content::addContent('INP_DOC_TITLE', '', $this->getInpDocUid(), (defined('SYS_LANG') ? SYS_LANG : 'en'), $this->inp_doc_title);
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
@@ -289,9 +286,6 @@ class InputDocument extends BaseInputDocument {
|
||||
try {
|
||||
$this->inp_doc_description = $sValue;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('INP_DOC_DESCRIPTION', $this->getInpDocUid(), $this->inp_doc_description);
|
||||
|
||||
$iResult = Content::addContent('INP_DOC_DESCRIPTION', '', $this->getInpDocUid(), (defined('SYS_LANG') ? SYS_LANG : 'en'), $this->inp_doc_description);
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
|
||||
@@ -291,9 +291,6 @@ class OutputDocument extends BaseOutputDocument {
|
||||
try {
|
||||
$this->out_doc_title = $sValue;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('OUT_DOC_TITLE', $this->getOutDocUid(), $this->out_doc_title);
|
||||
|
||||
$iResult = Content::addContent('OUT_DOC_TITLE', '', $this->getOutDocUid(), (defined('SYS_LANG') ? SYS_LANG : 'en'), $this->out_doc_title);
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
@@ -335,9 +332,6 @@ class OutputDocument extends BaseOutputDocument {
|
||||
try {
|
||||
$this->out_doc_description = $sValue;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('OUT_DOC_DESCRIPTION', $this->getOutDocUid(), $this->out_doc_description);
|
||||
|
||||
$iResult = Content::addContent('OUT_DOC_DESCRIPTION', '', $this->getOutDocUid(), (defined('SYS_LANG') ? SYS_LANG : 'en'), $this->out_doc_description);
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
|
||||
@@ -82,9 +82,6 @@ class Process extends BaseProcess {
|
||||
$this->pro_title = $v;
|
||||
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('PRO_TITLE', $this->getProUid(), $this->pro_title);
|
||||
|
||||
$res = Content::addContent( 'PRO_TITLE', '', $this->getProUid(), $lang, $this->pro_title );
|
||||
}
|
||||
|
||||
@@ -131,9 +128,6 @@ class Process extends BaseProcess {
|
||||
$this->pro_description = $v;
|
||||
$lang = defined ( 'SYS_LANG') ? SYS_LANG : 'en';
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('PRO_DESCRIPTION', $this->getProUid(), $this->pro_description);
|
||||
|
||||
$res = Content::addContent( 'PRO_DESCRIPTION', '', $this->getProUid(), $lang, $this->pro_description );
|
||||
}
|
||||
|
||||
|
||||
@@ -225,9 +225,6 @@ function swimlanesElementsExists ( $sSwiEleUid ) {
|
||||
try {
|
||||
$this->swi_text = $sValue;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('SWI_TEXT', $this->getSwiUid(), $this->swi_text);
|
||||
|
||||
$iResult = Content::addContent('SWI_TEXT', '', $this->getSwiUid(), (defined('SYS_LANG') ? SYS_LANG : 'en'), $this->swi_text);
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
|
||||
@@ -74,9 +74,6 @@ class Task extends BaseTask {
|
||||
if ($this->tas_title !== $v || $v==="") {
|
||||
$this->tas_title = $v;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('TAS_TITLE', $this->getTasUid(), $this->tas_title);
|
||||
|
||||
$res = Content::addContent( 'TAS_TITLE', '', $this->getTasUid(), $lang, $this->tas_title );
|
||||
return $res;
|
||||
}
|
||||
@@ -116,9 +113,6 @@ class Task extends BaseTask {
|
||||
if ($this->tas_description !== $v || $v==="") {
|
||||
$this->tas_description = $v;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('TAS_DESCRIPTION', $this->getTasUid(), $this->tas_description);
|
||||
|
||||
$res = Content::addContent( 'TAS_DESCRIPTION', '', $this->getTasUid(), $lang, $this->tas_description );
|
||||
return $res;
|
||||
}
|
||||
@@ -158,9 +152,6 @@ class Task extends BaseTask {
|
||||
if ($this->tas_def_title !== $v || $v==="") {
|
||||
$this->tas_def_title = $v;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('TAS_DEF_TITLE', $this->getTasUid(), $this->tas_def_title);
|
||||
|
||||
$res = Content::addContent( 'TAS_DEF_TITLE', '', $this->getTasUid(), $lang, $this->tas_def_title );
|
||||
return $res;
|
||||
}
|
||||
@@ -200,9 +191,6 @@ class Task extends BaseTask {
|
||||
if ($this->tas_def_description !== $v || $v==="") {
|
||||
$this->tas_def_description = $v;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('TAS_DEF_DESCRIPTION', $this->getTasUid(), $this->tas_def_description);
|
||||
|
||||
$res = Content::addContent( 'TAS_DEF_DESCRIPTION', '', $this->getTasUid(), $lang, $this->tas_def_description );
|
||||
return $res;
|
||||
}
|
||||
@@ -242,9 +230,6 @@ class Task extends BaseTask {
|
||||
if ($this->tas_def_proc_code !== $v || $v==="") {
|
||||
$this->tas_def_proc_code = $v;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('TAS_DEF_PROC_CODE', $this->getTasUid(), $this->tas_def_proc_code);
|
||||
|
||||
$res = Content::addContent( 'TAS_DEF_PROC_CODE', '', $this->getTasUid(), $lang, $this->tas_def_proc_code );
|
||||
return $res;
|
||||
}
|
||||
@@ -285,9 +270,6 @@ class Task extends BaseTask {
|
||||
if ($this->tas_def_message !== $v || $v==="") {
|
||||
$this->tas_def_message = $v;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('TAS_DEF_MESSAGE', $this->getTasUid(), $this->tas_def_message);
|
||||
|
||||
$res = Content::addContent( 'TAS_DEF_MESSAGE', '', $this->getTasUid(), $lang, $this->tas_def_message );
|
||||
return $res;
|
||||
}
|
||||
@@ -332,9 +314,6 @@ class Task extends BaseTask {
|
||||
if ($this->tas_def_subject_message !== $v || $v==="") {
|
||||
$this->tas_def_subject_message = $v;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('TAS_DEF_SUBJECT_MESSAGE', $this->getTasUid(), $this->tas_def_subject_message);
|
||||
|
||||
$res = Content::addContent( 'TAS_DEF_SUBJECT_MESSAGE', '', $this->getTasUid(), $lang, $this->tas_def_subject_message );
|
||||
|
||||
return $res;
|
||||
|
||||
@@ -74,9 +74,6 @@ class Triggers extends BaseTriggers {
|
||||
if ($this->tri_title !== $v || $v==="") {
|
||||
$this->tri_title = $v;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('TRI_TITLE', $this->getTriUid(), $this->tri_title);
|
||||
|
||||
$res = Content::addContent( 'TRI_TITLE', '', $this->getTriUid(), $lang, $this->tri_title );
|
||||
return $res;
|
||||
}
|
||||
@@ -116,9 +113,6 @@ class Triggers extends BaseTriggers {
|
||||
if ($this->tri_description !== $v || $v==="") {
|
||||
$this->tri_description = $v;
|
||||
|
||||
//verify the content for base language
|
||||
Content::copyContentOnBaseLanguageIfNotExists('TRI_DESCRIPTION', $this->getTriUid(), $this->tri_description);
|
||||
|
||||
$res = Content::addContent( 'TRI_DESCRIPTION', '', $this->getTriUid(), $lang, $this->tri_description );
|
||||
return $res;
|
||||
}
|
||||
|
||||
@@ -156,11 +156,18 @@ Ext.onReady(function(){
|
||||
{xtype: 'textfield', fieldLabel: _('ID_GROUP_NAME'), name: 'name', width: 200, allowBlank: false},
|
||||
{
|
||||
xtype: 'combo',
|
||||
id : 'status',
|
||||
name : 'status',
|
||||
fieldLabel: _('ID_STATUS'),
|
||||
hiddenName: 'status',
|
||||
typeAhead: true,
|
||||
mode: 'local',
|
||||
store: comboStatusStore,
|
||||
listeners : {
|
||||
beforerender: function(status){
|
||||
status.setValue('ACTIVE');
|
||||
}
|
||||
},
|
||||
displayField: 'value',
|
||||
valueField:'value',
|
||||
allowBlank: false,
|
||||
|
||||
Reference in New Issue
Block a user