Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Tue, May 20, 8:58 PM

in-portal

Index: branches/unlabeled/unlabeled-1.1.4/core/units/files/file_eh.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.4/core/units/files/file_eh.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.4/core/units/files/file_eh.php (revision 10594)
@@ -0,0 +1,89 @@
+<?php
+ class FileEventHandler extends kDBEventHandler {
+
+ /**
+ * Allows to override standart permission mapping
+ *
+ */
+ function mapPermissions()
+ {
+ parent::mapPermissions();
+ $permissions = Array(
+ 'OnDownloadFile' => Array('subitem' => 'view'),
+ );
+
+ $this->permMapping = array_merge($this->permMapping, $permissions);
+ }
+
+ /**
+ * [HOOK] Allows to apply file functionality to specific config
+ * When main item is created, then #file config is cloned
+ *
+ * @param kEvent $event
+ */
+ function OnDefineFiles(&$event)
+ {
+ $clones = $this->Application->getUnitOption('#file', 'Clones');
+ $clones[$event->MasterEvent->Prefix.'-file'] = Array (
+ 'ParentPrefix' => $event->MasterEvent->Prefix,
+ );
+ $this->Application->setUnitOption('#file', 'Clones', $clones);
+ }
+
+ /**
+ * Remembers user, who is created file record. Makes file primary if no other files are uploaded.
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemCreate(&$event)
+ {
+ $object =& $event->getObject();
+ $object->SetDBField('CreatedById', $this->Application->RecallVar('user_id'));
+ }
+
+ /**
+ * Resets primary file mark when more then one file is marked as primary
+ *
+ * @param kEvent $event
+ */
+ function OnBeforeItemUpdate(&$event)
+ {
+ $object =& $event->getObject();
+
+ if (!$object->GetDBField('FileName')) {
+ $object->SetDBField('FileName', basename($object->GetDBField('FilePath')));
+ }
+ }
+
+ function SetCustomQuery(&$event)
+ {
+ parent::SetCustomQuery($event);
+
+ $object =& $event->getObject();
+
+ if (!$this->Application->IsAdmin()) {
+ $object->addFilter('active_filter', '%1$s.Status = '.STATUS_ACTIVE);
+ }
+ }
+
+ /**
+ * Returns file contents associated with item
+ *
+ * @param kEvent $event
+ */
+ function OnDownloadFile(&$event)
+ {
+ $object =& $event->getObject();
+ /* @var $object kDBItem */
+
+ $file_helper =& $this->Application->recallObject('FileHelper');
+ /* @var $file_helper FileHelper */
+
+ $filename = $object->GetField('FilePath', 'full_path');
+ $file_helper->DownloadFile($filename);
+
+ $event->status = erSTOP;
+ }
+ }
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.4/core/units/files/file_eh.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.4/core/units/files/file_tp.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.4/core/units/files/file_tp.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.4/core/units/files/file_tp.php (revision 10594)
@@ -0,0 +1,25 @@
+<?php
+
+ class FileTagProcessor extends kDBTagProcessor {
+
+ function DownloadFileLink($params)
+ {
+ $params[$this->getPrefixSpecial().'_event'] = 'OnDownloadFile';
+ $params['pass'] = 'm,'.$this->Application->getUnitOption($this->Prefix, 'ParentPrefix').','.$this->getPrefixSpecial();
+
+ return $this->ItemLink($params);
+ }
+
+ function FileIcon($params)
+ {
+ $object =& $this->getObject($params);
+ /* @var $object kDBItem */
+
+ $last_dot = mb_strrpos($object->GetDBField('FilePath'), '.');
+ $ext = ($last_dot !== false) ? mb_substr($object->GetDBField('FilePath'), $last_dot + 1).'.gif' : '';
+
+ return $ext ? $ext : $params['default'];
+ }
+ }
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.4/core/units/files/file_tp.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.4/core/units/files/files_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.4/core/units/files/files_config.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.4/core/units/files/files_config.php (revision 10594)
@@ -0,0 +1,84 @@
+<?php
+
+ $config = Array (
+ 'Prefix' => '#file',
+ 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
+ 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
+ 'EventHandlerClass' => Array ('class' => 'FileEventHandler', 'file' => 'file_eh.php', 'build_event' => 'OnBuild'),
+ 'TagProcessorClass' => Array ('class' => 'FileTagProcessor', 'file' => 'file_tp.php', 'build_event' => 'OnBuild'),
+
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array (
+ 1 => 'id',
+ 2 => 'page',
+ 3 => 'event',
+ ),
+
+ 'IDField' => 'FileId',
+ 'StatusField' => Array('Status', 'IsPrimary'),
+
+ 'TitleField' => 'FileName',
+ 'TableName' => TABLE_PREFIX.'ItemFiles',
+
+ 'ParentTableKey' => 'ResourceId',
+ 'ForeignKey' => 'ResourceId',
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'FilterMenu' => Array (
+ 'Groups' => Array (
+ Array ('mode' => 'AND', 'filters' => Array ('show_active','show_disabled'), 'type' => WHERE_FILTER),
+ ),
+
+ 'Filters' => Array(
+ 'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => '%1$s.Status != 1' ),
+ 'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => '%1$s.Status != 0' ),
+ )
+ ),
+
+ 'ListSQLs' => Array (
+ '' => 'SELECT * FROM %s',
+ ),
+
+ 'ItemSQLs' => Array (
+ '' => 'SELECT * FROM %s',
+ ),
+
+ 'ListSortings' => Array (
+ '' => Array (
+ 'Sorting' => Array ('FileName' => 'asc'),
+ )
+ ),
+
+ 'Fields' => Array (
+ 'FileId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'ResourceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'FileName' => Array ('type' => 'string', 'max_len' => 255, 'required' => 1, 'not_null' => 1, 'default' => ''),
+ 'FilePath' => Array (
+ 'type' => 'string', 'max_len' => 255,
+ 'formatter' => 'kUploadFormatter', 'upload_dir' => '/kernel/downloads/', 'include_path' => false,
+ 'size_field' => 'Size', 'content_type_field' => 'MimeType', 'max_size' => 50000000,
+ 'allowed_types' => Array ('application/pdf', 'application/msexcel', 'application/vnd.ms-excel', 'application/msword', 'application/mspowerpoint', 'application/zip', 'plain/text', 'application/x-gzip'),
+ 'not_null' => 1, 'required' => 1, 'default' => ''
+ ),
+ 'Size' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1),
+ 'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => 1, 'default' => '#NOW#'),
+ 'CreatedById' => Array ('type' => 'int', 'not_null' => 1, 'default' => -1),
+ 'MimeType' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ ),
+
+ 'Grids' => Array (
+ 'Default' => Array (
+ 'Icons' => Array ('default' => 'icon16_custom.gif', '1_0' => 'icon16_file.gif', '1_1' => 'icon16_file_primary.gif', '0_0' => 'icon16_file_disabled.gif'),
+ 'Fields' => Array(
+ 'FileId' => Array ('title' => 'la_col_Id' , 'data_block' => 'grid_checkbox_td', 'module' => 'In-Portal'),
+ 'FileName' => Array ('title' => 'la_col_FileName'),
+ 'Status' => Array ('title' => 'la_col_Status'),
+ ),
+ ),
+ ),
+ );
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.4/core/units/files/files_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.4/core/units/related_searches/related_searches_event_handler.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.4/core/units/related_searches/related_searches_event_handler.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.4/core/units/related_searches/related_searches_event_handler.php (revision 10594)
@@ -0,0 +1,24 @@
+<?php
+
+ class RelatedSearchEventHandler extends kDBEventHandler
+ {
+ /**
+ * Initializes new relation
+ *
+ * @param kEvent $event
+ */
+ function OnNew(&$event)
+ {
+ parent::OnNew($event);
+
+ $object =& $event->getObject();
+
+ $table_info = $object->getLinkedInfo();
+
+ $source_itemtype = $this->Application->getUnitOption($table_info['ParentPrefix'], 'ItemType');
+ $object->SetDBField('ItemType', $source_itemtype);
+ }
+ }
+
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.4/core/units/related_searches/related_searches_event_handler.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.4/core/units/related_searches/related_searches_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.4/core/units/related_searches/related_searches_config.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.4/core/units/related_searches/related_searches_config.php (revision 10594)
@@ -0,0 +1,101 @@
+<?php
+
+$config = Array(
+ 'Prefix' => 'search',
+
+ 'Clones' => Array(
+ 'c-search' => Array('ParentPrefix' => 'c'),
+ /*'l-rel' => Array('ParentPrefix' => 'l'),
+ 'n-rel' => Array('ParentPrefix' => 'n'),
+ 'bb-rel'=> Array('ParentPrefix' => 'bb'),
+ 'p-rel' => Array('ParentPrefix' => 'p'),
+ 'cms-rel'=> Array('ParentPrefix' => 'cms'),*/
+ ),
+
+ 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+ 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
+ 'EventHandlerClass' => Array('class'=>'RelatedSearchEventHandler','file'=>'related_searches_event_handler.php','build_event'=>'OnBuild'),
+ 'TagProcessorClass' => Array('class'=>'RelatedSearchTagProcessor','file'=>'related_searches_tag_processor.php','build_event'=>'OnBuild'),
+ 'AutoLoad' => true,
+
+ 'QueryString' => Array(
+ 1 => 'id',
+ 2 => 'page',
+ 3 => 'event',
+ ),
+ 'IDField' => 'RelatedSearchId',
+ 'StatusField' => Array('Enabled'),
+ 'TableName' => TABLE_PREFIX.'RelatedSearches',
+ 'ParentTableKey' => 'ResourceId',
+ 'ForeignKey' => 'ResourceId',
+ 'ParentPrefix' => 'c',
+ 'AutoDelete' => true,
+ 'AutoClone' => true,
+
+ 'FilterMenu' => Array(
+ 'Groups' => Array(
+ Array('mode' => 'AND', 'filters' => Array('show_active','show_disabled'), 'type' => WHERE_FILTER),
+ Array('mode' => 'AND', 'filters' => Array('show_recip','show_oneway'), 'type' => WHERE_FILTER),
+ ),
+ 'Filters' => Array(
+ 'show_active' => Array('label' =>'la_Active', 'on_sql' => '', 'off_sql' => 'Enabled != 1' ),
+ 'show_disabled' => Array('label' => 'la_Disabled', 'on_sql' => '', 'off_sql' => 'Enabled != 0' ),
+ 's1' => Array(),
+ /*
+ 'show_recip' => Array('label' => 'la_Reciprocal', 'on_sql' => '', 'off_sql' => '%1$s.Type != 1' ),
+ 'show_oneway' => Array('label' => 'la_OneWay', 'on_sql' => '', 'off_sql' => '%1$s.Type != 2' ),
+ */
+ )
+ ),
+
+ 'CalculatedFields' => Array(
+ '' => Array(
+ /* 'ItemName' => 'TRIM(CONCAT(#ITEM_NAMES#))',
+ 'ItemType' => '#ITEM_TYPES#', */
+ ),
+ ),
+
+ 'ListSQLs' => Array( ''=> 'SELECT %1$s.* %2$s FROM %1$s',
+ ), // key - special, value - list select sql
+
+ 'ListSortings' => Array(
+ '' => Array(
+ 'ForcedSorting' => Array('Priority' => 'desc'),
+ 'Sorting' => Array('Keyword' => 'asc'),
+ )
+ ),
+ 'ItemSQLs' => Array( '' => 'SELECT %1$s.* %2$s FROM %1$s',),
+
+ 'Fields' => Array(
+ 'RelatedSearchId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'ResourceId' => Array('type'=>'int', 'not_null' => 1, 'required' => 1, 'default' => 0),
+ 'Keyword' => Array('type'=>'string', 'required' => 1, 'not_null' => 1, 'default' => ''),
+ /*
+ 'SourceType' => Array('type'=>'int','not_null'=>1,'default'=>0),
+ 'TargetType' => Array('type'=>'int','not_null'=>1,'default'=>0),
+ */
+ 'ItemType' => Array('type'=>'int', 'not_null' => 1, 'required' => 1, 'default' => 0),
+ 'Enabled' => Array('type'=>'int','formatter'=>'kOptionsFormatter','options'=>Array(0=>'la_Disabled',1=>'la_Enabled'),'not_null'=>1,'default'=>1,'use_phrases'=>1),
+ 'Priority' => Array('type'=>'int','not_null'=>1,'default'=>0),
+ ),
+ 'VirtualFields' => Array(
+ /*
+ 'ItemName' => Array(),
+ 'ItemType' => Array(),
+ */
+ ),
+
+ 'Grids' => Array(
+ 'Default' => Array(
+ 'Icons' => Array('default'=>'icon16_custom.gif','1_0'=>'icon16_relation_one-way.gif','0_0'=>'icon16_relation_one-way_disabled.gif','1_1'=>'icon16_relation_reciprocal.gif','0_1'=>'icon16_relation_reciprocal_disabled.gif'), // icons for each StatusField values, if no matches or no statusfield selected, then "default" icon is used
+ 'Fields' => Array(
+ /* 'RelatedSearchId' => Array( 'title'=>'la_col_Id', 'data_block' => 'grid_checkbox_td'), */
+ 'Keyword' => Array( 'title'=>'la_col_Keyword', 'data_block' => 'grid_keyword_td'),
+ 'Enabled' => Array( 'title'=>'la_col_Status' ),
+ ),
+
+ ),
+ ),
+ );
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.4/core/units/related_searches/related_searches_config.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.4/core/units/related_searches/related_searches_tag_processor.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.4/core/units/related_searches/related_searches_tag_processor.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.4/core/units/related_searches/related_searches_tag_processor.php (revision 10594)
@@ -0,0 +1,20 @@
+<?php
+
+class RelatedSearchTagProcessor extends kDBTagProcessor {
+
+ /**
+ * Returns url for search on the Fornt End
+ *
+ * @param Array $params
+ * @return string
+ */
+ function RelatedSearchUrl($params)
+ {
+ $object =& $this->getObject($params);
+ $keyword = $object->GetDBField('Keyword');
+
+ return $this->Application->HREF($params['search_template'],'', Array('keywords' => $keyword));
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.4/core/units/related_searches/related_searches_tag_processor.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.4/core/admin_templates/categories/related_searches_edit.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.4/core/admin_templates/categories/related_searches_edit.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.4/core/admin_templates/categories/related_searches_edit.tpl (revision 10594)
@@ -0,0 +1,42 @@
+<inp2:m_RequireLogin permissions="CATEGORY.VIEW"/>
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+<inp2:m_RenderElement name="section_header" prefix="c" icon="icon46_catalog" module="in-portal" title="!la_title_Categories!"/>
+
+<inp2:m_RenderElement name="blue_bar" prefix="c" title_preset="related_searches_edit" module="in-portal" icon="icon46_catalog"/>
+
+<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+ submit_event('c-search','<inp2:c-search_SaveEvent/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ submit_event('c-search','OnCancel');
+ }
+ ) );
+
+ a_toolbar.Render();
+ </script>
+ </td>
+ </tr>
+</tbody>
+</table>
+
+<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
+ <inp2:m_RenderElement name="subsection" title="!la_section_Relation!"/>
+ <inp2:m_RenderElement name="inp_edit_hidden" prefix="c-search" field="ResourceId"/>
+ <inp2:m_RenderElement name="inp_edit_hidden" prefix="c-search" field="ItemType"/>
+
+ <inp2:m_RenderElement name="inp_id_label" prefix="c-search" field="RelatedSearchId" title="la_fld_Id"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="c-search" field="Keyword" title="!la_fld_RelatedSearchKeyword!" size="50"/>
+ <inp2:m_RenderElement name="inp_edit_checkbox" prefix="c-search" field="Enabled" title="!la_fld_Enabled!"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="c-search" field="Priority" title="!la_fld_Priority!" size="4"/>
+</table>
+<inp2:m_include t="incs/footer"/>
Property changes on: branches/unlabeled/unlabeled-1.1.4/core/admin_templates/categories/related_searches_edit.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.4/core/admin_templates/categories/categories_edit_related_searches.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.1.4/core/admin_templates/categories/categories_edit_related_searches.tpl (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.4/core/admin_templates/categories/categories_edit_related_searches.tpl (revision 10594)
@@ -0,0 +1,126 @@
+<inp2:m_RequireLogin permissions="CATEGORY.VIEW"/>
+<inp2:m_include t="incs/header" nobody="yes"/>
+
+<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
+<inp2:m_RenderElement name="section_header" prefix="c" icon="icon46_catalog" module="in-portal" title="!la_title_Categories!"/>
+
+<inp2:m_include t="in-portal/categories/categories_tabs"/>
+
+<inp2:m_RenderElement name="blue_bar" prefix="c" title_preset="categories_related_searches" module="in-portal" icon="icon46_catalog"/>
+
+<!-- ToolBar --->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+<tbody>
+ <tr>
+ <td>
+ <script type="text/javascript">
+ a_toolbar = new ToolBar();
+ a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
+ submit_event('c','<inp2:c_SaveEvent/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
+ submit_event('c','OnCancelEdit');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep1') );
+
+ a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
+ go_to_id('c', '<inp2:c_PrevId/>');
+ }
+ ) );
+ a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
+ go_to_id('c', '<inp2:c_NextId/>');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep2') );
+
+ //Relations related:
+ a_toolbar.AddButton( new ToolBarButton('in-portal:new_related_search', '<inp2:m_phrase label="la_ToolTip_New_Keyword" escape="1"/>',
+ function() {
+ std_new_item('c-search', 'in-portal/categories/related_searches_edit')
+ } ) );
+
+ function edit()
+ {
+ std_edit_temp_item('c-search', 'in-portal/categories/related_searches_edit');
+ }
+
+ a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
+ a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
+ function() {
+ std_delete_items('c-search')
+ } ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+ a_toolbar.AddButton( new ToolBarButton('move_up', '<inp2:m_phrase label="la_ToolTip_MoveUp" escape="1"/>', function() {
+ submit_event('c-search','OnMassMoveUp');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarButton('move_down', '<inp2:m_phrase label="la_ToolTip_MoveDown" escape="1"/>', function() {
+ submit_event('c-search','OnMassMoveDown');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep3') );
+
+ a_toolbar.AddButton( new ToolBarButton('approve', '<inp2:m_phrase label="la_ToolTip_Approve" escape="1"/>', function() {
+ submit_event('c-search','OnMassApprove');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarButton('decline', '<inp2:m_phrase label="la_ToolTip_Decline" escape="1"/>', function() {
+ submit_event('c-search','OnMassDecline');
+ }
+ ) );
+
+ a_toolbar.AddButton( new ToolBarSeparator('sep4') );
+
+ a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
+ show_viewmenu(a_toolbar,'view');
+ }
+ ) );
+
+ a_toolbar.Render();
+
+ <inp2:m_if check="c_IsSingle" >
+ a_toolbar.HideButton('prev');
+ a_toolbar.HideButton('next');
+ a_toolbar.HideButton('sep1');
+ //a_toolbar.HideButton('sep2');
+ <inp2:m_else/>
+ <inp2:m_if check="c_IsLast" >
+ a_toolbar.DisableButton('next');
+ </inp2:m_if>
+ <inp2:m_if check="c_IsFirst" >
+ a_toolbar.DisableButton('prev');
+ </inp2:m_if>
+ </inp2:m_if>
+ </script>
+ </td>
+ </tr>
+</tbody>
+</table>
+
+<inp2:m_DefineElement name="grid_keyword_td" >
+ <td valign="top" class="text">
+ <input type="checkbox" name="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>" id="<inp2:{$PrefixSpecial}_InputName field="$IdField" IdField="$IdField"/>">
+ <img src="<inp2:ModulePath module="In-Portal"/>img/itemicons/<inp2:{$PrefixSpecial}_ItemIcon grid="$grid"/>">
+ <inp2:Field field="$field" grid="$grid"/><span class="priority"><inp2:m_if check="{$PrefixSpecial}_fieldequals" field="Priority" value="0"><inp2:m_else/><sup><inp2:{$PrefixSpecial}_field field="Priority" /></sup></inp2:m_if></span>
+ </td>
+</inp2:m_DefineElement>
+
+<inp2:m_RenderElement name="grid" PrefixSpecial="c-search" IdField="RelatedSearchId" grid="Default" menu_filters="yes"/>
+<script type="text/javascript">
+ Grids['c-search'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline') );
+</script>
+<input type="hidden" name="RelatedSearchId" id="RelatedSearchId" value="<inp2:m_get name="RelatedSearchId"/>">
+<inp2:m_include t="incs/footer"/>
+
+<script type="text/javascript">
+ var $env = document.getElementById('sid').value+'-:m<inp2:m_get name="m_cat_id"/>-1-1-1-s';
+</script>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.4/core/admin_templates/categories/categories_edit_related_searches.tpl
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.5.16/core/units/sections/sections_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.5.16/core/units/sections/sections_config.php (revision 10593)
+++ branches/unlabeled/unlabeled-1.5.16/core/units/sections/sections_config.php (revision 10594)
@@ -1,355 +1,342 @@
<?php
$config = Array(
'Prefix' => 'inportal-sections',
'EventHandlerClass' => Array('class' => 'kEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
// 'SectionPrefix' => 'u',
'Sections' => Array(
'in-portal:root' => Array(
'parent' => null,
'icon' => 'in-portal:site',
'label' => $this->Application->ConfigValue('Site_Name'),
'url' => Array('t' => 'sections_list', 'pass' => 'm', 'pass_section' => true, 'no_amp' => 1),
'permissions' => Array('advanced:admin_login', 'advanced:front_login'),
'priority' => 0,
'type' => stTREE,
'SectionPrefix' => 'adm',
),
'in-portal:site' => Array(
'parent' => 'in-portal:root',
'icon' => 'in-portal:struct',
'label' => 'la_tab_Site_Structure',
'url' => Array('t' => 'sections_list', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view'),
'priority' => 1,
'type' => stTREE,
'SectionPrefix' => 'c',
),
'in-portal:browse' => Array(
'parent' => 'in-portal:site',
'icon' => 'in-portal:catalog',
'label' => 'la_tab_Browse',
'url' => Array('t' => 'in-portal/catalog', 'pass' => 'm'),
'late_load' => Array('t' => 'in-portal/xml/tree_categories', 'pass' => 'm', 'm_cat_id' => 0),
'onclick' => 'checkCatalog(0)',
'permissions' => Array('view'),
'priority' => 0.1,
'type' => stTREE,
),
'in-portal:advanced_view' => Array(
'parent' => 'in-portal:site',
'icon' => 'in-portal:advanced_view',
'label' => 'la_tab_AdvancedView',
'url' => Array('t' => 'in-portal/advanced_view', 'pass' => 'm'),
'permissions' => Array('view'),
'priority' => 0.2,
'type' => stTREE,
),
'in-portal:reviews' => Array(
'parent' => 'in-portal:site',
'icon' => 'in-portal:reviews',
'label' => 'la_tab_Reviews',
'url' => Array('index_file' => 'reviews.php', 'pass' => 'm'),
'permissions' => Array('view'),
'priority' => 3,
'type' => stTREE,
),
'in-portal:configure_categories' => Array(
'parent' => 'in-portal:site',
'icon' => 'in-portal:cat_settings',
'label' => 'la_tab_Settings',
'url' => Array('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view', 'edit'),
'priority' => 4,
'type' => stTREE,
),
'in-portal:configuration_search' => Array(
'parent' => 'in-portal:site',
'icon' => 'in-portal:settings_search',
'label' => 'la_tab_ConfigSearch',
'url' => Array('t' => 'in-portal/config/config_search', 'module_key' => 'category', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view', 'edit'),
'priority' => 5,
'type' => stTREE,
),
'in-portal:configuration_email' => Array(
'parent' => 'in-portal:site',
'icon' => 'in-portal:settings_email',
'label' => 'la_tab_ConfigE-mail',
'url' => Array('t' => 'in-portal/config/config_email', 'module' => 'In-Portal:Category', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view', 'edit'),
'priority' => 6,
'type' => stTREE,
),
'in-portal:configuration_custom' => Array(
'parent' => 'in-portal:site',
'icon' => 'in-portal:settings_custom',
'label' => 'la_tab_ConfigCustom',
'url' => Array('t' => 'custom_fields/custom_fields_list', 'cf_type' => 1, 'pass_section' => true, 'pass' => 'm,cf'),
'permissions' => Array('view', 'add', 'edit', 'delete'),
'priority' => 7,
'type' => stTREE,
),
'in-portal:users' => Array(
'parent' => 'in-portal:root',
'icon' => 'in-portal:community',
'label' => 'la_tab_Community',
'url' => Array('t' => 'sections_list', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view'),
'priority' => 2,
'type' => stTREE,
'SectionPrefix' => 'u',
),
'in-portal:user_list' => Array(
'parent' => 'in-portal:users',
'icon' => 'in-portal:users',
'label' => 'la_tab_User_List',
- 'url' => Array('index_file' => 'users/user_list.php', 'pass' => 'm', 'resetpage' => 1),
- 'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:ban', 'advanced:send_email', /*'advanced:add_favorite', 'advanced:remove_favorite',*/),
- 'priority' => 1,
- 'type' => stTREE,
- ),
-
- 'in-portal:k4_user_list' => Array(
- 'parent' => 'in-portal:users',
- 'icon' => 'in-portal:users',
- 'label' => 'la_title_K4Users',
'url' => Array('t' => 'in-portal/users/users_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:ban', 'advanced:send_email', /*'advanced:add_favorite', 'advanced:remove_favorite',*/),
- 'priority' => 1.5,
- 'show_mode' => smDEBUG,
+ 'priority' => 1,
'type' => stTREE,
),
'in-portal:user_groups' => Array(
'parent' => 'in-portal:users',
'icon' => 'in-portal:usergroups',
'label' => 'la_tab_User_Groups',
'url' => Array('t' => 'in-portal/groups/groups_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete', 'advanced:send_email', 'advanced:manage_permissions'),
'priority' => 2,
'type' => stTREE,
),
-
-
'in-portal:configure_users' => Array(
'parent' => 'in-portal:users',
'icon' => 'in-portal:users_settings',
'label' => 'la_tab_ConfigSettings',
'url' => Array('t' => 'config/config_universal', 'module' => 'In-Portal:Users', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view', 'edit'),
'priority' => 3,
'type' => stTREE,
),
'in-portal:user_email' => Array(
'parent' => 'in-portal:users',
'icon' => 'in-portal:settings_email',
'label' => 'la_tab_ConfigE-mail',
'url' => Array('t' => 'config/config_email', 'module' => 'In-Portal:Users', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view', 'edit'),
'priority' => 4,
'type' => stTREE,
),
'in-portal:user_custom' => Array(
'parent' => 'in-portal:users',
'icon' => 'in-portal:settings_custom',
'label' => 'la_tab_ConfigCustom',
'url' => Array('t' => 'custom_fields/custom_fields_list', 'cf_type' => 6, 'pass_section' => true, 'pass' => 'm,cf'),
'permissions' => Array('view', 'add', 'edit', 'delete'),
'priority' => 5,
'type' => stTREE,
),
'in-portal:user_banlist' => Array(
'parent' => 'in-portal:users',
'icon' => 'in-portal:banlist',
'label' => 'la_tab_BanList',
'url' => Array('index_file' => 'config/edit_banlist.php', 'DataType' => 6, 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete'),
'priority' => 6,
'type' => stTREE,
),
// "Help" section
'in-portal:help' => Array(
'parent' => 'in-portal:root',
'icon' => 'in-portal:help',
'label' => 'la_tab_Help',
'url' => Array('index_file' => 'help/manual.pdf', 'pass' => 'm'),
'permissions' => Array('view'),
'priority' => 7,
'type' => stTREE,
),
// "Summary & Logs" section
'in-portal:reports' => Array(
'parent' => 'in-portal:root',
'icon' => 'in-portal:summary_logs',
'label' => 'la_tab_Reports',
'url' => Array('t' => 'sections_list', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view'),
'priority' => 4,
'type' => stTREE,
'SectionPrefix' => 'adm',
),
'in-portal:log_summary' => Array(
'parent' => 'in-portal:reports',
'icon' => 'in-portal:summary',
'label' => 'la_tab_Summary',
'url' => Array('index_file' => 'logs/summary.php', 'pass' => 'm'),
'permissions' => Array('view'),
'priority' => 1,
'type' => stTREE,
),
'in-portal:searchlog' => Array(
'parent' => 'in-portal:reports',
'icon' => 'in-portal:search_log',
'label' => 'la_tab_SearchLog',
'url' => Array('index_file' => 'logs/searchlog.php', 'pass' => 'm'),
'permissions' => Array('view', 'delete'),
'priority' => 2,
'type' => stTREE,
),
'in-portal:sessionlog' => Array(
'parent' => 'in-portal:reports',
'icon' => 'in-portal:sessions_log',
'label' => 'la_tab_SessionLog',
'url' => Array('index_file' => 'logs/session_list.php', 'pass' => 'm'),
'permissions' => Array('view', 'delete'),
'priority' => 3,
'type' => stTREE,
),
'in-portal:emaillog' => Array(
'parent' => 'in-portal:reports',
'icon' => 'in-portal:email_log',
'label' => 'la_tab_EmailLog',
'url' => Array('index_file' => 'logs/email_log.php', 'pass' => 'm'),
'permissions' => Array('view', 'delete'),
'priority' => 4,
'type' => stTREE,
),
'in-portal:visits' => Array(
'parent' => 'in-portal:reports',
'icon' => 'in-portal:visits',
'label' => 'la_tab_Visits',
'url' => Array('t' => 'in-portal/visits/visits_list', 'pass' => 'm'),
'permissions' => Array('view', 'delete'),
'priority' => 5,
'type' => stTREE,
),
// "Configuration" section
'in-portal:system' => Array(
'parent' => 'in-portal:root',
'icon' => 'in-portal:conf',
'label' => 'la_tab_Sys_Config',
'url' => Array('t' => 'sections_list', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view'),
'priority' => 5,
'type' => stTREE,
'SectionPrefix' => 'adm',
),
'in-portal:configure_general' => Array(
'parent' => 'in-portal:system',
'icon' => 'in-portal:conf_general',
'label' => 'la_tab_General',
'url' => Array('t' => 'config/config_universal', 'pass_section' => true, 'module' => 'In-Portal', 'pass' => 'm'),
'permissions' => Array('view', 'edit'),
'priority' => 1,
'type' => stTREE,
),
'in-portal:configure_themes' => Array(
'parent' => 'in-portal:system',
'icon' => 'in-portal:conf_themes',
'label' => 'la_tab_Themes',
'url' => Array('index_file' => 'config/config_theme.php', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete'),
'priority' => 3,
'type' => stTREE,
),
// "Tools" section
'in-portal:tools' => Array(
'parent' => 'in-portal:root',
'icon' => 'in-portal:tools',
'label' => 'la_tab_Tools',
'url' => Array('t' => 'sections_list', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array('view'),
'priority' => 6,
'type' => stTREE,
'SectionPrefix' => 'adm',
),
'in-portal:backup' => Array(
'parent' => 'in-portal:tools',
'icon' => 'in-portal:tool_backup',
'label' => 'la_tab_Backup',
'url' => Array('index_file' => 'backup/backup1.php', 'pass' => 'm'),
'permissions' => Array('view'),
'priority' => 2,
'type' => stTREE,
),
'in-portal:restore' => Array(
'parent' => 'in-portal:tools',
'icon' => 'in-portal:tool_restore',
'label' => 'la_tab_Restore',
'url' => Array('index_file' => 'backup/restore1.php', 'pass' => 'm'),
'permissions' => Array('view'),
'priority' => 3,
'type' => stTREE,
),
'in-portal:main_import' => Array(
'parent' => 'in-portal:tools',
'icon' => 'in-portal:tool_import',
'label' => 'la_tab_ImportData',
'url' => Array('index_file' => 'import/step1.php', 'pass' => 'm'),
'permissions' => Array('view'),
'priority' => 4,
'type' => stTREE,
),
'in-portal:sql_query' => Array(
'parent' => 'in-portal:tools',
'icon' => 'in-portal:tool_import',
'label' => 'la_tab_QueryDB',
'url' => Array('index_file' => 'tools/sql_query.php', 'pass' => 'm'),
'permissions' => Array('view', 'edit'),
'priority' => 5,
'type' => stTREE,
),
'in-portal:server_info' => Array(
'parent' => 'in-portal:tools',
'icon' => 'in-portal:server_info',
'label' => 'la_tab_ServerInfo',
'url' => Array('index_file' => 'tools/server_info.php', 'pass' => 'm'),
'permissions' => Array('view'),
'priority' => 6,
'type' => stTREE,
),
),
);
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.5.16/core/units/sections/sections_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.5
\ No newline at end of property
+1.5.16.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.5.16/core/admin_templates/groups/groups_edit.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.5.16/core/admin_templates/groups/groups_edit.tpl (revision 10593)
+++ branches/unlabeled/unlabeled-1.5.16/core/admin_templates/groups/groups_edit.tpl (revision 10594)
@@ -1,71 +1,71 @@
<inp2:adm_SetPopupSize width="750" height="761"/>
<inp2:m_RequireLogin permissions="in-portal:user_groups.view" system="1"/>
<inp2:m_include t="incs/header" nobody="yes"/>
<body topmargin="0" leftmargin="8" marginheight="0" marginwidth="8" bgcolor="#FFFFFF">
<inp2:m_RenderElement name="section_header" prefix="g" icon="icon46_usergroups" module="in-portal" title="!la_title_Groups!"/>
<inp2:m_include t="in-portal/groups/groups_edit_tabs"/>
<inp2:m_RenderElement name="blue_bar" prefix="g" title_preset="groups_edit" module="in-portal" icon="icon46_usergroups"/>
<!-- ToolBar --->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('g','<inp2:g_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('g','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('g', '<inp2:g_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('g', '<inp2:g_NextId/>');
}
) );
a_toolbar.Render();
<inp2:m_if check="g_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="g_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="g_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:g_SaveWarning name="grid_save_warning"/>
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder">
<inp2:m_RenderElement name="subsection" title="!la_section_General!"/>
<inp2:m_RenderElement name="inp_id_label" prefix="g" field="GroupId" title="!la_fld_GroupId!"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="g" field="Name" title="!la_fld_GroupName!"/>
<inp2:m_RenderElement name="inp_edit_textarea" prefix="g" field="Description" title="!la_fld_Comments!" rows="5" cols="30"/>
<inp2:m_if check="m_IsDebugMode">
- <inp2:m_RenderElement name="inp_edit_radio" prefix="g" field="Enabled" title="!la_fld_Enabled!" use_phrases="1"/>
+ <inp2:m_RenderElement name="inp_edit_radio" prefix="g" field="Enabled" title="!la_fld_Enabled!"/>
</inp2:m_if>
</table>
<inp2:m_include t="incs/footer"/>
Property changes on: branches/unlabeled/unlabeled-1.5.16/core/admin_templates/groups/groups_edit.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.5
\ No newline at end of property
+1.5.16.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.5.16/core/admin_templates/categories/categories_tabs.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.5.16/core/admin_templates/categories/categories_tabs.tpl (revision 10593)
+++ branches/unlabeled/unlabeled-1.5.16/core/admin_templates/categories/categories_tabs.tpl (revision 10594)
@@ -1,33 +1,34 @@
<inp2:m_DefineElement name="grid_save_warning">
<table id="save_warning" width="100%" border="0" cellspacing="0" cellpadding="4" class="table_border_notop" style="display: <inp2:m_if check="m_ParamEquals" name="display" value="1">block<inp2:m_else/>none</inp2:_if>;">
<tr>
<td valign="top" class="hint_red">
<inp2:m_phrase name="la_Warning_Save_Item"/>
</td>
</tr>
</table>
<script type="text/javascript">
$edit_mode = <inp2:m_if check="m_ParamEquals" name="display" value="1">true<inp2:m_else />false</inp2:m_if>;
</script>
</inp2:m_DefineElement>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td align="right" width="100%">
<table cellpadding="0" cellspacing="0" border="0" height="23">
<tr>
<inp2:m_if check="c_IsRootCategory">
<inp2:m_RenderElement name="tab" title="la_tab_Permissions" t="in-portal/categories/categories_edit_permissions" main_prefix="c"/>
<inp2:m_else/>
<inp2:m_RenderElement name="tab" title="la_tab_General" t="in-portal/categories/categories_edit" main_prefix="c"/>
<inp2:m_RenderElement name="tab" title="la_tab_Properties" t="in-portal/categories/categories_edit_properties" main_prefix="c"/>
<inp2:m_RenderElement name="tab" title="la_tab_Relations" t="in-portal/categories/categories_edit_relations" main_prefix="c"/>
+ <inp2:m_RenderElement name="tab" title="la_tab_Related_Searches" t="in-portal/categories/categories_edit_related_searches" main_prefix="c"/>
<inp2:m_RenderElement name="tab" title="la_tab_Images" t="in-portal/categories/categories_edit_images" main_prefix="c"/>
<inp2:m_RenderElement name="tab" title="la_tab_Permissions" t="in-portal/categories/categories_edit_permissions" main_prefix="c"/>
<inp2:m_RenderElement name="tab" title="la_tab_Custom" t="in-portal/categories/categories_edit_custom" main_prefix="c"/>
</inp2:m_if>
</tr>
</table>
</td>
</tr>
</table>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.5.16/core/admin_templates/categories/categories_tabs.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.5
\ No newline at end of property
+1.5.16.1
\ No newline at end of property

Event Timeline