[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14553] activitycalendar: formatting code
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [14553] activitycalendar: formatting code |
Date: |
Wed, 09 Dec 2015 19:44:21 +0000 |
Revision: 14553
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14553
Author: sigurdne
Date: 2015-12-09 19:44:21 +0000 (Wed, 09 Dec 2015)
Log Message:
-----------
activitycalendar: formatting code
Modified Paths:
--------------
branches/dev-syncromind/activitycalendar/inc/class.soactivity.inc.php
branches/dev-syncromind/activitycalendar/inc/class.soarena.inc.php
branches/dev-syncromind/activitycalendar/inc/class.socommon.inc.php
branches/dev-syncromind/activitycalendar/inc/class.uiactivities.inc.php
branches/dev-syncromind/activitycalendar/inc/class.uiarena.inc.php
branches/dev-syncromind/activitycalendar/inc/class.uicommon.inc.php
branches/dev-syncromind/activitycalendar/inc/class.uidashboard.inc.php
branches/dev-syncromind/activitycalendar/inc/class.uiorganization.inc.php
branches/dev-syncromind/activitycalendar/inc/model/class.group.inc.php
branches/dev-syncromind/activitycalendar/inc/model/class.organization.inc.php
branches/dev-syncromind/activitycalendar/js/activitycalendar/activities.edit.js
branches/dev-syncromind/activitycalendar/js/activitycalendar/activities.index.js
branches/dev-syncromind/activitycalendar/js/activitycalendar/dashboard.index.js
branches/dev-syncromind/activitycalendar/templates/base/activity.xsl
branches/dev-syncromind/activitycalendar/templates/base/arena.xsl
branches/dev-syncromind/activitycalendar/templates/base/dashboard.xsl
branches/dev-syncromind/activitycalendar/templates/base/organization.xsl
Modified: branches/dev-syncromind/activitycalendar/inc/class.soactivity.inc.php
===================================================================
--- branches/dev-syncromind/activitycalendar/inc/class.soactivity.inc.php
2015-12-09 19:38:08 UTC (rev 14552)
+++ branches/dev-syncromind/activitycalendar/inc/class.soactivity.inc.php
2015-12-09 19:44:21 UTC (rev 14553)
@@ -12,8 +12,8 @@
{
protected static $so;
- protected $soap = false;
- public $soap_functions = array
+ protected $soap = false;
+ public $soap_functions = array
(
'get_activities' => array
(
@@ -21,7 +21,7 @@
'out' => array('array')
)
);
- public $xmlrpc_methods = array
+ public $xmlrpc_methods = array
(
array
(
@@ -824,8 +824,8 @@
$this->db->query("SELECT * FROM
bb_group_contact WHERE group_id={$group_id} LIMIT 1", __LINE__, __FILE__);
while($this->db->next_record())
{
- $result = array('name' => $this->soap ?
$this->db->f('name') : utf8_decode($this->db->f('name')),
- 'phone' =>
$this->db->f('phone'), 'email' => $this->db->f('email'));
+ $result = array('name' => $this->soap
? $this->db->f('name') : utf8_decode($this->db->f('name')),
+ 'phone' =>
$this->db->f('phone'), 'email' => $this->db->f('email'));
}
}
else if($org_id)
@@ -834,8 +834,8 @@
$this->db->query("SELECT * FROM
bb_organization_contact WHERE organization_id={$org_id} LIMIT 1", __LINE__,
__FILE__);
while($this->db->next_record())
{
- $result = array('name' => $this->soap ?
$this->db->f('name') : utf8_decode($this->db->f('name')),
- 'phone' =>
$this->db->f('phone'), 'email' => $this->db->f('email'));
+ $result = array('name' => $this->soap
? $this->db->f('name') : utf8_decode($this->db->f('name')),
+ 'phone' =>
$this->db->f('phone'), 'email' => $this->db->f('email'));
}
}
return $result;
Modified: branches/dev-syncromind/activitycalendar/inc/class.soarena.inc.php
===================================================================
--- branches/dev-syncromind/activitycalendar/inc/class.soarena.inc.php
2015-12-09 19:38:08 UTC (rev 14552)
+++ branches/dev-syncromind/activitycalendar/inc/class.soarena.inc.php
2015-12-09 19:44:21 UTC (rev 14553)
@@ -316,13 +316,13 @@
while($this->db->next_record())
{
//$result_arr = $this->db->f('name');
- /*if($curr_index == 0)
- {
- $result_arr[] = "<option
value='0'>Velg gateadresse</option>";
- }
- $result_arr[] = "<option value='" .
$this->db->f('descr') . "'>" . $this->db->f('descr') . "</option>";
- $curr_index++;*/
-
+ /* if($curr_index == 0)
+ {
+ $result_arr[] = "<option
value='0'>Velg gateadresse</option>";
+ }
+ $result_arr[] = "<option value='" .
$this->db->f('descr') . "'>" . $this->db->f('descr') . "</option>";
+ $curr_index++; */
+
$result_arr[]['name'] =
$this->db->f('descr');
}
}
Modified: branches/dev-syncromind/activitycalendar/inc/class.socommon.inc.php
===================================================================
--- branches/dev-syncromind/activitycalendar/inc/class.socommon.inc.php
2015-12-09 19:38:08 UTC (rev 14552)
+++ branches/dev-syncromind/activitycalendar/inc/class.socommon.inc.php
2015-12-09 19:44:21 UTC (rev 14553)
@@ -140,14 +140,14 @@
public function get(int $start_index, int $num_of_objects,
string $sort_field, boolean $ascending, string $search_for, string
$search_type, array $filters)
{
$results = array(); // Array
to store result objects
- $map = array(); //
Array to hold number of records per target object
+ $map = array(); // Array to
hold number of records per target object
$check_map = array(); // Array
to hold the actual number of record read per target object
$object_ids = array(); // All of
the object ids encountered
$added_object_ids = array();// All of the added
objects ids
// Retrieve information about the table name and the
name and alias of id column
// $break_on_limit - flag indicating whether to
break the loop when the number of records
// for all
the result objects are traversed
- $id_field_name_info = $this->get_id_field_name(true);
+ $id_field_name_info =
$this->get_id_field_name(true);
if(is_array($id_field_name_info))
{
$break_on_limit = true;
Modified:
branches/dev-syncromind/activitycalendar/inc/class.uiactivities.inc.php
===================================================================
--- branches/dev-syncromind/activitycalendar/inc/class.uiactivities.inc.php
2015-12-09 19:38:08 UTC (rev 14552)
+++ branches/dev-syncromind/activitycalendar/inc/class.uiactivities.inc.php
2015-12-09 19:44:21 UTC (rev 14553)
@@ -58,56 +58,57 @@
private function _get_filters()
{
$filters = array();
-
+
$activity_state_options = array
- (
+ (
array('id' => 'all', 'name' => lang('all')),
array('id' => '1', 'name' => lang('new')),
array('id' => '2', 'name' => lang('change')),
array('id' => '3', 'name' => lang('published')),
array('id' => '5', 'name' => lang('rejected'))
);
-
+
$filters[] = array
- (
- 'type' => 'filter',
- 'name' =>
'activity_state',
- 'text' =>
lang('activity_state'),
- 'list' =>
$activity_state_options
- );
-
- $activity_district_options[] = array('id'=>'all',
'name'=>lang('all'));
- $districts =
activitycalendar_soactivity::get_instance()->select_district_list();
+ (
+ 'type' => 'filter',
+ 'name' => 'activity_state',
+ 'text' => lang('activity_state'),
+ 'list' => $activity_state_options
+ );
+
+ $activity_district_options[] = array('id' => 'all',
'name' => lang('all'));
+ $districts =
activitycalendar_soactivity::get_instance()->select_district_list();
foreach($districts as $district)
{
- $activity_district_options[] =
array('id'=>$district['id'], 'name'=>$district['name']);
+ $activity_district_options[] = array('id' =>
$district['id'], 'name' => $district['name']);
}
-
+
$filters[] = array
- (
- 'type' => 'filter',
- 'name' =>
'activity_district',
- 'text' =>
lang('office'),
- 'list' =>
$activity_district_options
- );
-
- $activity_category_options[] = array('id'=>'all',
'name'=>lang('all'));
- $categories =
activitycalendar_soactivity::get_instance()->get_categories();
+ (
+ 'type' => 'filter',
+ 'name' => 'activity_district',
+ 'text' => lang('office'),
+ 'list' => $activity_district_options
+ );
+
+ $activity_category_options[] = array('id' => 'all',
'name' => lang('all'));
+ $categories =
activitycalendar_soactivity::get_instance()->get_categories();
foreach($categories as $category)
{
- $activity_category_options[] =
array('id'=>$category->get_id(), 'name'=>$category->get_name());
+ $activity_category_options[] = array('id' =>
$category->get_id(), 'name' => $category->get_name());
}
-
+
$filters[] = array
- (
- 'type' => 'filter',
- 'name' =>
'activity_category',
- 'text' =>
lang('Category'),
- 'list' =>
$activity_category_options
- );
-
+ (
+ 'type' => 'filter',
+ 'name' => 'activity_category',
+ 'text' => lang('Category'),
+ 'list' => $activity_category_options
+ );
+
return $filters;
}
+
/**
* Public method. Forwards the user to edit mode.
*/
@@ -118,19 +119,19 @@
public function index()
{
- if (phpgw::get_var('phpgw_return_as') == 'json')
+ if(phpgw::get_var('phpgw_return_as') == 'json')
{
return $this->query();
}
$appname = lang('activities');
- $function_msg = lang('list %1', $appname);
- $type = 'all_activities';
+ $function_msg = lang('list %1', $appname);
+ $type = 'all_activities';
$data = array(
- 'datatable_name' => $function_msg,
- 'form' => array(
+ 'datatable_name' => $function_msg,
+ 'form' => array(
'toolbar' => array(
'item' => array(
array
@@ -140,46 +141,53 @@
'name' =>
'date_change',
'value' => '',
'text' =>
lang('date')
- ),
+ ),
array(
- 'type' =>
'link',
- 'value' =>
lang('new'),
- 'href' =>
self::link(array(
-
'menuaction' => 'activitycalendar.uiactivities.add'
+ 'type' =>
'link',
+ 'value' =>
lang('new'),
+ 'href' =>
self::link(array(
+
'menuaction' => 'activitycalendar.uiactivities.add'
)),
- 'class' =>
'new_item'
- )
+ 'class' =>
'new_item'
+ )
)
)
),
- 'datatable' => array(
- 'source' => self::link(array(
- 'menuaction' =>
'activitycalendar.uiactivities.index',
- 'type' =>
$type,
- 'phpgw_return_as' => 'json'
+ 'datatable' => array(
+ 'source' =>
self::link(array(
+ 'menuaction' =>
'activitycalendar.uiactivities.index',
+ 'type'
=> $type,
+ 'phpgw_return_as' =>
'json'
)),
- 'download' =>
self::link(array('menuaction' => 'activitycalendar.uiactivities.download',
- 'type' =>
$type,
- 'export' => true,
- 'allrows' => true
+ 'download' =>
self::link(array('menuaction' => 'activitycalendar.uiactivities.download',
+ 'type' => $type,
+ 'export' => true,
+ 'allrows' => true
)),
- 'allrows' => true,
- 'editor_action' => '',
- 'field' => array(
- array('key'=>'id',
'label'=>lang('id'), 'sortable'=>true, 'hidden'=>false),
- array('key'=>'title',
'label'=>lang('title'), 'sortable'=>true, 'hidden'=>false),
- array('key'=>'state',
'label'=>lang('status'), 'sortable'=>true, 'hidden'=>false),
-
array('key'=>'organization_id', 'label'=>lang('organization'),
'sortable'=>true, 'hidden'=>false),
-
array('key'=>'group_id', 'label'=>lang('group'), 'sortable'=>true,
'hidden'=>false),
-
array('key'=>'district', 'label'=>lang('district'), 'sortable'=>true,
'hidden'=>false),
- array('key'=>'office',
'label'=>lang('office'), 'sortable'=>true, 'hidden'=>false),
-
array('key'=>'category', 'label'=>lang('category'), 'sortable'=>true,
'hidden'=>false),
-
array('key'=>'description', 'label'=>lang('description'), 'sortable'=>true,
'hidden'=>false),
- array('key'=>'arena',
'label'=>lang('arena'), 'sortable'=>true, 'hidden'=>false),
- array('key'=>'time',
'label'=>lang('time'), 'sortable'=>true, 'hidden'=>false),
-
array('key'=>'contact_person_1', 'label'=>lang('contact_person_1'),
'sortable'=>true, 'hidden'=>false),
-
array('key'=>'contact_person_2', 'label'=>lang('contact_person_2'),
'sortable'=>true, 'hidden'=>false),
-
array('key'=>'last_change_date', 'label'=>lang('last_change_date'),
'sortable'=>true, 'hidden'=>false)
+ 'allrows' => true,
+ 'editor_action' => '',
+ 'field' => array(
+ array('key' => 'id', 'label' =>
lang('id'), 'sortable' => true, 'hidden' => false),
+ array('key' => 'title', 'label'
=> lang('title'), 'sortable' => true, 'hidden' => false),
+ array('key' => 'state', 'label'
=> lang('status'), 'sortable' => true, 'hidden' => false),
+ array('key' =>
'organization_id', 'label' => lang('organization'), 'sortable' => true,
+ 'hidden' => false),
+ array('key' => 'group_id',
'label' => lang('group'), 'sortable' => true, 'hidden' => false),
+ array('key' => 'district',
'label' => lang('district'), 'sortable' => true,
+ 'hidden' => false),
+ array('key' => 'office',
'label' => lang('office'), 'sortable' => true, 'hidden' => false),
+ array('key' => 'category',
'label' => lang('category'), 'sortable' => true,
+ 'hidden' => false),
+ array('key' => 'description',
'label' => lang('description'), 'sortable' => true,
+ 'hidden' => false),
+ array('key' => 'arena', 'label'
=> lang('arena'), 'sortable' => true, 'hidden' => false),
+ array('key' => 'time', 'label'
=> lang('time'), 'sortable' => true, 'hidden' => false),
+ array('key' =>
'contact_person_1', 'label' => lang('contact_person_1'), 'sortable' => true,
+ 'hidden' => false),
+ array('key' =>
'contact_person_2', 'label' => lang('contact_person_2'), 'sortable' => true,
+ 'hidden' => false),
+ array('key' =>
'last_change_date', 'label' => lang('last_change_date'), 'sortable' => true,
+ 'hidden' => false)
)
)
);
@@ -193,44 +201,47 @@
$data['datatable']['actions'][] = array
(
- 'my_name' => 'show',
- 'text' => lang('show'),
- 'action' =>
self::link(array(
- 'menuaction' =>
'activitycalendar.uiactivities.view'
- )),
- 'parameters' =>
json_encode(array('parameter'=>array(array('name'=>'id', 'source'=>'id'))))
- );
+ 'my_name' => 'show',
+ 'text' => lang('show'),
+ 'action' => self::link(array(
+ 'menuaction' =>
'activitycalendar.uiactivities.view'
+ )),
+ 'parameters' => json_encode(array('parameter'
=> array(array('name' => 'id',
+ 'source' => 'id'))))
+ );
$data['datatable']['actions'][] = array
(
- 'my_name' => 'edit',
- 'text' =>
lang('edit'),
- 'action' =>
self::link(array(
- 'menuaction' =>
'activitycalendar.uiactivities.edit'
- )),
- 'parameters' =>
json_encode(array('parameter'=>array(array('name'=>'id', 'source'=>'id'))))
- );
-
+ 'my_name' => 'edit',
+ 'text' => lang('edit'),
+ 'action' => self::link(array(
+ 'menuaction' =>
'activitycalendar.uiactivities.edit'
+ )),
+ 'parameters' => json_encode(array('parameter'
=> array(array('name' => 'id',
+ 'source' => 'id'))))
+ );
+
$data['datatable']['actions'][] = array
(
- 'my_name' => 'send_mail',
- 'text' =>
lang('send_mail'),
- 'type' => 'custom',
- 'custom_code' => "
- var oArgs = ".json_encode(array(
- 'menuaction'
=> 'activitycalendar.uiactivities.send_mail',
- 'message_type'
=> 'update',
-
'phpgw_return_as' => 'json'
- )).";
- var parameters =
".json_encode(array('parameter'=>array(array('name'=>'activity_id',
'source'=>'id')))).";
+ 'my_name' => 'send_mail',
+ 'text' => lang('send_mail'),
+ 'type' => 'custom',
+ 'custom_code' => "
+ var oArgs = " .
json_encode(array(
+ 'menuaction' =>
'activitycalendar.uiactivities.send_mail',
+ 'message_type' => 'update',
+ 'phpgw_return_as' => 'json'
+ )) . ";
+ var parameters = " .
json_encode(array('parameter' => array(array('name' => 'activity_id',
+ 'source' => 'id')))) .
";
sendMail(oArgs, parameters);
"
- );
-
+ );
+
$GLOBALS['phpgw']->jqcal->add_listener('filter_date_change');
-
+
self::add_javascript('activitycalendar',
'activitycalendar', 'activities.index.js');
- self::render_template_xsl('datatable_jquery', $data);
+ self::render_template_xsl('datatable_jquery', $data);
}
/**
@@ -238,21 +249,21 @@
*/
public function view()
{
-
- $act_so =
activitycalendar_soactivity::get_instance();
-
+
+ $act_so = activitycalendar_soactivity::get_instance();
+
$GLOBALS['phpgw_info']['flags']['app_header'] .= '::' .
lang('view');
// Get the contract part id
$activity_id = (int)phpgw::get_var('id');
-
+
$activity =
$this->so_activity->get_single($activity_id);
- if (empty($activity))
+ if(empty($activity))
{
phpgwapi_cache::message_set(lang('Could not
find specified activity.'), 'error');
$GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'activitycalendar.uiactivities.index'));
}
-
+
if($activity->get_group_id())
{
if($activity->get_new_group())
@@ -275,23 +286,23 @@
$description =
activitycalendar_soorganization::get_instance()->get_description($activity->get_organization_id());
}
}
-
+
$state_name = '';
- if ($activity->get_state())
+ if($activity->get_state())
{
$state_name = lang('state_' .
$activity->get_state());
}
-
- $category_name = '';
- $current_category_id = $activity->get_category();
- if ($current_category_id)
+
+ $category_name = '';
+ $current_category_id = $activity->get_category();
+ if($current_category_id)
{
$category_name =
$act_so->get_category_name($current_category_id);
}
-
- $current_target_ids = $activity->get_target();
- $target_names = array();
- if (count($current_target_ids))
+
+ $current_target_ids = $activity->get_target();
+ $target_names = array();
+ if(count($current_target_ids))
{
$current_target_id_array = explode(",",
$current_target_ids);
foreach($current_target_id_array as
$curr_target)
@@ -299,38 +310,38 @@
$target_names[] = array('name' =>
$act_so->get_target_name($curr_target));
}
}
-
- $current_district_ids = $activity->get_district();
- $district_names = array();
+
+ $current_district_ids = $activity->get_district();
+ $district_names = array();
if(count($current_district_ids))
{
- $current_district_id_array = explode(",",
$current_district_ids);
+ $current_district_id_array = explode(",",
$current_district_ids);
foreach($current_district_id_array as
$curr_district)
{
$district_names[] = array('name' =>
$act_so->get_district_name($curr_district));
}
}
-
+
$building_name = '';
if($activity->get_internal_arena())
{
$building_name =
activitycalendar_soarena::get_instance()->get_building_name($activity->get_internal_arena());
}
-
+
$arena_name = '';
if($activity->get_arena())
{
$arena_name =
activitycalendar_soarena::get_instance()->get_arena_name($activity->get_arena());
}
-
+
$office_name = '';
if($activity->get_office())
{
$office_name =
$act_so->get_office_name($activity->get_office());
}
-
+
$current_organization_id =
$activity->get_organization_id();
- $organization_name = '';
+ $organization_name = '';
if($current_organization_id)
{
if($activity->get_new_org())
@@ -342,7 +353,7 @@
$organization_name =
activitycalendar_soorganization::get_instance()->get_organization_name($current_organization_id);
}
}
-
+
if($activity->get_group_id())
{
if($activity->get_new_group())
@@ -354,69 +365,67 @@
$group_name =
activitycalendar_sogroup::get_instance()->get_group_name($activity->get_group_id());
}
}
-
+
$contpers_so =
activitycalendar_socontactperson::get_instance();
-
+
if($activity->get_group_id())
{
if($activity->get_new_group())
{
- $contact_person_1 =
$contpers_so->get_group_contact_name_local($activity->get_contact_person_1());
- $contact_person_2 =
$contpers_so->get_group_contact_name_local($activity->get_contact_person_2());
+ $contact_person_1 =
$contpers_so->get_group_contact_name_local($activity->get_contact_person_1());
+ $contact_person_2 =
$contpers_so->get_group_contact_name_local($activity->get_contact_person_2());
}
else
{
- $contact_person_1 =
$contpers_so->get_group_contact_name($activity->get_contact_person_1());
- $contact_person_2 =
$contpers_so->get_group_contact_name($activity->get_contact_person_2());
+ $contact_person_1 =
$contpers_so->get_group_contact_name($activity->get_contact_person_1());
+ $contact_person_2 =
$contpers_so->get_group_contact_name($activity->get_contact_person_2());
}
}
else if($activity->get_organization_id())
{
if($activity->get_new_org())
{
- $contact_person_1 =
$contpers_so->get_org_contact_name_local($activity->get_contact_person_1());
- $contact_person_2 =
$contpers_so->get_org_contact_name_local($activity->get_contact_person_2());
+ $contact_person_1 =
$contpers_so->get_org_contact_name_local($activity->get_contact_person_1());
+ $contact_person_2 =
$contpers_so->get_org_contact_name_local($activity->get_contact_person_2());
}
else
{
- $contact_person_1 =
$contpers_so->get_org_contact_name($activity->get_contact_person_1());
- $contact_person_2 =
$contpers_so->get_org_contact_name($activity->get_contact_person_2());
+ $contact_person_1 =
$contpers_so->get_org_contact_name($activity->get_contact_person_1());
+ $contact_person_2 =
$contpers_so->get_org_contact_name($activity->get_contact_person_2());
}
}
-
- $tabs = array();
- $tabs['activity'] = array('label' =>
lang('activity'), 'link' => '#activity');
- $active_tab = 'activity';
+ $tabs = array();
+ $tabs['activity'] = array('label' =>
lang('activity'), 'link' => '#activity');
+ $active_tab = 'activity';
+
$data = array
- (
- 'tabs'
=> phpgwapi_jquery::tabview_generate($tabs, $active_tab),
- 'cancel_url'
=> $GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiactivities.index')),
- 'edit_url'
=> $GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiactivities.edit', 'id' => $activity->get_id())),
- 'lang_edit'
=> lang('edit'),
- 'lang_cancel'
=> lang('cancel'),
-
- 'value_title'
=> $activity->get_title(),
- 'value_description'
=> $description,
- 'value_time'
=> $activity->get_time(),
-
- 'contact_person_1'
=> $contact_person_1,
- 'contact_person_2'
=> $contact_person_2,
- 'contact_person_2_address' =>
$activity->get_contact_person_2_address(),
- 'contact_person_2_zip' =>
$activity->get_contact_person_2_zip(),
-
- 'state_name'
=> $state_name,
- 'category_name'
=> $category_name,
- 'list_target_names'
=> $target_names,
- 'list_district_names' =>
$district_names,
- 'special_adaptation_checked' =>
($activity->get_special_adaptation() ? 1 : 0),
- 'building_name'
=> $building_name,
- 'arena_name'
=> $arena_name,
- 'office_name'
=> $office_name,
- 'organization_name'
=> $organization_name,
- 'group_name'
=> $group_name
+ (
+ 'tabs' =>
phpgwapi_jquery::tabview_generate($tabs, $active_tab),
+ 'cancel_url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiactivities.index')),
+ 'edit_url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiactivities.edit',
+ 'id' => $activity->get_id())),
+ 'lang_edit' => lang('edit'),
+ 'lang_cancel' => lang('cancel'),
+ 'value_title' =>
$activity->get_title(),
+ 'value_description' => $description,
+ 'value_time' =>
$activity->get_time(),
+ 'contact_person_1' =>
$contact_person_1,
+ 'contact_person_2' =>
$contact_person_2,
+ 'contact_person_2_address' =>
$activity->get_contact_person_2_address(),
+ 'contact_person_2_zip' =>
$activity->get_contact_person_2_zip(),
+ 'state_name' =>
$state_name,
+ 'category_name' =>
$category_name,
+ 'list_target_names' =>
$target_names,
+ 'list_district_names' =>
$district_names,
+ 'special_adaptation_checked' =>
($activity->get_special_adaptation() ? 1 : 0),
+ 'building_name' =>
$building_name,
+ 'arena_name' =>
$arena_name,
+ 'office_name' =>
$office_name,
+ 'organization_name' =>
$organization_name,
+ 'group_name' =>
$group_name
);
-
+
self::render_template_xsl(array('activity'),
array('view' => $data));
}
@@ -440,7 +449,7 @@
{
$activity = new activitycalendar_activity();
}
-
+
$new_group = $activity->get_new_group();
$g_id = phpgw::get_var('group_id');
$o_id = phpgw::get_var('organization_id');
@@ -473,18 +482,18 @@
{
$organizations = $this->so_org->get(null, null,
'org.name', true, null, null, null);
}
-
+
if($new_group)
{
$group_array = $this->so_group->get(null, null,
null, null, null, null, array(
- 'group_id' =>
$activity->get_group_id(), 'new_groups' => 'true'));
+ 'group_id' =>
$activity->get_group_id(), 'new_groups' => 'true'));
//var_dump($group_array);
if(count($group_array) > 0)
{
- $keys =
array_keys($group_array);
- $local_group = $group_array[$keys[0]];
- $local_group_name =
$local_group->get_name();
- $local_group_id =
$local_group->get_id();
+ $keys =
array_keys($group_array);
+ $local_group =
$group_array[$keys[0]];
+ $local_group_name =
$local_group->get_name();
+ $local_group_id =
$local_group->get_id();
}
}
else
@@ -495,7 +504,8 @@
if($activity->get_new_org())
{
phpgwapi_cache::message_set(lang('org_not_transferred'), 'error');
- $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'activitycalendar.uiactivities.view', 'id' =>
$activity->get_id()));
+ $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'activitycalendar.uiactivities.view',
+ 'id' => $activity->get_id()));
}
if($activity->get_group_id())
@@ -520,146 +530,156 @@
$description =
activitycalendar_soorganization::get_instance()->get_description($activity->get_organization_id());
}
}
-
- $selected_state = $activity->get_state();
- $state_options = array
- (
- array('id'=>'1', 'name'=>lang('new'),
'selected'=>(($selected_state == 1) ? 1 : 0)),
- array('id'=>'2', 'name'=>lang('change'),
'selected'=>(($selected_state == 2) ? 1 : 0)),
- array('id'=>'3', 'name'=>lang('published'),
'selected'=>(($selected_state == 3) ? 1 : 0)),
- array('id'=>'5', 'name'=>lang('rejected'),
'selected'=>(($selected_state == 4) ? 1 : 0))
+
+ $selected_state = $activity->get_state();
+ $state_options = array
+ (
+ array('id' => '1', 'name' => lang('new'),
'selected' => (($selected_state == 1) ? 1 : 0)),
+ array('id' => '2', 'name' => lang('change'),
'selected' => (($selected_state == 2) ? 1 : 0)),
+ array('id' => '3', 'name' => lang('published'),
'selected' => (($selected_state == 3) ? 1 : 0)),
+ array('id' => '5', 'name' => lang('rejected'),
'selected' => (($selected_state == 4) ? 1 : 0))
);
-
- $category_options[] = array('id'=>'',
'name'=>lang('Ingen kategori valgt'), 'selected'=>0);
+
+ $category_options[] = array('id' => '', 'name' =>
lang('Ingen kategori valgt'),
+ 'selected' => 0);
$current_category_id = $activity->get_category();
foreach($categories as $category)
{
- $id = $category->get_id();
- $selected = ($current_category_id == $id) ? 1 :
0;
- $category_options[] = array('id'=>$id,
'name'=>$category->get_name(), 'selected'=>$selected);
+ $id =
$category->get_id();
+ $selected =
($current_category_id == $id) ? 1 : 0;
+ $category_options[] = array('id' => $id,
'name' => $category->get_name(), 'selected' => $selected);
}
-
+
$current_target_ids =
$activity->get_target();
$current_target_id_array = explode(",",
$current_target_ids);
- $target_checks = array();
+ $target_checks = array();
foreach($targets as $t)
{
- $checked = (in_array($t->get_id(),
$current_target_id_array)) ? 'checked' : '';
- $target_checks[] = array('value'=>$t->get_id(),
'label'=>$t->get_name(), 'checked'=>$checked, 'name'=>'target[]');
- }
-
+ $checked =
(in_array($t->get_id(), $current_target_id_array)) ? 'checked' : '';
+ $target_checks[] = array('value' =>
$t->get_id(), 'label' => $t->get_name(),
+ 'checked' => $checked, 'name' =>
'target[]');
+ }
+
$current_district_ids =
$activity->get_district();
$current_district_id_array = explode(",",
$current_district_ids);
- $district_checks = array();
+ $district_checks = array();
foreach($districts as $d)
{
- $checked = (in_array($d['part_of_town_id'],
$current_district_id_array)) ? 'checked' : '';
- $district_checks[] =
array('value'=>$d['part_of_town_id'], 'label'=>$d['name'], 'checked'=>$checked,
'name'=>'district[]');
+ $checked =
(in_array($d['part_of_town_id'], $current_district_id_array)) ? 'checked' : '';
+ $district_checks[] = array('value' =>
$d['part_of_town_id'], 'label' => $d['name'],
+ 'checked' => $checked, 'name' =>
'district[]');
}
-
- $building_options[] = array('id'=>'',
'name'=>lang('Ingen kommunale bygg valgt'), 'selected'=>0);
- $current_internal_arena_id =
$activity->get_internal_arena();
+
+ $building_options[] = array('id'
=> '', 'name' => lang('Ingen kommunale bygg valgt'),
+ 'selected' => 0);
+ $current_internal_arena_id =
$activity->get_internal_arena();
foreach($buildings as $building_id => $building_name)
{
- $selected = ($current_internal_arena_id ==
$building_id) ? 1 : 0;
- $building_options[] = array('id'=>$building_id,
'name'=>$building_name, 'selected'=>$selected);
+ $selected =
($current_internal_arena_id == $building_id) ? 1 : 0;
+ $building_options[] = array('id' =>
$building_id, 'name' => $building_name,
+ 'selected' => $selected);
}
-
- $arena_external_options[] = array('id'=>'',
'name'=>lang('Ingen arena valgt'), 'selected'=>0);
- $current_arena_id = $activity->get_arena();
+
+ $arena_external_options[] = array('id' => '',
'name' => lang('Ingen arena valgt'),
+ 'selected' => 0);
+ $current_arena_id =
$activity->get_arena();
foreach($arenas as $arena)
{
- $selected = ($current_arena_id ==
$arena->get_id()) ? 1 : 0;
- $arena_external_options[] =
array('id'=>$arena->get_id(), 'name'=>$arena->get_arena_name(),
'selected'=>$selected);
+ $selected
= ($current_arena_id == $arena->get_id()) ? 1 : 0;
+ $arena_external_options[] = array('id'
=> $arena->get_id(), 'name' => $arena->get_arena_name(),
+ 'selected' => $selected);
}
-
- $office_options[] = array('id'=>'', 'name'=>lang('Ingen
kontor valgt'), 'selected'=>0);
- $selected_office = $activity->get_office();
+
+ $office_options[] = array('id' => '', 'name' =>
lang('Ingen kontor valgt'), 'selected' => 0);
+ $selected_office = $activity->get_office();
foreach($offices as $office)
{
- $selected = ($selected_office == $office['id'])
? 1 : 0;
- $office_options[] = array('id'=>$office['id'],
'name'=>$office['name'], 'selected'=>$selected);
+ $selected =
($selected_office == $office['id']) ? 1 : 0;
+ $office_options[] = array('id' =>
$office['id'], 'name' => $office['name'],
+ 'selected' => $selected);
}
-
- $organization_options[] = array('id'=>'',
'name'=>lang('Ingen organisasjon valgt'), 'selected'=>0);
- $current_organization_id =
$activity->get_organization_id();
+
+ $organization_options[] = array('id' => '', 'name' =>
lang('Ingen organisasjon valgt'),
+ 'selected' => 0);
+ $current_organization_id =
$activity->get_organization_id();
foreach($organizations as $organization)
{
- $selected = ($current_organization_id ==
$organization->get_id()) ? 1 : 0;
- $organization_options[] =
array('id'=>$organization->get_id(), 'name'=>$organization->get_name(),
'selected'=>$selected);
+ $selected =
($current_organization_id == $organization->get_id()) ? 1 : 0;
+ $organization_options[] = array('id' =>
$organization->get_id(), 'name' => $organization->get_name(),
+ 'selected' => $selected);
}
-
+
$contpers_so =
activitycalendar_socontactperson::get_instance();
-
+
if($activity->get_group_id())
{
if($activity->get_new_group())
{
- $contact_person_1 =
$contpers_so->get_group_contact_name_local($activity->get_contact_person_1());
- $contact_person_2 =
$contpers_so->get_group_contact_name_local($activity->get_contact_person_2());
+ $contact_person_1 =
$contpers_so->get_group_contact_name_local($activity->get_contact_person_1());
+ $contact_person_2 =
$contpers_so->get_group_contact_name_local($activity->get_contact_person_2());
}
else
{
- $contact_person_1 =
$contpers_so->get_group_contact_name($activity->get_contact_person_1());
- $contact_person_2 =
$contpers_so->get_group_contact_name($activity->get_contact_person_2());
+ $contact_person_1 =
$contpers_so->get_group_contact_name($activity->get_contact_person_1());
+ $contact_person_2 =
$contpers_so->get_group_contact_name($activity->get_contact_person_2());
}
}
else if($activity->get_organization_id())
{
if($activity->get_new_org())
{
- $contact_person_1 =
$contpers_so->get_org_contact_name_local($activity->get_contact_person_1());
- $contact_person_2 =
$contpers_so->get_org_contact_name_local($activity->get_contact_person_2());
+ $contact_person_1 =
$contpers_so->get_org_contact_name_local($activity->get_contact_person_1());
+ $contact_person_2 =
$contpers_so->get_org_contact_name_local($activity->get_contact_person_2());
}
else
{
- $contact_person_1 =
$contpers_so->get_org_contact_name($activity->get_contact_person_1());
- $contact_person_2 =
$contpers_so->get_org_contact_name($activity->get_contact_person_2());
+ $contact_person_1 =
$contpers_so->get_org_contact_name($activity->get_contact_person_1());
+ $contact_person_2 =
$contpers_so->get_org_contact_name($activity->get_contact_person_2());
}
}
-
- $tabs = array();
- $tabs['activity'] = array('label' =>
lang('activity'), 'link' => '#activity');
- $active_tab = 'activity';
+ $tabs = array();
+ $tabs['activity'] = array('label' =>
lang('activity'), 'link' => '#activity');
+ $active_tab = 'activity';
+
$data = array
- (
- 'tabs'
=> phpgwapi_jquery::tabview_generate($tabs, $active_tab),
- 'form_action'
=> $GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiactivities.save')),
- 'cancel_url'
=> $GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiactivities.index')),
- 'lang_save'
=> lang('save'),
- 'lang_cancel'
=> lang('cancel'),
-
- 'activity_id'
=> $activity->get_id(),
- 'value_title'
=> $activity->get_title(),
- 'value_description'
=> $description,
- 'list_state_options' =>
array('options' => $state_options),
- 'list_category_options' =>
array('options' => $category_options),
- 'list_target_checks' =>
array('choice' => $target_checks),
- 'list_district_checks' =>
array('choice' => $district_checks),
- 'special_adaptation_checked' =>
($activity->get_special_adaptation() ? 1 : 0),
- 'list_building_options' =>
array('options' => $building_options),
- 'list_arena_external_options' =>
array('options' => $arena_external_options),
- 'value_time'
=> $activity->get_time(),
- 'list_office_options' =>
array('options' => $office_options),
- 'list_organization_options' =>
array('options' => $organization_options),
- 'organization_selected' =>
($current_organization_id ? 1 : 0),
- 'organization_url'
=> $GLOBALS['phpgw']->link('/index.php',
array('menuaction'=>'booking.uiorganization.show',
'id'=>$current_organization_id)),
- 'new_group'
=> ($new_group ? 1 : 0),
- 'local_group_name'
=> $local_group_name,
- 'local_group_id'
=> $local_group_id,
- 'group_selected'
=> ($activity->get_group_id() ? 1 : 0),
- 'group_selected_id'
=> $activity->get_group_id(),
- 'group_url'
=> $GLOBALS['phpgw']->link('/index.php',
array('menuaction'=>'booking.uigroup.show', 'id'=>$activity->get_group_id())),
-
- 'contact_person_1'
=> $contact_person_1,
- 'contact_person_2'
=> $contact_person_2,
- 'contact_person_2_address' =>
$activity->get_contact_person_2_address(),
- 'contact_person_2_zip' =>
$activity->get_contact_person_2_zip(),
+ (
+ 'tabs' =>
phpgwapi_jquery::tabview_generate($tabs, $active_tab),
+ 'form_action' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiactivities.save')),
+ 'cancel_url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiactivities.index')),
+ 'lang_save' => lang('save'),
+ 'lang_cancel' => lang('cancel'),
+ 'activity_id'
=> $activity->get_id(),
+ 'value_title'
=> $activity->get_title(),
+ 'value_description'
=> $description,
+ 'list_state_options' =>
array('options' => $state_options),
+ 'list_category_options' =>
array('options' => $category_options),
+ 'list_target_checks' =>
array('choice' => $target_checks),
+ 'list_district_checks' =>
array('choice' => $district_checks),
+ 'special_adaptation_checked' =>
($activity->get_special_adaptation() ? 1 : 0),
+ 'list_building_options' =>
array('options' => $building_options),
+ 'list_arena_external_options' =>
array('options' => $arena_external_options),
+ 'value_time'
=> $activity->get_time(),
+ 'list_office_options' =>
array('options' => $office_options),
+ 'list_organization_options' =>
array('options' => $organization_options),
+ 'organization_selected' =>
($current_organization_id ? 1 : 0),
+ 'organization_url'
=> $GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'booking.uiorganization.show',
+ 'id' => $current_organization_id)),
+ 'new_group'
=> ($new_group ? 1 : 0),
+ 'local_group_name'
=> $local_group_name,
+ 'local_group_id'
=> $local_group_id,
+ 'group_selected'
=> ($activity->get_group_id() ? 1 : 0),
+ 'group_selected_id'
=> $activity->get_group_id(),
+ 'group_url'
=> $GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'booking.uigroup.show',
+ 'id' => $activity->get_group_id())),
+ 'contact_person_1' =>
$contact_person_1,
+ 'contact_person_2' =>
$contact_person_2,
+ 'contact_person_2_address' =>
$activity->get_contact_person_2_address(),
+ 'contact_person_2_zip' =>
$activity->get_contact_person_2_zip(),
+ 'validator' =>
phpgwapi_jquery::formvalidator_generate(array('location', 'date',
+ 'security', 'file'))
+ );
- 'validator' =>
phpgwapi_jquery::formvalidator_generate(array('location', 'date', 'security',
'file'))
- );
-
phpgwapi_jquery::load_widget('autocomplete');
$_autocomplete = <<<JS
@@ -672,38 +692,38 @@
});
JS;
$GLOBALS['phpgw']->js->add_code('', $_autocomplete);
-
+
self::add_javascript('activitycalendar',
'activitycalendar', 'activities.edit.js');
self::render_template_xsl(array('activity'),
array('edit' => $data));
}
public function query()
{
- $search = phpgw::get_var('search');
- $order = phpgw::get_var('order');
- $draw = phpgw::get_var('draw', 'int');
- $columns = phpgw::get_var('columns');
+ $search = phpgw::get_var('search');
+ $order = phpgw::get_var('order');
+ $draw = phpgw::get_var('draw', 'int');
+ $columns = phpgw::get_var('columns');
- $start_index = phpgw::get_var('start', 'int',
'REQUEST', 0);
- $num_of_objects = (phpgw::get_var('length', 'int') <=
0) ? $this->user_rows_per_page : phpgw::get_var('length', 'int');
- $sort_field =
($columns[$order[0]['column']]['data']) ? $columns[$order[0]['column']]['data']
: 'id';
- $sort_ascending = ($order[0]['dir'] == 'desc') ? false
: true;
+ $start_index = phpgw::get_var('start', 'int',
'REQUEST', 0);
+ $num_of_objects = (phpgw::get_var('length', 'int') <=
0) ? $this->user_rows_per_page : phpgw::get_var('length', 'int');
+ $sort_field =
($columns[$order[0]['column']]['data']) ? $columns[$order[0]['column']]['data']
: 'id';
+ $sort_ascending = ($order[0]['dir'] == 'desc') ? false
: true;
// Form variables
- $search_for = $search['value'];
- $search_type = phpgw::get_var('search_option');
+ $search_for = $search['value'];
+ $search_type = phpgw::get_var('search_option');
// Create an empty result set
- $result_objects = array();
- $result_count = 0;
+ $result_objects = array();
+ $result_count = 0;
- $export =
phpgw::get_var('export','bool');
- if ($export)
+ $export = phpgw::get_var('export', 'bool');
+ if($export)
{
$num_of_objects = null;
}
-
+
//Retrieve the type of query and perform type specific
logic
- $query_type = phpgw::get_var('type');
+ $query_type = phpgw::get_var('type');
$email_param = phpgw::get_var('email');
$email = false;
@@ -718,17 +738,17 @@
switch($query_type)
{
case 'new_activities':
- $filters =
array('new_activities' => 'yes', 'activity_state' =>
phpgw::get_var('activity_state'),
- 'activity_category' =>
phpgw::get_var('activity_category'), 'activity_district' =>
phpgw::get_var('activity_district'),
- 'user_id' => $uid,
'updated_date_hidden' => phpgw::get_var('date_change'));
+ $filters =
array('new_activities' => 'yes', 'activity_state'
=> phpgw::get_var('activity_state'),
+ 'activity_category'
=> phpgw::get_var('activity_category'), 'activity_district' =>
phpgw::get_var('activity_district'),
+ 'user_id'
=> $uid, 'updated_date_hidden' => phpgw::get_var('date_change'));
$result_objects =
activitycalendar_soactivity::get_instance()->get($start_index, $num_of_objects,
$sort_field, $sort_ascending, $search_for, $search_type, $filters);
- $result_count =
activitycalendar_soactivity::get_instance()->get_count($search_for,
$search_type, $filters);
+ $result_count =
activitycalendar_soactivity::get_instance()->get_count($search_for,
$search_type, $filters);
break;
case 'all_activities':
default:
- $filters =
array('activity_state' => phpgw::get_var('activity_state'), 'activity_category'
=> phpgw::get_var('activity_category'),
- 'activity_district' =>
phpgw::get_var('activity_district'), 'user_id' => $uid,
- 'updated_date_hidden' =>
phpgw::get_var('date_change'));
+ $filters =
array('activity_state' => phpgw::get_var('activity_state'),
'activity_category' => phpgw::get_var('activity_category'),
+ 'activity_district'
=> phpgw::get_var('activity_district'), 'user_id'
=> $uid,
+ 'updated_date_hidden' =>
phpgw::get_var('date_change'));
$result_objects =
activitycalendar_soactivity::get_instance()->get($start_index, $num_of_objects,
$sort_field, $sort_ascending, $search_for, $search_type, $filters);
$result_count =
activitycalendar_soactivity::get_instance()->get_count($search_for,
$search_type, $filters);
break;
@@ -758,7 +778,7 @@
{
return $rows;
}
-
+
if(!$export && !$email)
{
//Add action column to each row in result table
@@ -770,10 +790,10 @@
}
else
{
- $result_data = array('results' => $rows);
- $result_data['total_records'] = $result_count;
- $result_data['draw'] = $draw;
-
+ $result_data
= array('results' => $rows);
+ $result_data['total_records'] =
$result_count;
+ $result_data['draw'] =
$draw;
+
return $this->jquery_results($result_data);
}
}
@@ -790,7 +810,7 @@
{
$activity = new activitycalendar_activity();
}
-
+
$new_group = $activity->get_new_group();
$g_id = phpgw::get_var('group_id');
$o_id = phpgw::get_var('organization_id');
@@ -814,7 +834,7 @@
{
$desc = substr($desc, 0, 254);
}
-
+
if(isset($activity)) // If an activity object is created
{
$old_state =
$activity->get_state();
@@ -875,7 +895,7 @@
{
//transfer group to
booking
$group_array =
$this->so_group->get(null, null, null, null, null, null, array(
- 'group_id' =>
$activity->get_group_id(), 'new_groups' => 'true'));
+ 'group_id'
=> $activity->get_group_id(), 'new_groups' => 'true'));
if(count($group_array)
> 0)
{
$keys =
array_keys($group_array);
@@ -925,11 +945,11 @@
$group->set_transferred(true);
$this->so_group->update_local($group);
- $message
= lang('messages_saved_form');
-
+ $message =
lang('messages_saved_form');
+
$contact_persons =
$this->so_contact->get_booking_contact_persons($new_group_id, true);
-
- $cp1
= $contact_persons[0];
+
+ $cp1 =
$contact_persons[0];
}
}
//$message =
lang('messages_saved_form');
@@ -964,7 +984,7 @@
}
}
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction' =>
'activitycalendar.uiactivities.view',
- 'id' => $activity->get_id()));
+ 'id' =>
$activity->get_id()));
}
else
{
@@ -981,9 +1001,10 @@
}
}
- $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'activitycalendar.uiactivities.edit', 'id' =>
$activity->get_id()));
+ $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'activitycalendar.uiactivities.edit',
+ 'id' => $activity->get_id()));
}
-
+
/**
* Add action links and labels for the context menu of the list
items
*
@@ -1005,30 +1026,30 @@
case 'all_activities':
$value['ajax'][] = false;
$value['actions'][] =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiactivities.edit',
- 'id' => $value['id'])));
+ 'id' =>
$value['id'])));
$value['labels'][] = lang('edit');
$value['ajax'][] = false;
$value['actions'][] =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiactivities.view',
- 'id' => $value['id'])));
+ 'id' =>
$value['id'])));
$value['labels'][] = lang('show');
$value['ajax'][] = true;
- $value['actions'][] =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiactivities.send_mail',
- 'activity_id' => $value['id'],
'message_type' => 'update')));
+ $value['actions'][] =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiactivities.send_mail',
+ 'activity_id' =>
$value['id'], 'message_type' => 'update')));
$value['labels'][] =
lang('send_mail');
break;
case 'new_activities':
$value['ajax'][] = false;
$value['actions'][] =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiactivities.edit',
- 'id' => $value['id'])));
+ 'id' =>
$value['id'])));
$value['labels'][] = lang('edit');
$value['ajax'][] = false;
$value['actions'][] =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiactivities.view',
- 'id' => $value['id'])));
+ 'id' =>
$value['id'])));
$value['labels'][] = lang('show');
$value['ajax'][] = true;
- $value['actions'][] =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiactivities.send_mail',
- 'activity_id' => $value['id'],
'message_type' => 'update')));
+ $value['actions'][] =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiactivities.send_mail',
+ 'activity_id' =>
$value['id'], 'message_type' => 'update')));
$value['labels'][] =
lang('send_mail');
break;
}
@@ -1085,7 +1106,7 @@
if($activity->get_group_id() &&
$activity->get_group_id() > 0)
{
$activity->set_contact_persons(activitycalendar_socontactperson::get_instance()->get_booking_contact_persons($activity->get_group_id(),
true));
- /*if($activity->get_contact_person_2()
&& $activity->get_contact_person_2()->get_email())
+ /* if($activity->get_contact_person_2()
&& $activity->get_contact_person_2()->get_email())
{
activitycalendar_uiactivities::send_mailnotification_to_group($activity->get_contact_person_2(),
$subject, $body);
}
@@ -1098,7 +1119,7 @@
else if($activity->get_organization_id() &&
$activity->get_organization_id() > 0)
{
$activity->set_contact_persons(activitycalendar_socontactperson::get_instance()->get_booking_contact_persons($activity->get_organization_id()));
- /*if($activity->get_contact_person_2()
&& $activity->get_contact_person_2()->get_email())
+ /* if($activity->get_contact_person_2()
&& $activity->get_contact_person_2()->get_email())
{
activitycalendar_uiactivities::send_mailnotification_to_organization($activity->get_contact_person_2(),
$subject, $body);
}
@@ -1111,7 +1132,7 @@
}
$GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'activitycalendar.uiactivities.index',
- 'message' => 'E-post sendt'));
+ 'message' => 'E-post sendt'));
}
public function send_mail()
@@ -1128,24 +1149,24 @@
if($message_type)
{
//$subject = lang('mail_subject_update',
$avtivity->get_id() . '-' . $activity->get_title(), $activity->get_link());
- $subject =
lang('mail_subject_update');
+ $subject = lang('mail_subject_update');
//$link_text =
"http://www.bergen.kommune.no/aktivby/registreringsskjema/ny/?menuaction=activitycalendarfrontend.uiactivity.edit&id={$activity->get_id()}&secret={$activity->get_secret()}";
//$link_text =
"{$mailBaseURL}?menuaction=activitycalendarfrontend.uiactivity.edit&id={$activity->get_id()}&secret={$activity->get_secret()}";
//$link_text =
"http://www.bergen.kommune.no/aktivitetsoversikt/?menuaction=activitycalendarfrontend.uiactivity.edit&id={$activity->get_id()}&secret={$activity->get_secret()}";
- $link_text = "<a
href='http://www.bergen.kommune.no/aktivitetsoversikt/?menuaction=activitycalendarfrontend.uiactivity.edit&id={$activity->get_id()}&secret={$activity->get_secret()}'>Rediger
opplysninger for {$activity->get_title()}</a>";
- $office_name =
activitycalendar_soactivity::get_instance()->get_office_name($activity->get_office());
- $office_id =
$activity->get_office();
+ $link_text = "<a
href='http://www.bergen.kommune.no/aktivitetsoversikt/?menuaction=activitycalendarfrontend.uiactivity.edit&id={$activity->get_id()}&secret={$activity->get_secret()}'>Rediger
opplysninger for {$activity->get_title()}</a>";
+ $office_name =
activitycalendar_soactivity::get_instance()->get_office_name($activity->get_office());
+ $office_id = $activity->get_office();
if($office_id == 1)
{
- $office_id_new = 2;
+ $office_id_new = 2;
}
else if($office_id == 2)
{
- $office_id_new = 1;
+ $office_id_new = 1;
}
else
{
- $office_id_new = (int)$office_id;
+ $office_id_new = (int)$office_id;
}
$office_footer =
activitycalendar_soactivity::get_instance()->get_office_description($office_id_new);
$body =
lang('mail_body_update', $activity->get_title(), $link_text, $office_footer,
$office_name);
@@ -1164,7 +1185,7 @@
{
//$contact_person2 =
activitycalendar_socontactperson::get_instance()->get_group_contact2($activity>get_group_id());
$activity->set_contact_persons(activitycalendar_socontactperson::get_instance()->get_booking_contact_persons($activity->get_group_id(),
true));
- /*if($activity->get_contact_person_2() &&
$activity->get_contact_person_2()->get_email())
+ /* if($activity->get_contact_person_2() &&
$activity->get_contact_person_2()->get_email())
activitycalendar_uiactivities::send_mailnotification_to_group($activity->get_contact_person_2(),
$subject, $body);
else */
if($activity->get_contact_person_1() &&
$activity->get_contact_person_1()->get_email())
@@ -1176,7 +1197,7 @@
{
//$contact_person2 =
activitycalendar_socontactperson::get_instance()->get_oup_contact2($activity>get_group_id());
$activity->set_contact_persons(activitycalendar_socontactperson::get_instance()->get_booking_contact_persons($activity->get_organization_id()));
- /*if($activity->get_contact_person_2() &&
$activity->get_contact_person_2()->get_email())
+ /* if($activity->get_contact_person_2() &&
$activity->get_contact_person_2()->get_email())
activitycalendar_uiactivities::send_mailnotification_to_organization($activity->get_contact_person_2(),
$subject, $body);
else */
if($activity->get_contact_person_1() &&
$activity->get_contact_person_1()->get_email())
@@ -1185,14 +1206,14 @@
}
}
- if (phpgw::get_var('phpgw_return_as') == 'json')
+ if(phpgw::get_var('phpgw_return_as') == 'json')
{
- $message['message'][] =
array('msg'=>lang('E-post sendt'));
+ $message['message'][] = array('msg' =>
lang('E-post sendt'));
return $message;
}
-
+
$GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'activitycalendar.uiactivities.index',
- 'message' => 'E-post sendt'));
+ 'message' => 'E-post sendt'));
}
function send_mailnotification_to_organization($contact_person,
$subject, $body)
Modified: branches/dev-syncromind/activitycalendar/inc/class.uiarena.inc.php
===================================================================
--- branches/dev-syncromind/activitycalendar/inc/class.uiarena.inc.php
2015-12-09 19:38:08 UTC (rev 14552)
+++ branches/dev-syncromind/activitycalendar/inc/class.uiarena.inc.php
2015-12-09 19:44:21 UTC (rev 14553)
@@ -47,84 +47,86 @@
public function index()
{
- if (phpgw::get_var('phpgw_return_as') == 'json')
+ if(phpgw::get_var('phpgw_return_as') == 'json')
{
return $this->query();
}
$appname = lang('arenas');
- $function_msg = lang('list %1', $appname);
- $type = 'all_arenas';
+ $function_msg = lang('list %1', $appname);
+ $type = 'all_arenas';
$data = array(
- 'datatable_name' => $function_msg,
- 'form' => array(
+ 'datatable_name' => $function_msg,
+ 'form' => array(
'toolbar' => array(
'item' => array(
array(
- 'type' =>
'filter',
- 'name' =>
'active',
- 'text' =>
lang('marked_as'),
- 'list' =>
array
-
(
-
array('id' => 'all', 'name' => lang('all')),
-
array('id' => 'active', 'name' => lang('active')),
-
array('id' => 'inactive', 'name' => lang('inactive'))
-
)
- ),
+ 'type' =>
'filter',
+ 'name' =>
'active',
+ 'text' =>
lang('marked_as'),
+ 'list' =>
array
+ (
+
array('id' => 'all', 'name' => lang('all')),
+
array('id' => 'active', 'name' => lang('active')),
+
array('id' => 'inactive', 'name' => lang('inactive'))
+ )
+ ),
array(
- 'type' =>
'link',
- 'value' =>
lang('new'),
- 'href' =>
self::link(array(
-
'menuaction' => 'activitycalendar.uiarena.add'
+ 'type' =>
'link',
+ 'value' =>
lang('new'),
+ 'href' =>
self::link(array(
+
'menuaction' => 'activitycalendar.uiarena.add'
)),
- 'class' =>
'new_item'
- )
+ 'class' =>
'new_item'
+ )
)
)
),
- 'datatable' => array(
- 'source' => self::link(array(
- 'menuaction' =>
'activitycalendar.uiarena.index',
- 'type' =>
$type,
- 'phpgw_return_as' => 'json'
+ 'datatable' => array(
+ 'source' =>
self::link(array(
+ 'menuaction' =>
'activitycalendar.uiarena.index',
+ 'type'
=> $type,
+ 'phpgw_return_as' =>
'json'
)),
- 'download' =>
self::link(array('menuaction' => 'activitycalendar.uiarena.download',
- 'type' =>
$type,
- 'export' => true,
- 'allrows' => true
+ 'download' =>
self::link(array('menuaction' => 'activitycalendar.uiarena.download',
+ 'type' => $type,
+ 'export' => true,
+ 'allrows' => true
)),
- 'allrows' => true,
- 'editor_action' => '',
- 'field' => array(
- array('key'=>'id',
'label'=>lang('id'), 'sortable'=>true, 'hidden'=>false),
-
array('key'=>'arena_name', 'label'=>lang('name'), 'sortable'=>true,
'hidden'=>false),
- array('key'=>'address',
'label'=>lang('address'), 'sortable'=>true, 'hidden'=>false)
+ 'allrows' => true,
+ 'editor_action' => '',
+ 'field' => array(
+ array('key' => 'id', 'label' =>
lang('id'), 'sortable' => true, 'hidden' => false),
+ array('key' => 'arena_name',
'label' => lang('name'), 'sortable' => true, 'hidden' => false),
+ array('key' => 'address',
'label' => lang('address'), 'sortable' => true, 'hidden' => false)
)
)
);
$data['datatable']['actions'][] = array
(
- 'my_name' => 'show',
- 'text' => lang('show'),
- 'action' =>
self::link(array(
- 'menuaction' =>
'activitycalendar.uiarena.view'
- )),
- 'parameters' =>
json_encode(array('parameter'=>array(array('name'=>'id', 'source'=>'id'))))
- );
+ 'my_name' => 'show',
+ 'text' => lang('show'),
+ 'action' => self::link(array(
+ 'menuaction' =>
'activitycalendar.uiarena.view'
+ )),
+ 'parameters' => json_encode(array('parameter'
=> array(array('name' => 'id',
+ 'source' => 'id'))))
+ );
$data['datatable']['actions'][] = array
(
- 'my_name' => 'edit',
- 'text' =>
lang('edit'),
- 'action' =>
self::link(array(
- 'menuaction' =>
'activitycalendar.uiarena.edit'
- )),
- 'parameters' =>
json_encode(array('parameter'=>array(array('name'=>'id', 'source'=>'id'))))
- );
-
+ 'my_name' => 'edit',
+ 'text' => lang('edit'),
+ 'action' => self::link(array(
+ 'menuaction' =>
'activitycalendar.uiarena.edit'
+ )),
+ 'parameters' => json_encode(array('parameter'
=> array(array('name' => 'id',
+ 'source' => 'id'))))
+ );
+
self::render_template_xsl('datatable_jquery', $data);
}
@@ -135,34 +137,34 @@
{
$GLOBALS['phpgw_info']['flags']['app_header'] .= '::' .
lang('view');
// Get the contract part id
- $arena_id = (int)phpgw::get_var('id');
+ $arena_id = (int)phpgw::get_var('id');
$arena =
activitycalendar_soarena::get_instance()->get_single($arena_id);
-
- if (empty($arena))
+
+ if(empty($arena))
{
phpgwapi_cache::message_set(lang('Could not
find specified arena.'), 'error');
$GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'activitycalendar.uiarena.index'));
}
-
- $tabs = array();
- $tabs['arena'] = array('label' => lang('arena'),
'link' => '#arena');
- $active_tab = 'arena';
+ $tabs = array();
+ $tabs['arena'] = array('label' => lang('arena'),
'link' => '#arena');
+ $active_tab = 'arena';
+
$data = array
- (
- 'tabs'
=> phpgwapi_jquery::tabview_generate($tabs, $active_tab),
- 'edit_url'
=> $GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiarena.edit', 'id' => $arena->get_id())),
- 'cancel_url'
=> $GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiarena.index')),
- 'lang_edit'
=> lang('edit'),
- 'lang_cancel'
=> lang('cancel'),
-
- 'arena_name'
=> $arena->get_arena_name(),
- 'address'
=> $arena->get_address(),
- 'address_no'
=> $arena->get_addressnumber(),
- 'active_value'
=> ($arena->is_active() ? lang('active_arena') : lang('inactive_arena'))
+ (
+ 'tabs' =>
phpgwapi_jquery::tabview_generate($tabs, $active_tab),
+ 'edit_url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiarena.edit',
+ 'id' => $arena->get_id())),
+ 'cancel_url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiarena.index')),
+ 'lang_edit' => lang('edit'),
+ 'lang_cancel' => lang('cancel'),
+ 'arena_name' => $arena->get_arena_name(),
+ 'address' =>
$arena->get_address(),
+ 'address_no' => $arena->get_addressnumber(),
+ 'active_value' => ($arena->is_active() ?
lang('active_arena') : lang('inactive_arena'))
);
-
+
self::render_template_xsl(array('arena'), array('view'
=> $data));
}
@@ -170,7 +172,7 @@
{
$GLOBALS['phpgw_info']['flags']['app_header'] .= '::' .
lang('edit');
// Get the contract part id
- $arena_id = (int)phpgw::get_var('id');
+ $arena_id = (int)phpgw::get_var('id');
if(isset($arena_id) && $arena_id > 0)
{
@@ -180,35 +182,34 @@
{
$arena = new activitycalendar_arena();
}
-
- $is_active = $arena->is_active();
- $active_options = array
- (
- array('id'=>'yes', 'name'=>lang('active'),
'selected'=>(($is_active) ? 1 : 0)),
- array('id'=>'no', 'name'=>lang('inactive'),
'selected'=>((!$is_active) ? 1 : 0))
+
+ $is_active = $arena->is_active();
+ $active_options = array
+ (
+ array('id' => 'yes', 'name' => lang('active'),
'selected' => (($is_active) ? 1 : 0)),
+ array('id' => 'no', 'name' => lang('inactive'),
'selected' => ((!$is_active) ? 1 : 0))
);
-
- $tabs = array();
- $tabs['arena'] = array('label' => lang('arena'),
'link' => '#arena');
- $active_tab = 'arena';
+ $tabs = array();
+ $tabs['arena'] = array('label' => lang('arena'),
'link' => '#arena');
+ $active_tab = 'arena';
+
$data = array
- (
- 'tabs'
=> phpgwapi_jquery::tabview_generate($tabs, $active_tab),
- 'form_action'
=> $GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiarena.save')),
- 'cancel_url'
=> $GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiarena.index')),
- 'lang_save'
=> lang('save'),
- 'lang_cancel'
=> lang('cancel'),
-
- 'arena_id'
=> $arena->get_id(),
- 'arena_name'
=> $arena->get_arena_name(),
- 'address'
=> $arena->get_address(),
- 'address_no'
=> $arena->get_addressnumber(),
- 'list_active_options' =>
array('options' => $active_options),
+ (
+ 'tabs' =>
phpgwapi_jquery::tabview_generate($tabs, $active_tab),
+ 'form_action' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiarena.save')),
+ 'cancel_url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiarena.index')),
+ 'lang_save' => lang('save'),
+ 'lang_cancel' => lang('cancel'),
+ 'arena_id' =>
$arena->get_id(),
+ 'arena_name' =>
$arena->get_arena_name(),
+ 'address' =>
$arena->get_address(),
+ 'address_no' =>
$arena->get_addressnumber(),
+ 'list_active_options' => array('options' =>
$active_options),
+ 'validator' =>
phpgwapi_jquery::formvalidator_generate(array('location', 'date',
+ 'security', 'file'))
+ );
- 'validator' =>
phpgwapi_jquery::formvalidator_generate(array('location', 'date', 'security',
'file'))
- );
-
phpgwapi_jquery::load_widget('autocomplete');
$_autocomplete = <<<JS
@@ -221,24 +222,24 @@
});
JS;
$GLOBALS['phpgw']->js->add_code('', $_autocomplete);
-
- self::render_template_xsl(array('arena'), array('edit'
=> $data));
+
+ self::render_template_xsl(array('arena'), array('edit'
=> $data));
}
public function query()
{
- $search = phpgw::get_var('search');
- $order = phpgw::get_var('order');
- $draw = phpgw::get_var('draw', 'int');
- $columns = phpgw::get_var('columns');
+ $search = phpgw::get_var('search');
+ $order = phpgw::get_var('order');
+ $draw = phpgw::get_var('draw', 'int');
+ $columns = phpgw::get_var('columns');
- $start_index = phpgw::get_var('start', 'int',
'REQUEST', 0);
- $num_of_objects = (phpgw::get_var('length', 'int') <=
0) ? $this->user_rows_per_page : phpgw::get_var('length', 'int');
- $sort_field =
($columns[$order[0]['column']]['data']) ? $columns[$order[0]['column']]['data']
: 'id';
- $sort_ascending = ($order[0]['dir'] == 'desc') ? false
: true;
+ $start_index = phpgw::get_var('start', 'int',
'REQUEST', 0);
+ $num_of_objects = (phpgw::get_var('length', 'int') <=
0) ? $this->user_rows_per_page : phpgw::get_var('length', 'int');
+ $sort_field =
($columns[$order[0]['column']]['data']) ? $columns[$order[0]['column']]['data']
: 'id';
+ $sort_ascending = ($order[0]['dir'] == 'desc') ? false
: true;
// Form variables
- $search_for = $search['value'];
- $search_type = phpgw::get_var('search_option');
+ $search_for = $search['value'];
+ $search_type = phpgw::get_var('search_option');
// Create an empty result set
$result_objects = array();
@@ -246,8 +247,8 @@
//Retrieve the type of query and perform type specific
logic
$query_type = phpgw::get_var('type');
- $export =
phpgw::get_var('export','bool');
- if ($export)
+ $export = phpgw::get_var('export', 'bool');
+ if($export)
{
$num_of_objects = null;
}
@@ -276,11 +277,11 @@
{
return $rows;
}
-
- $result_data = array('results' => $rows);
- $result_data['total_records'] = $result_count;
- $result_data['draw'] = $draw;
+ $result_data =
array('results' => $rows);
+ $result_data['total_records'] = $result_count;
+ $result_data['draw'] = $draw;
+
return $this->jquery_results($result_data);
}
@@ -296,7 +297,7 @@
{
$arena = new activitycalendar_arena();
}
-
+
$arena->set_internal_arena_id(phpgw::get_var('internal_arena_id'));
$arena->set_arena_name(phpgw::get_var('arena_name'));
$arena->set_address(phpgw::get_var('address'));
@@ -313,8 +314,9 @@
{
phpgwapi_cache::message_set(lang('messages_form_error'), 'error');
}
-
- $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'activitycalendar.uiarena.view', 'id' =>
$arena->get_id()));
+
+ $GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'activitycalendar.uiarena.view',
+ 'id' => $arena->get_id()));
}
public function download_export()
Modified: branches/dev-syncromind/activitycalendar/inc/class.uicommon.inc.php
===================================================================
--- branches/dev-syncromind/activitycalendar/inc/class.uicommon.inc.php
2015-12-09 19:38:08 UTC (rev 14552)
+++ branches/dev-syncromind/activitycalendar/inc/class.uicommon.inc.php
2015-12-09 19:44:21 UTC (rev 14553)
@@ -31,13 +31,13 @@
if(!isset($array[$key]))
$array[$key] = $value;
}
-
define('MANAGER', 'MANAGER');
define('EXECUTIVE_OFFICER', 'EXECUTIVE_OFFICER');
define('ADMINISTRATOR', 'ADMINISTRATOR');
abstract class activitycalendar_uicommon extends
phpgwapi_uicommon_jquery
{
+
protected static $old_exception_handler;
const LOCATION_ROOT = '.';
@@ -53,7 +53,7 @@
public function __construct()
{
parent::__construct();
-
+
self::set_active_menu('activitycalendar');
$this->acl = & $GLOBALS['phpgw']->acl;
@@ -65,7 +65,7 @@
ADMINISTRATOR => $this->isAdministrator()
); */
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang($GLOBALS['phpgw_info']['flags']['currentapp']);
-
+
$this->user_rows_per_page =
($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']) ?
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] : 10;
}
@@ -177,7 +177,6 @@
}
return $gab_id;
}
-
/**
* Method for JSON queries.
*
@@ -229,38 +228,41 @@
*/
public function download()
{
- $list = $this->query();
+ $list = $this->query();
- $keys = array();
+ $keys = array();
- if(count($list[0]) > 0) {
- foreach($list[0] as $key => $value) {
- if(!is_array($value)) {
- array_push($keys, $key);
- }
- }
- }
-
- // Remove newlines from output
- $count = count($list);
- for($i = 0; $i < $count; $i++)
- {
- foreach ($list[$i] as $key => &$data)
- {
- $data = str_replace(array("\n","\r\n",
"<br>"),'',$data);
- }
- }
+ if(count($list[0]) > 0)
+ {
+ foreach($list[0] as $key => $value)
+ {
+ if(!is_array($value))
+ {
+ array_push($keys, $key);
+ }
+ }
+ }
- // Use keys as headings
- $headings = array();
- $count_keys = count($keys);
- for($j=0;$j<$count_keys;$j++)
- {
- array_push($headings, lang($keys[$j]));
- }
+ // Remove newlines from output
+ $count = count($list);
+ for($i = 0; $i < $count; $i++)
+ {
+ foreach($list[$i] as $key => &$data)
+ {
+ $data = str_replace(array("\n", "\r\n",
"<br>"), '', $data);
+ }
+ }
- $property_common = CreateObject('property.bocommon');
- $property_common->download($list, $keys, $headings);
+ // Use keys as headings
+ $headings = array();
+ $count_keys = count($keys);
+ for($j = 0; $j < $count_keys; $j++)
+ {
+ array_push($headings, lang($keys[$j]));
+ }
+
+ $property_common = CreateObject('property.bocommon');
+ $property_common->download($list, $keys, $headings);
}
/**
Modified: branches/dev-syncromind/activitycalendar/inc/class.uidashboard.inc.php
===================================================================
--- branches/dev-syncromind/activitycalendar/inc/class.uidashboard.inc.php
2015-12-09 19:38:08 UTC (rev 14552)
+++ branches/dev-syncromind/activitycalendar/inc/class.uidashboard.inc.php
2015-12-09 19:44:21 UTC (rev 14553)
@@ -27,95 +27,102 @@
public function index()
{
$GLOBALS['phpgw']->jqcal->add_listener('date_change');
-
+
$columns_def_organization = array(
- array('key'=>'organization_number',
'label'=>lang('organization_number'), 'sortable'=>false),
- array('key'=>'name', 'label'=>lang('name'),
'sortable'=>false),
- array('key'=>'district',
'label'=>lang('district'), 'sortable'=>false),
- array('key'=>'office', 'label'=>lang('office'),
'sortable'=>false),
- array('key'=>'description',
'label'=>lang('description'), 'sortable'=>false),
- array('key'=>'change_type',
'label'=>lang('change_type'), 'sortable'=>false),
- array('key'=>'operations',
'label'=>lang('operations'), 'sortable'=>false, 'className'=>'center')
+ array('key' => 'organization_number', 'label'
=> lang('organization_number'),
+ 'sortable' => false),
+ array('key' => 'name', 'label' => lang('name'),
'sortable' => false),
+ array('key' => 'district', 'label' =>
lang('district'), 'sortable' => false),
+ array('key' => 'office', 'label' =>
lang('office'), 'sortable' => false),
+ array('key' => 'description', 'label' =>
lang('description'), 'sortable' => false),
+ array('key' => 'change_type', 'label' =>
lang('change_type'), 'sortable' => false),
+ array('key' => 'operations', 'label' =>
lang('operations'), 'sortable' => false,
+ 'className' => 'center')
);
$datatable_def[] = array
- (
- 'container' =>
'datatable-container_0',
- 'requestUrl' =>
json_encode(self::link(array('menuaction'=>'activitycalendar.uiorganization.query',
'type'=>'new_organizations', 'phpgw_return_as'=>'json'))),
- 'data' => json_encode(array()),
- 'ColumnDefs' => $columns_def_organization,
- 'config' => array(
- array('disableFilter' => true)
+ (
+ 'container' => 'datatable-container_0',
+ 'requestUrl' =>
json_encode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.query',
+ 'type' => 'new_organizations',
'phpgw_return_as' => 'json'))),
+ 'data' => json_encode(array()),
+ 'ColumnDefs' => $columns_def_organization,
+ 'config' => array(
+ array('disableFilter' => true)
)
);
-
+
$columns_def_activities = array(
- array('key'=>'id', 'label'=>lang('id'),
'sortable'=>true),
- array('key'=>'title', 'label'=>lang('title'),
'sortable'=>true),
- array('key'=>'state', 'label'=>lang('status'),
'sortable'=>true),
- array('key'=>'organization_id',
'label'=>lang('organization'), 'sortable'=>true),
- array('key'=>'group_id',
'label'=>lang('group'), 'sortable'=>true),
- array('key'=>'change_type',
'label'=>lang('change_type'), 'sortable'=>false),
- array('key'=>'district',
'label'=>lang('district'), 'sortable'=>true),
- array('key'=>'office', 'label'=>lang('office'),
'sortable'=>true),
- array('key'=>'category',
'label'=>lang('category'), 'sortable'=>true),
- array('key'=>'description',
'label'=>lang('description'), 'sortable'=>true),
- array('key'=>'arena', 'label'=>lang('arena'),
'sortable'=>true),
- array('key'=>'time', 'label'=>lang('time'),
'sortable'=>true),
- array('key'=>'contact_person_1',
'label'=>lang('contact_person_1'), 'sortable'=>true),
- array('key'=>'contact_person_2',
'label'=>lang('contact_person_2'), 'sortable'=>true),
- array('key'=>'last_change_date',
'label'=>lang('last_change_date'), 'sortable'=>true)
+ array('key' => 'id', 'label' => lang('id'),
'sortable' => true),
+ array('key' => 'title', 'label' =>
lang('title'), 'sortable' => true),
+ array('key' => 'state', 'label' =>
lang('status'), 'sortable' => true),
+ array('key' => 'organization_id', 'label' =>
lang('organization'), 'sortable' => true),
+ array('key' => 'group_id', 'label' =>
lang('group'), 'sortable' => true),
+ array('key' => 'change_type', 'label' =>
lang('change_type'), 'sortable' => false),
+ array('key' => 'district', 'label' =>
lang('district'), 'sortable' => true),
+ array('key' => 'office', 'label' =>
lang('office'), 'sortable' => true),
+ array('key' => 'category', 'label' =>
lang('category'), 'sortable' => true),
+ array('key' => 'description', 'label' =>
lang('description'), 'sortable' => true),
+ array('key' => 'arena', 'label' =>
lang('arena'), 'sortable' => true),
+ array('key' => 'time', 'label' => lang('time'),
'sortable' => true),
+ array('key' => 'contact_person_1', 'label' =>
lang('contact_person_1'), 'sortable' => true),
+ array('key' => 'contact_person_2', 'label' =>
lang('contact_person_2'), 'sortable' => true),
+ array('key' => 'last_change_date', 'label' =>
lang('last_change_date'), 'sortable' => true)
);
$tabletools_activities[] = array
(
- 'my_name' => 'show',
- 'text' => lang('show'),
- 'action' =>
self::link(array(
- 'menuaction' =>
'activitycalendar.uiactivities.view'
- )),
- 'parameters' =>
json_encode(array('parameter'=>array(array('name'=>'id', 'source'=>'id'))))
- );
-
+ 'my_name' => 'show',
+ 'text' => lang('show'),
+ 'action' => self::link(array(
+ 'menuaction' =>
'activitycalendar.uiactivities.view'
+ )),
+ 'parameters' => json_encode(array('parameter'
=> array(array('name' => 'id',
+ 'source' => 'id'))))
+ );
+
$tabletools_activities[] = array
(
- 'my_name' => 'edit',
- 'text' =>
lang('edit'),
- 'action' =>
self::link(array(
- 'menuaction' =>
'activitycalendar.uiactivities.edit'
- )),
- 'parameters' =>
json_encode(array('parameter'=>array(array('name'=>'id', 'source'=>'id'))))
- );
-
+ 'my_name' => 'edit',
+ 'text' => lang('edit'),
+ 'action' => self::link(array(
+ 'menuaction' =>
'activitycalendar.uiactivities.edit'
+ )),
+ 'parameters' => json_encode(array('parameter'
=> array(array('name' => 'id',
+ 'source' => 'id'))))
+ );
+
$tabletools_activities[] = array
(
- 'my_name' => 'send_mail',
- 'text' =>
lang('send_mail'),
- 'type' => 'custom',
- 'custom_code' => "
- var oArgs = ".json_encode(array(
- 'menuaction'
=> 'activitycalendar.uiactivities.send_mail',
- 'message_type'
=> 'update',
-
'phpgw_return_as' => 'json'
- )).";
- var parameters =
".json_encode(array('parameter'=>array(array('name'=>'activity_id',
'source'=>'id')))).";
+ 'my_name' => 'send_mail',
+ 'text' => lang('send_mail'),
+ 'type' => 'custom',
+ 'custom_code' => "
+ var oArgs = " .
json_encode(array(
+ 'menuaction' =>
'activitycalendar.uiactivities.send_mail',
+ 'message_type' => 'update',
+ 'phpgw_return_as' => 'json'
+ )) . ";
+ var parameters = " .
json_encode(array('parameter' => array(array('name' => 'activity_id',
+ 'source' => 'id')))) .
";
sendMail(oArgs, parameters);
"
- );
-
+ );
+
$datatable_def[] = array
- (
- 'container' =>
'datatable-container_1',
- 'requestUrl' =>
json_encode(self::link(array('menuaction'=>'activitycalendar.uiactivities.query',
'type'=>'new_activities', 'phpgw_return_as'=>'json'))),
- 'data' => json_encode(array()),
- 'ColumnDefs' => $columns_def_activities,
- 'tabletools' => $tabletools_activities
+ (
+ 'container' => 'datatable-container_1',
+ 'requestUrl' =>
json_encode(self::link(array('menuaction' =>
'activitycalendar.uiactivities.query',
+ 'type' => 'new_activities',
'phpgw_return_as' => 'json'))),
+ 'data' => json_encode(array()),
+ 'ColumnDefs' => $columns_def_activities,
+ 'tabletools' => $tabletools_activities
);
-
- $activity_state_options[] = array('id'=>'all',
'name'=>lang('all'), 'selected'=>1);
- $activity_state_options[] = array('id'=>'1',
'name'=>lang('new'), 'selected'=>0);
- $activity_state_options[] = array('id'=>'2',
'name'=>lang('change'), 'selected'=>0);
+ $activity_state_options[] = array('id' => 'all',
'name' => lang('all'), 'selected' => 1);
+ $activity_state_options[] = array('id' => '1',
'name' => lang('new'), 'selected' => 0);
+ $activity_state_options[] = array('id' => '2',
'name' => lang('change'), 'selected' => 0);
+
$uid =
$GLOBALS['phpgw_info']['user']['account_id'];
$user_office =
activitycalendar_soactivity::get_instance()->get_office_from_user($uid);
if($user_office && $user_office == 1)
@@ -126,33 +133,34 @@
{
$user_office = 1;
}
-
- $activity_district_options[] = array('id'=>'all',
'name'=>lang('all'), 'selected'=>0);
- $districts =
activitycalendar_soactivity::get_instance()->select_district_list();
+
+ $activity_district_options[] = array('id' => 'all',
'name' => lang('all'), 'selected' => 0);
+ $districts =
activitycalendar_soactivity::get_instance()->select_district_list();
foreach($districts as $district)
{
- $selected = ($user_office == $district['id']) ?
1 : 0;
- $activity_district_options[] =
array('id'=>$district['id'], 'name'=>$district['name'], 'selected'=>$selected);
+ $selected
= ($user_office == $district['id']) ? 1 : 0;
+ $activity_district_options[] = array('id' =>
$district['id'], 'name' => $district['name'],
+ 'selected' => $selected);
}
-
- $activity_category_options[] = array('id'=>'all',
'name'=>lang('all'), 'selected'=>0);
- $categories =
activitycalendar_soactivity::get_instance()->get_categories();
+
+ $activity_category_options[] = array('id' => 'all',
'name' => lang('all'), 'selected' => 0);
+ $categories =
activitycalendar_soactivity::get_instance()->get_categories();
foreach($categories as $category)
{
- $activity_category_options[] =
array('id'=>$category->get_id(), 'name'=>$category->get_name(), 'selected'=>0);
+ $activity_category_options[] = array('id' =>
$category->get_id(), 'name' => $category->get_name(),
+ 'selected' => 0);
}
-
+
$data = array
(
- 'datatable_def'
=> $datatable_def,
-
- 'list_activity_state_options'
=> array('options' => $activity_state_options),
- 'list_activity_district_options'
=> array('options' => $activity_district_options),
- 'list_activity_category_options'
=> array('options' => $activity_category_options)
- );
-
+ 'datatable_def' => $datatable_def,
+ 'list_activity_state_options' =>
array('options' => $activity_state_options),
+ 'list_activity_district_options' =>
array('options' => $activity_district_options),
+ 'list_activity_category_options' =>
array('options' => $activity_category_options)
+ );
+
self::add_javascript('activitycalendar',
'activitycalendar', 'dashboard.index.js');
- self::render_template_xsl(array('dashboard',
'datatable_inline'), array('edit' => $data));
+ self::render_template_xsl(array('dashboard',
'datatable_inline'), array('edit' => $data));
}
public function changed_organizations()
@@ -267,7 +275,7 @@
{
array_walk(
$organization_data['results'], array($this,
'add_actions'), array(// Parameters (non-object pointers)
- $type // [2] The type
of query
+ $type // [2] The type of query
)
);
}
@@ -380,12 +388,12 @@
if($value['organization_id'] != '' &&
$value['organization_id'] != null)
{
$value['actions'][] =
html_entity_decode(self::link(array('menuaction' => 'booking.uigroup.show',
- 'id' => $value['id'])));
+ 'id' =>
$value['id'])));
}
else
{
$value['actions'][] =
html_entity_decode(self::link(array('menuaction' =>
'booking.uiorganization.show',
- 'id' => $value['id'])));
+ 'id' =>
$value['id'])));
}
$value['labels'][] = lang('show');
break;
@@ -395,12 +403,12 @@
if($value['organization_id'] != '' &&
$value['organization_id'] != null)
{
$value['actions'][] =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.show',
- 'id' => $value['id'],
'type' => 'group')));
+ 'id' =>
$value['id'], 'type' => 'group')));
}
else
{
$value['actions'][] =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.show',
- 'id' => $value['id'])));
+ 'id' =>
$value['id'])));
}
$value['labels'][] = lang('show');
if($value['transferred'] == false)
@@ -409,12 +417,12 @@
if($value['organization_id'] !=
'' && $value['organization_id'] != null)
{
$value['actions'][] =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.show',
- 'id' =>
$value['id'], 'type' => 'group')));
+ 'id'
=> $value['id'], 'type' => 'group')));
}
else
{
$value['actions'][] =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.edit',
- 'id' =>
$value['id'])));
+ 'id'
=> $value['id'])));
}
$value['labels'][] =
lang('edit');
}
@@ -424,12 +432,12 @@
if($value['organization_id'] != '' &&
$value['organization_id'] != null)
{
$value['actions'][] =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.show',
- 'id' => $value['id'],
'type' => 'group')));
+ 'id' =>
$value['id'], 'type' => 'group')));
}
else
{
$value['actions'][] =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.show',
- 'id' => $value['id'])));
+ 'id' =>
$value['id'])));
}
$value['labels'][] = lang('show');
if($value['transferred'] == false)
@@ -438,12 +446,12 @@
if($value['organization_id'] !=
'' && $value['organization_id'] != null)
{
$value['actions'][] =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.edit',
- 'id' =>
$value['id'], 'type' => 'group')));
+ 'id'
=> $value['id'], 'type' => 'group')));
}
else
{
$value['actions'][] =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.edit',
- 'id' =>
$value['id'])));
+ 'id'
=> $value['id'])));
}
$value['labels'][] =
lang('edit');
}
Modified:
branches/dev-syncromind/activitycalendar/inc/class.uiorganization.inc.php
===================================================================
--- branches/dev-syncromind/activitycalendar/inc/class.uiorganization.inc.php
2015-12-09 19:38:08 UTC (rev 14552)
+++ branches/dev-syncromind/activitycalendar/inc/class.uiorganization.inc.php
2015-12-09 19:44:21 UTC (rev 14553)
@@ -38,67 +38,72 @@
}
public function index()
- {
- if (phpgw::get_var('phpgw_return_as') == 'json')
+ {
+ if(phpgw::get_var('phpgw_return_as') == 'json')
{
return $this->query();
}
$appname = lang('organizations');
- $function_msg = lang('list %1', $appname);
- $type = 'all_organizations';
+ $function_msg = lang('list %1', $appname);
+ $type = 'all_organizations';
$data = array(
- 'datatable_name' => $function_msg,
- 'form' => array(
+ 'datatable_name' => $function_msg,
+ 'form' => array(
'toolbar' => array(
'item' => array()
)
),
- 'datatable' => array(
- 'source' => self::link(array(
- 'menuaction' =>
'activitycalendar.uiorganization.index',
- 'type' =>
$type,
- 'phpgw_return_as' => 'json'
+ 'datatable' => array(
+ 'source' =>
self::link(array(
+ 'menuaction' =>
'activitycalendar.uiorganization.index',
+ 'type'
=> $type,
+ 'phpgw_return_as' =>
'json'
)),
- 'download' =>
self::link(array('menuaction' => 'activitycalendar.uiorganization.download',
- 'type' =>
$type,
- 'export' => true,
- 'allrows' => true
+ 'download' =>
self::link(array('menuaction' => 'activitycalendar.uiorganization.download',
+ 'type' => $type,
+ 'export' => true,
+ 'allrows' => true
)),
- 'allrows' => true,
- 'editor_action' => '',
- 'field' => array(
-
array('key'=>'organization_number', 'label'=>lang('organization_number'),
'sortable'=>true, 'hidden'=>false),
- array('key'=>'name',
'label'=>lang('name'), 'sortable'=>true, 'hidden'=>false),
-
array('key'=>'district', 'label'=>lang('district'), 'sortable'=>true,
'hidden'=>false),
- array('key'=>'office',
'label'=>lang('office'), 'sortable'=>true, 'hidden'=>false),
-
array('key'=>'description', 'label'=>lang('description'), 'sortable'=>true,
'hidden'=>false),
-
array('key'=>'operations', 'label'=>lang('operations'), 'sortable'=>false,
'className'=>'center')
+ 'allrows' => true,
+ 'editor_action' => '',
+ 'field' => array(
+ array('key' =>
'organization_number', 'label' => lang('organization_number'),
+ 'sortable' => true,
'hidden' => false),
+ array('key' => 'name', 'label'
=> lang('name'), 'sortable' => true, 'hidden' => false),
+ array('key' => 'district',
'label' => lang('district'), 'sortable' => true,
+ 'hidden' => false),
+ array('key' => 'office',
'label' => lang('office'), 'sortable' => true, 'hidden' => false),
+ array('key' => 'description',
'label' => lang('description'), 'sortable' => true,
+ 'hidden' => false),
+ array('key' => 'operations',
'label' => lang('operations'), 'sortable' => false,
+ 'className' => 'center')
)
)
);
-
- self::render_template_xsl('datatable_jquery', $data);
+
+ self::render_template_xsl('datatable_jquery', $data);
}
public function save()
{
- $id = (int)phpgw::get_var('id');
+ $id = (int)phpgw::get_var('id');
$so_org =
activitycalendar_soorganization::get_instance();
$so_activity =
activitycalendar_soactivity::get_instance();
//$so_contact =
activitycalendar_socontactperson::get_instance();
- $org_array = $so_org->get(null, null, null, null,
null, null, array('id' => $id, 'changed_orgs' => 'true'));
+ $org_array = $so_org->get(null, null, null, null,
null, null, array('id' => $id,
+ 'changed_orgs' => 'true'));
if(count($org_array) > 0)
{
$keys = array_keys($org_array);
$org = $org_array[$keys[0]];
}
-
+
if(isset($_POST['store_organization'])) // The user has
pressed the store button
- {
+ {
$orgno = phpgw::get_var('orgno');
$district =
phpgw::get_var('org_district');
if(isset($district) && is_numeric($district))
@@ -295,48 +300,53 @@
$GLOBALS['phpgw']->redirect_link('/index.php',
array('menuaction' => 'activitycalendar.uidashboard.index'));
}
}
-
+
public function changed_organizations()
{
self::set_active_menu('activitycalendar::organizationList::changed_organizations');
-
- if (phpgw::get_var('phpgw_return_as') == 'json')
+
+ if(phpgw::get_var('phpgw_return_as') == 'json')
{
return $this->query();
}
$appname = lang('changed_organizations_groups');
- $function_msg = lang('list %1', $appname);
- $type = 'changed_organizations';
+ $function_msg = lang('list %1', $appname);
+ $type = 'changed_organizations';
$data = array(
- 'datatable_name' => $function_msg,
- 'form' => array(
+ 'datatable_name' => $function_msg,
+ 'form' => array(
'toolbar' => array(
'item' => array()
)
),
- 'datatable' => array(
- 'source' => self::link(array(
- 'menuaction' =>
'activitycalendar.uiorganization.index',
- 'type' =>
$type,
- 'phpgw_return_as' => 'json'
+ 'datatable' => array(
+ 'source' =>
self::link(array(
+ 'menuaction' =>
'activitycalendar.uiorganization.index',
+ 'type'
=> $type,
+ 'phpgw_return_as' =>
'json'
)),
- 'allrows' => true,
- 'editor_action' => '',
- 'field' => array(
-
array('key'=>'organization_number', 'label'=>lang('organization_number'),
'sortable'=>true, 'hidden'=>false),
- array('key'=>'name',
'label'=>lang('name'), 'sortable'=>true, 'hidden'=>false),
-
array('key'=>'district', 'label'=>lang('district'), 'sortable'=>true,
'hidden'=>false),
- array('key'=>'office',
'label'=>lang('office'), 'sortable'=>true, 'hidden'=>false),
-
array('key'=>'description', 'label'=>lang('description'), 'sortable'=>true,
'hidden'=>false),
-
array('key'=>'change_type', 'label'=>lang('change_type'), 'sortable'=>false,
'hidden'=>false),
-
array('key'=>'operations', 'label'=>lang('operations'), 'sortable'=>false,
'className'=>'center')
+ 'allrows' => true,
+ 'editor_action' => '',
+ 'field' => array(
+ array('key' =>
'organization_number', 'label' => lang('organization_number'),
+ 'sortable' => true,
'hidden' => false),
+ array('key' => 'name', 'label'
=> lang('name'), 'sortable' => true, 'hidden' => false),
+ array('key' => 'district',
'label' => lang('district'), 'sortable' => true,
+ 'hidden' => false),
+ array('key' => 'office',
'label' => lang('office'), 'sortable' => true, 'hidden' => false),
+ array('key' => 'description',
'label' => lang('description'), 'sortable' => true,
+ 'hidden' => false),
+ array('key' => 'change_type',
'label' => lang('change_type'), 'sortable' => false,
+ 'hidden' => false),
+ array('key' => 'operations',
'label' => lang('operations'), 'sortable' => false,
+ 'className' => 'center')
)
)
);
-
+
self::render_template_xsl('datatable_jquery', $data);
}
@@ -366,18 +376,19 @@
public function edit()
{
$GLOBALS['phpgw_info']['flags']['app_header'] .= '::' .
lang('edit');
- $id = (int)phpgw::get_var('id');
+ $id = (int)phpgw::get_var('id');
$so_org =
activitycalendar_soorganization::get_instance();
$so_activity =
activitycalendar_soactivity::get_instance();
$so_contact =
activitycalendar_socontactperson::get_instance();
- $org_array = $so_org->get(null, null, null, null,
null, null, array('id' => $id, 'changed_orgs' => 'true'));
+ $org_array = $so_org->get(null, null, null, null,
null, null, array('id' => $id,
+ 'changed_orgs' => 'true'));
if(count($org_array) > 0)
{
$keys = array_keys($org_array);
$org = $org_array[$keys[0]];
}
-
+
$districts = $so_activity->get_districts();
$contact_persons =
$so_contact->get_local_contact_persons($org->get_id());
@@ -389,67 +400,64 @@
{
$curr_district =
activitycalendar_soactivity::get_instance()->get_district_from_name($org->get_district());
}
- $district_options[] = array('id'=>'',
'name'=>lang('Ingen bydel valgt'), 'selected'=>0);
+ $district_options[] = array('id' => '', 'name' =>
lang('Ingen bydel valgt'), 'selected' => 0);
foreach($districts as $d)
{
- $selected = ($curr_district ==
$d['part_of_town_id']) ? 1 : 0;
- $district_options[] =
array('id'=>$d['part_of_town_id'], 'name'=>$d['name'], 'selected'=>$selected);
+ $selected =
($curr_district == $d['part_of_town_id']) ? 1 : 0;
+ $district_options[] = array('id' =>
$d['part_of_town_id'], 'name' => $d['name'],
+ 'selected' => $selected);
}
-
- $tabs = array();
- $tabs['organization'] = array('label' =>
lang('organization'), 'link' => '#organization');
- $active_tab = 'organization';
+ $tabs = array();
+ $tabs['organization'] = array('label' =>
lang('organization'), 'link' => '#organization');
+ $active_tab =
'organization';
+
$data = array
- (
- 'tabs'
=> phpgwapi_jquery::tabview_generate($tabs, $active_tab),
- 'form_action'
=> $GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiorganization.save')),
- 'cancel_url'
=> $GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiorganization.changed_organizations')),
- 'lang_update_org'
=> lang('update_org'),
- 'lang_reject'
=> lang('reject'),
- 'lang_store'
=> lang('store'),
- 'lang_cancel'
=> lang('cancel'),
-
- 'organization_id'
=> $org->get_id(),
- 'original_org_id'
=> ($org->get_original_org_id()) ? $org->get_original_org_id() : '',
- 'organization_name'
=> $org->get_name(),
- 'organization_no'
=> $org->get_organization_number(),
- 'homepage'
=> $org->get_homepage(),
- 'email'
=> $org->get_email(),
- 'address'
=> $org->get_address().' '.$org->get_addressnumber(),
- 'phone'
=> $org->get_phone(),
- 'zip_code'
=> $org->get_zip_code(),
- 'city'
=> $org->get_city(),
- 'description'
=> $org->get_description(),
-
- 'contact1_id'
=> $cp1->get_id(),
- 'contact1_name'
=> $cp1->get_name(),
- 'contact1_phone'
=> $cp1->get_phone(),
- 'contact1_email'
=> $cp1->get_email(),
-
- 'contact2_id'
=> ($cp2) ? $cp2->get_id() : '',
- 'contact2_name'
=> ($cp2) ? $cp2->get_name() : '',
- 'contact2_phone'
=> ($cp2) ? $cp2->get_phone() : '',
- 'contact2_email'
=> ($cp2) ? $cp2->get_email() : '',
-
- 'list_district_options' =>
array('options' => $district_options),
+ (
+ 'tabs' =>
phpgwapi_jquery::tabview_generate($tabs, $active_tab),
+ 'form_action' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiorganization.save')),
+ 'cancel_url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiorganization.changed_organizations')),
+ 'lang_update_org' => lang('update_org'),
+ 'lang_reject' => lang('reject'),
+ 'lang_store' => lang('store'),
+ 'lang_cancel' => lang('cancel'),
+ 'organization_id' => $org->get_id(),
+ 'original_org_id' =>
($org->get_original_org_id()) ? $org->get_original_org_id() : '',
+ 'organization_name' => $org->get_name(),
+ 'organization_no' =>
$org->get_organization_number(),
+ 'homepage' =>
$org->get_homepage(),
+ 'email' =>
$org->get_email(),
+ 'address' =>
$org->get_address() . ' ' . $org->get_addressnumber(),
+ 'phone' =>
$org->get_phone(),
+ 'zip_code' =>
$org->get_zip_code(),
+ 'city' =>
$org->get_city(),
+ 'description' =>
$org->get_description(),
+ 'contact1_id' => $cp1->get_id(),
+ 'contact1_name' => $cp1->get_name(),
+ 'contact1_phone' => $cp1->get_phone(),
+ 'contact1_email' => $cp1->get_email(),
+ 'contact2_id' => ($cp2) ? $cp2->get_id() :
'',
+ 'contact2_name' => ($cp2) ? $cp2->get_name() :
'',
+ 'contact2_phone' => ($cp2) ? $cp2->get_phone()
: '',
+ 'contact2_email' => ($cp2) ? $cp2->get_email()
: '',
+ 'list_district_options' => array('options' =>
$district_options),
+ 'validator' =>
phpgwapi_jquery::formvalidator_generate(array('location', 'date',
+ 'security', 'file'))
+ );
- 'validator' =>
phpgwapi_jquery::formvalidator_generate(array('location', 'date', 'security',
'file'))
- );
-
- self::render_template_xsl(array('organization'),
array('edit' => $data));
-
+ self::render_template_xsl(array('organization'),
array('edit' => $data));
}
public function view()
{
$GLOBALS['phpgw_info']['flags']['app_header'] .= '::' .
lang('view');
- $id = (int)phpgw::get_var('id');
+ $id = (int)phpgw::get_var('id');
$so_org =
activitycalendar_soorganization::get_instance();
$so_contact =
activitycalendar_socontactperson::get_instance();
- $org_array = $so_org->get(null, null, null, null,
null, null, array('id' => $id, 'changed_orgs' => 'true'));
+ $org_array = $so_org->get(null, null, null, null,
null, null, array('id' => $id,
+ 'changed_orgs' => 'true'));
if(count($org_array) > 0)
{
$keys = array_keys($org_array);
@@ -479,46 +487,43 @@
$dictrict = $org->get_district();
}
}
-
- $tabs = array();
- $tabs['organization'] = array('label' =>
lang('organization'), 'link' => '#organization');
- $active_tab = 'organization';
+ $tabs = array();
+ $tabs['organization'] = array('label' =>
lang('organization'), 'link' => '#organization');
+ $active_tab =
'organization';
+
$data = array
- (
- 'tabs'
=> phpgwapi_jquery::tabview_generate($tabs, $active_tab),
- 'cancel_url'
=> $GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiorganization.changed_organizations')),
- 'edit_url'
=> $GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiorganization.edit','id' => $id)),
- 'lang_edit'
=> lang('edit'),
- 'lang_cancel'
=> lang('cancel'),
-
- 'organization_id'
=> $org->get_id(),
- 'original_org_id'
=> ($org->get_original_org_id()) ? $org->get_original_org_id() : '',
- 'organization_name'
=> $org->get_name(),
- 'organization_no'
=> $org->get_organization_number(),
- 'homepage'
=> $org->get_homepage(),
- 'email'
=> $org->get_email(),
- 'address'
=> $org->get_address().' '.$org->get_addressnumber(),
- 'phone'
=> $org->get_phone(),
- 'zip_code'
=> $org->get_zip_code(),
- 'city'
=> $org->get_city(),
- 'description'
=> $org->get_description(),
- 'dictrict'
=> $dictrict,
- 'transferred'
=> ($org->get_transferred() ? 1 : ''),
-
- 'contact1_id'
=> $cp1->get_id(),
- 'contact1_name'
=> $cp1->get_name(),
- 'contact1_phone'
=> $cp1->get_phone(),
- 'contact1_email'
=> $cp1->get_email(),
-
- 'contact2_id'
=> ($cp2) ? $cp2->get_id() : '',
- 'contact2_name'
=> ($cp2) ? $cp2->get_name() : '',
- 'contact2_phone'
=> ($cp2) ? $cp2->get_phone() : '',
- 'contact2_email'
=> ($cp2) ? $cp2->get_email() : ''
-
+ (
+ 'tabs' =>
phpgwapi_jquery::tabview_generate($tabs, $active_tab),
+ 'cancel_url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiorganization.changed_organizations')),
+ 'edit_url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'activitycalendar.uiorganization.edit',
+ 'id' => $id)),
+ 'lang_edit' => lang('edit'),
+ 'lang_cancel' => lang('cancel'),
+ 'organization_id' => $org->get_id(),
+ 'original_org_id' =>
($org->get_original_org_id()) ? $org->get_original_org_id() : '',
+ 'organization_name' => $org->get_name(),
+ 'organization_no' =>
$org->get_organization_number(),
+ 'homepage' =>
$org->get_homepage(),
+ 'email' =>
$org->get_email(),
+ 'address' =>
$org->get_address() . ' ' . $org->get_addressnumber(),
+ 'phone' =>
$org->get_phone(),
+ 'zip_code' =>
$org->get_zip_code(),
+ 'city' =>
$org->get_city(),
+ 'description' =>
$org->get_description(),
+ 'dictrict' => $dictrict,
+ 'transferred' =>
($org->get_transferred() ? 1 : ''),
+ 'contact1_id' => $cp1->get_id(),
+ 'contact1_name' => $cp1->get_name(),
+ 'contact1_phone' => $cp1->get_phone(),
+ 'contact1_email' => $cp1->get_email(),
+ 'contact2_id' => ($cp2) ? $cp2->get_id() :
'',
+ 'contact2_name' => ($cp2) ? $cp2->get_name() :
'',
+ 'contact2_phone' => ($cp2) ? $cp2->get_phone()
: '',
+ 'contact2_email' => ($cp2) ? $cp2->get_email()
: ''
);
-
- self::render_template_xsl(array('organization'),
array('view' => $data));
+
+ self::render_template_xsl(array('organization'),
array('view' => $data));
}
/**
@@ -527,25 +532,25 @@
*/
public function query()
{
- $search = phpgw::get_var('search');
- $order = phpgw::get_var('order');
- $draw = phpgw::get_var('draw', 'int');
- $columns = phpgw::get_var('columns');
+ $search = phpgw::get_var('search');
+ $order = phpgw::get_var('order');
+ $draw = phpgw::get_var('draw', 'int');
+ $columns = phpgw::get_var('columns');
- $start_index = phpgw::get_var('start', 'int',
'REQUEST', 0);
- $num_of_objects = (phpgw::get_var('length', 'int') <=
0) ? $this->user_rows_per_page : phpgw::get_var('length', 'int');
- $sort_field =
($columns[$order[0]['column']]['data']) ? $columns[$order[0]['column']]['data']
: 'identifier';
- $sort_ascending = ($order[0]['dir'] == 'desc') ? false
: true;
+ $start_index = phpgw::get_var('start', 'int',
'REQUEST', 0);
+ $num_of_objects = (phpgw::get_var('length', 'int') <=
0) ? $this->user_rows_per_page : phpgw::get_var('length', 'int');
+ $sort_field =
($columns[$order[0]['column']]['data']) ? $columns[$order[0]['column']]['data']
: 'identifier';
+ $sort_ascending = ($order[0]['dir'] == 'desc') ? false
: true;
// Form variables
- $search_for = $search['value'];
- $search_type = phpgw::get_var('search_option');
+ $search_for = $search['value'];
+ $search_type = phpgw::get_var('search_option');
// Create an empty result set
- $result_objects = array();
- $result_count = 0;
+ $result_objects = array();
+ $result_count = 0;
- $export =
phpgw::get_var('export','bool');
- if ($export)
+ $export = phpgw::get_var('export', 'bool');
+ if($export)
{
$num_of_objects = null;
}
@@ -614,12 +619,12 @@
}
}
}
-
+
if(!$export)
{
array_walk($rows, array($this, 'add_actions'),
array(// Parameters (non-object pointers)
- $type // [2]
The type of query
- )
+ $type // [2] The type of query
+ )
);
}
@@ -628,9 +633,9 @@
return $rows;
}
- $result_data = array('results' => $rows);
- $result_data['total_records'] = $result_count;
- $result_data['draw'] = $draw;
+ $result_data =
array('results' => $rows);
+ $result_data['total_records'] = $result_count;
+ $result_data['draw'] = $draw;
return $this->jquery_results($result_data);
}
@@ -678,36 +683,36 @@
* Public method. Called when a user wants to view information
about a party.
* @param HTTP::id the party ID
*/
- /*public function view()
- {
- $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' .
lang('view');
- // Get the contract part id
- $party_id = (int)phpgw::get_var('id');
- if(isset($party_id) && $party_id > 0)
- {
- $party =
rental_soparty::get_instance()->get_single($party_id);
- }
- else
- {
- $this->render('permission_denied.php',
array('error' => lang('invalid_request')));
- return;
- }
+ /* public function view()
+ {
+ $GLOBALS['phpgw_info']['flags']['app_header'] .= '::' .
lang('view');
+ // Get the contract part id
+ $party_id = (int)phpgw::get_var('id');
+ if(isset($party_id) && $party_id > 0)
+ {
+ $party =
rental_soparty::get_instance()->get_single($party_id);
+ }
+ else
+ {
+ $this->render('permission_denied.php', array('error' =>
lang('invalid_request')));
+ return;
+ }
- if(isset($party) &&
$party->has_permission(PHPGW_ACL_READ))
- {
- return $this->render(
- 'party.php', array(
- 'party' => $party,
- 'editable' => false,
- 'cancel_link' =>
self::link(array('menuaction' => 'rental.uiparty.index', 'populate_form' =>
'yes')),
- )
- );
- }
- else
- {
- $this->render('permission_denied.php',
array('error' => lang('permission_denied_view_party')));
- }
- }*/
+ if(isset($party) && $party->has_permission(PHPGW_ACL_READ))
+ {
+ return $this->render(
+ 'party.php', array(
+ 'party' => $party,
+ 'editable' => false,
+ 'cancel_link' => self::link(array('menuaction' =>
'rental.uiparty.index', 'populate_form' => 'yes')),
+ )
+ );
+ }
+ else
+ {
+ $this->render('permission_denied.php', array('error' =>
lang('permission_denied_view_party')));
+ }
+ } */
public function download_agresso()
{
@@ -726,7 +731,7 @@
public function add_actions(&$value, $key, $params)
{
$actions = array();
-
+
$query_type = $params[0];
switch($query_type)
@@ -735,126 +740,126 @@
if($value['organization_id'] != '' &&
$value['organization_id'] != null)
{
$url =
html_entity_decode(self::link(array('menuaction' => 'booking.uigroup.show',
- 'id' => $value['id'])));
+ 'id' =>
$value['id'])));
}
else
{
$url =
html_entity_decode(self::link(array('menuaction' =>
'booking.uiorganization.show',
- 'id' => $value['id'])));
+ 'id' =>
$value['id'])));
}
- $actions[] = '<a
href="'.$url.'">'.lang('show').'</a>';
+ $actions[] = '<a href="' . $url . '">'
. lang('show') . '</a>';
break;
case 'changed_organizations':
if($value['organization_id'] != '' &&
$value['organization_id'] != null)
{
$url =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.view',
- 'id' => $value['id'],
'type' => 'group')));
+ 'id' =>
$value['id'], 'type' => 'group')));
}
else
{
$url =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.view',
- 'id' => $value['id'])));
+ 'id' =>
$value['id'])));
}
- $actions[] = '<a
href="'.$url.'">'.lang('show').'</a>';
+ $actions[] = '<a href="' . $url . '">'
. lang('show') . '</a>';
if($value['transferred'] == false)
{
if($value['organization_id'] !=
'' && $value['organization_id'] != null)
{
$url =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.view',
- 'id' =>
$value['id'], 'type' => 'group')));
+ 'id'
=> $value['id'], 'type' => 'group')));
}
else
{
$url =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.edit',
- 'id' =>
$value['id'])));
+ 'id'
=> $value['id'])));
}
- $actions[] = '<a
href="'.$url.'">'.lang('edit').'</a>';
+ $actions[] = '<a href="' . $url
. '">' . lang('edit') . '</a>';
}
break;
case 'new_organizations':
if($value['organization_id'] != '' &&
$value['organization_id'] != null)
{
$url =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.view',
- 'id' => $value['id'],
'type' => 'group')));
+ 'id' =>
$value['id'], 'type' => 'group')));
}
else
{
$url =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.view',
- 'id' => $value['id'])));
+ 'id' =>
$value['id'])));
}
- $actions[] = '<a
href="'.$url.'">'.lang('show').'</a>';
+ $actions[] = '<a href="' . $url . '">'
. lang('show') . '</a>';
if($value['transferred'] == false)
{
if($value['organization_id'] !=
'' && $value['organization_id'] != null)
{
$url =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.view',
- 'id' =>
$value['id'], 'type' => 'group')));
+ 'id'
=> $value['id'], 'type' => 'group')));
}
else
{
$url =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.edit',
- 'id' =>
$value['id'])));
+ 'id'
=> $value['id'])));
}
- $actions[] = '<a
href="'.$url.'">'.lang('edit').'</a>';
+ $actions[] = '<a href="' . $url
. '">' . lang('edit') . '</a>';
}
break;
case 'changed_groups':
if($value['organization_id'] != '' &&
$value['organization_id'] != null)
{
$url =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.view',
- 'id' => $value['id'],
'type' => 'group')));
+ 'id' =>
$value['id'], 'type' => 'group')));
}
else
{
$url =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.view',
- 'id' => $value['id'])));
+ 'id' =>
$value['id'])));
}
- $actions[] = '<a
href="'.$url.'">'.lang('show').'</a>';
+ $actions[] = '<a href="' . $url . '">'
. lang('show') . '</a>';
if($value['transferred'] == false)
{
if($value['organization_id'] !=
'' && $value['organization_id'] != null)
{
$url =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.edit',
- 'id' =>
$value['id'], 'type' => 'group')));
+ 'id'
=> $value['id'], 'type' => 'group')));
}
else
{
$url =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.edit',
- 'id' =>
$value['id'])));
+ 'id'
=> $value['id'])));
}
- $actions[] = '<a
href="'.$url.'">'.lang('edit').'</a>';
+ $actions[] = '<a href="' . $url
. '">' . lang('edit') . '</a>';
}
break;
case 'new_groups':
if($value['organization_id'] != '' &&
$value['organization_id'] != null)
{
$url =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.view',
- 'id' => $value['id'],
'type' => 'group')));
+ 'id' =>
$value['id'], 'type' => 'group')));
}
else
{
$url =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.view',
- 'id' => $value['id'])));
+ 'id' =>
$value['id'])));
}
- $actions[] = '<a
href="'.$url.'">'.lang('show').'</a>';
+ $actions[] = '<a href="' . $url . '">'
. lang('show') . '</a>';
if($value['transferred'] == false)
{
if($value['organization_id'] !=
'' && $value['organization_id'] != null)
{
$url =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.edit',
- 'id' =>
$value['id'], 'type' => 'group')));
+ 'id'
=> $value['id'], 'type' => 'group')));
}
else
{
$url =
html_entity_decode(self::link(array('menuaction' =>
'activitycalendar.uiorganization.edit',
- 'id' =>
$value['id'])));
+ 'id'
=> $value['id'])));
}
- $actions[] = '<a
href="'.$url.'">'.lang('edit').'</a>';
+ $actions[] = '<a href="' . $url
. '">' . lang('edit') . '</a>';
}
break;
}
-
+
return $value['operations'] = implode(' | ', $actions);
}
- }
\ No newline at end of file
+ }
\ No newline at end of file
Modified: branches/dev-syncromind/activitycalendar/inc/model/class.group.inc.php
===================================================================
--- branches/dev-syncromind/activitycalendar/inc/model/class.group.inc.php
2015-12-09 19:38:08 UTC (rev 14552)
+++ branches/dev-syncromind/activitycalendar/inc/model/class.group.inc.php
2015-12-09 19:44:21 UTC (rev 14553)
@@ -62,7 +62,9 @@
}
public function get_description()
- { return $this->description;}
+ {
+ return $this->description;
+ }
public function set_organization_id($organization_id)
{
@@ -90,7 +92,9 @@
}
public function get_shortname()
- { return $this->shortname;}
+ {
+ return $this->shortname;
+ }
public function set_transferred($transferred)
{
Modified:
branches/dev-syncromind/activitycalendar/inc/model/class.organization.inc.php
===================================================================
---
branches/dev-syncromind/activitycalendar/inc/model/class.organization.inc.php
2015-12-09 19:38:08 UTC (rev 14552)
+++
branches/dev-syncromind/activitycalendar/inc/model/class.organization.inc.php
2015-12-09 19:44:21 UTC (rev 14553)
@@ -59,7 +59,9 @@
}
public function get_homepage()
- { return $this->homepage;}
+ {
+ return $this->homepage;
+ }
public function set_change_type($change_type)
{
Modified:
branches/dev-syncromind/activitycalendar/js/activitycalendar/activities.edit.js
===================================================================
---
branches/dev-syncromind/activitycalendar/js/activitycalendar/activities.edit.js
2015-12-09 19:38:08 UTC (rev 14552)
+++
branches/dev-syncromind/activitycalendar/js/activitycalendar/activities.edit.js
2015-12-09 19:44:21 UTC (rev 14553)
@@ -1,34 +1,34 @@
function get_available_groups()
{
- var selectBox = $( "select[id='group_id']" );
-
+ var selectBox = $("select[id='group_id']");
+
if (selectBox.length == 0)
{
return;
}
-
+
var org_id = document.getElementById('organization_id').value;
var group_id = document.getElementById('group_selected_id').value;
- var div_group_id = document.getElementById('div_group_id');
-
- if(group_id)
+ var div_group_id = document.getElementById('div_group_id');
+
+ if (group_id)
{
- var oArgs =
{menuaction:'activitycalendar.uiactivities.get_organization_groups',
orgid:org_id, groupid:group_id};
+ var oArgs = {menuaction:
'activitycalendar.uiactivities.get_organization_groups', orgid: org_id,
groupid: group_id};
}
else
{
- var oArgs =
{menuaction:'activitycalendar.uiactivities.get_organization_groups',
orgid:org_id};
+ var oArgs = {menuaction:
'activitycalendar.uiactivities.get_organization_groups', orgid: org_id};
}
var requestUrl = phpGWLink('index.php', oArgs, true);
-
- JqueryPortico.execute_ajax(requestUrl, function(result){
+ JqueryPortico.execute_ajax(requestUrl, function (result) {
+
div_group_id.innerHTML = "<select name=\"group_id\"
id=\"group_id\">" + JSON.parse(result) + "</select>";
}, '', "POST");
}
-
+
function check_internal()
{
if (document.getElementById('internal_arena_id').value !== '')
@@ -56,8 +56,8 @@
document.getElementById('internal_arena_id').disabled = "";
}
}
-
-$(document).ready(function()
+
+$(document).ready(function ()
{
get_available_groups();
});
\ No newline at end of file
Modified:
branches/dev-syncromind/activitycalendar/js/activitycalendar/activities.index.js
===================================================================
---
branches/dev-syncromind/activitycalendar/js/activitycalendar/activities.index.js
2015-12-09 19:38:08 UTC (rev 14552)
+++
branches/dev-syncromind/activitycalendar/js/activitycalendar/activities.index.js
2015-12-09 19:44:21 UTC (rev 14553)
@@ -1,33 +1,33 @@
function sendMail(oArgs, parameters)
{
- var oTT = TableTools.fnGetInstance( 'datatable-container' );
+ var oTT = TableTools.fnGetInstance('datatable-container');
var selected = oTT.fnGetSelectedData();
var nTable = '';
- if (selected.length == 0){
+ if (selected.length == 0) {
alert('None selected');
return false;
}
var n = 0;
- for ( var n = 0; n < selected.length; ++n )
+ for (var n = 0; n < selected.length; ++n)
{
var data = {};
-
- $.each(parameters.parameter, function( i, val )
+
+ $.each(parameters.parameter, function (i, val)
{
data[val.name] = selected[n][val.source];
- });
-
+ });
+
var requestUrl = phpGWLink('index.php', oArgs);
- JqueryPortico.execute_ajax(requestUrl, function(result){
+ JqueryPortico.execute_ajax(requestUrl, function (result) {
JqueryPortico.show_message(nTable, result);
- }, data, 'POST', 'JSON');
+ }, data, 'POST', 'JSON');
}
-
+
oTable.fnDraw();
}
Modified:
branches/dev-syncromind/activitycalendar/js/activitycalendar/dashboard.index.js
===================================================================
---
branches/dev-syncromind/activitycalendar/js/activitycalendar/dashboard.index.js
2015-12-09 19:38:08 UTC (rev 14552)
+++
branches/dev-syncromind/activitycalendar/js/activitycalendar/dashboard.index.js
2015-12-09 19:44:21 UTC (rev 14553)
@@ -1,34 +1,34 @@
function sendMail(oArgs, parameters)
{
- var oTT = TableTools.fnGetInstance( 'datatable-container_1' );
+ var oTT = TableTools.fnGetInstance('datatable-container_1');
var selected = oTT.fnGetSelectedData();
var nTable = 1;
- if (selected.length == 0){
+ if (selected.length == 0) {
alert('None selected');
return false;
}
var n = 0;
- for ( var n = 0; n < selected.length; ++n )
+ for (var n = 0; n < selected.length; ++n)
{
var data = {};
-
- $.each(parameters.parameter, function( i, val )
+
+ $.each(parameters.parameter, function (i, val)
{
data[val.name] = selected[n][val.source];
- });
-
+ });
+
var requestUrl = phpGWLink('index.php', oArgs);
- JqueryPortico.execute_ajax(requestUrl, function(result){
+ JqueryPortico.execute_ajax(requestUrl, function (result) {
JqueryPortico.show_message(nTable, result);
- }, data, 'POST', 'JSON');
+ }, data, 'POST', 'JSON');
}
-
+
oTable1.fnDraw();
}
@@ -38,31 +38,31 @@
oTable1.fnDraw();
}
-$(document).ready(function()
+$(document).ready(function ()
{
var previous_date_change;
$("#date_change").on('keyup change', function ()
{
- if ( $.trim($(this).val()) != $.trim(previous_date_change) )
+ if ($.trim($(this).val()) != $.trim(previous_date_change))
{
filterDataActivities('date_change', $(this).val());
previous_date_change = $(this).val();
}
});
- $('#activity_state').change( function()
+ $('#activity_state').change(function ()
{
filterDataActivities('activity_state', $(this).val());
});
- $('#activity_district').change( function()
+ $('#activity_district').change(function ()
{
filterDataActivities('activity_district', $(this).val());
});
-
- $('#activity_category').change( function()
+
+ $('#activity_category').change(function ()
{
filterDataActivities('activity_category', $(this).val());
});
-
+
});
\ No newline at end of file
Modified: branches/dev-syncromind/activitycalendar/templates/base/activity.xsl
===================================================================
--- branches/dev-syncromind/activitycalendar/templates/base/activity.xsl
2015-12-09 19:38:08 UTC (rev 14552)
+++ branches/dev-syncromind/activitycalendar/templates/base/activity.xsl
2015-12-09 19:44:21 UTC (rev 14553)
@@ -1,4 +1,5 @@
- <!-- $Id: activity.xsl 12604 2015-01-15 17:06:11Z nelson224 $ -->
+
+<!-- $Id: activity.xsl 12604 2015-01-15 17:06:11Z nelson224 $ -->
<xsl:template match="data">
<xsl:choose>
<xsl:when test="edit">
@@ -94,7 +95,9 @@
</input>
</div>
</div>
- <h2><xsl:value-of
select="php:function('lang', 'where_when')"/></h2>
+ <h2>
+ <xsl:value-of
select="php:function('lang', 'where_when')"/>
+ </h2>
<div class="pure-control-group">
<label>
<xsl:value-of
select="php:function('lang', 'arena')"/>
@@ -149,7 +152,9 @@
<xsl:apply-templates
select="list_office_options/options"/>
</select>
</div>
- <h2><xsl:value-of
select="php:function('lang', 'who')"/></h2>
+ <h2>
+ <xsl:value-of
select="php:function('lang', 'who')"/>
+ </h2>
<div class="pure-control-group">
<label>
<xsl:value-of
select="php:function('lang', 'organization')"/>
@@ -168,7 +173,11 @@
</div>
<xsl:if
test="organization_selected = 1">
<div>
-
<xsl:value-of select="php:function('lang', 'edit_contact_info')"/><xsl:text>:
</xsl:text><a href="{organization_url}"><xsl:value-of
select="php:function('lang', 'edit_contact_info_org')"/> </a>
+
<xsl:value-of select="php:function('lang', 'edit_contact_info')"/>
+
<xsl:text>: </xsl:text>
+ <a
href="{organization_url}">
+
<xsl:value-of select="php:function('lang', 'edit_contact_info_org')"/>
+ </a>
</div>
</xsl:if>
</div>
@@ -190,14 +199,20 @@
</div>
<xsl:if
test="group_selected = 1">
<div>
-
<xsl:value-of select="php:function('lang', 'edit_contact_info')"/><xsl:text>:
</xsl:text><a href="{group_url}"><xsl:value-of select="php:function('lang',
'edit_contact_info_group')"/> </a>
+
<xsl:value-of select="php:function('lang', 'edit_contact_info')"/>
+
<xsl:text>: </xsl:text>
+
<a href="{group_url}">
+
<xsl:value-of select="php:function('lang', 'edit_contact_info_group')"/>
+
</a>
</div>
</xsl:if>
</xsl:if>
<input type="hidden"
name="group_selected_id" id="group_selected_id" value="{group_selected_id}" />
</div>
</div>
- <h2><xsl:value-of
select="php:function('lang', 'contact_info')"/></h2>
+ <h2>
+ <xsl:value-of
select="php:function('lang', 'contact_info')"/>
+ </h2>
<div class="pure-control-group">
<label>
<xsl:value-of
select="php:function('lang', 'contact_person_1')"/>
@@ -240,14 +255,14 @@
</div>
<script type="text/javascript">
$("[name='target[]']:eq(0)")
- .valAttr('','validate_checkbox_group')
- .valAttr('qty','min1')
- .valAttr('error-msg','Målgruppe må fylles ut!');
+ .valAttr('','validate_checkbox_group')
+ .valAttr('qty','min1')
+ .valAttr('error-msg','Målgruppe må fylles ut!');
$("[name='district[]']:eq(0)")
- .valAttr('','validate_checkbox_group')
- .valAttr('qty','min1')
- .valAttr('error-msg','Bydel må fylles ut!');
+ .valAttr('','validate_checkbox_group')
+ .valAttr('qty','min1')
+ .valAttr('error-msg','Bydel må fylles ut!');
</script>
</xsl:template>
@@ -320,7 +335,9 @@
</input>
</div>
</div>
- <h2><xsl:value-of
select="php:function('lang', 'where_when')"/></h2>
+ <h2>
+ <xsl:value-of
select="php:function('lang', 'where_when')"/>
+ </h2>
<div class="pure-control-group">
<label>
<xsl:value-of
select="php:function('lang', 'arena')"/>
@@ -350,7 +367,9 @@
</label>
<xsl:value-of
select="office_name"/>
</div>
- <h2><xsl:value-of
select="php:function('lang', 'who')"/></h2>
+ <h2>
+ <xsl:value-of
select="php:function('lang', 'who')"/>
+ </h2>
<div class="pure-control-group">
<label>
<xsl:value-of
select="php:function('lang', 'organization')"/>
@@ -367,7 +386,9 @@
<xsl:value-of
select="group_name"/>
</div>
</div>
- <h2><xsl:value-of
select="php:function('lang', 'contact_info')"/></h2>
+ <h2>
+ <xsl:value-of
select="php:function('lang', 'contact_info')"/>
+ </h2>
<div class="pure-control-group">
<label>
<xsl:value-of
select="php:function('lang', 'contact_person_1')"/>
Modified: branches/dev-syncromind/activitycalendar/templates/base/arena.xsl
===================================================================
--- branches/dev-syncromind/activitycalendar/templates/base/arena.xsl
2015-12-09 19:38:08 UTC (rev 14552)
+++ branches/dev-syncromind/activitycalendar/templates/base/arena.xsl
2015-12-09 19:44:21 UTC (rev 14553)
@@ -1,4 +1,5 @@
- <!-- $Id: arena.xsl 12604 2015-01-15 17:06:11Z nelson224 $ -->
+
+<!-- $Id: arena.xsl 12604 2015-01-15 17:06:11Z nelson224 $ -->
<xsl:template match="data">
<xsl:choose>
<xsl:when test="edit">
Modified: branches/dev-syncromind/activitycalendar/templates/base/dashboard.xsl
===================================================================
--- branches/dev-syncromind/activitycalendar/templates/base/dashboard.xsl
2015-12-09 19:38:08 UTC (rev 14552)
+++ branches/dev-syncromind/activitycalendar/templates/base/dashboard.xsl
2015-12-09 19:44:21 UTC (rev 14553)
@@ -1,4 +1,5 @@
- <!-- $Id: dashboard.xsl 12604 2015-11-23 17:06:11Z nelson224 $ -->
+
+<!-- $Id: dashboard.xsl 12604 2015-11-23 17:06:11Z nelson224 $ -->
<xsl:template match="data">
<xsl:choose>
<xsl:when test="edit">
@@ -13,7 +14,9 @@
<div>
<form id="form" name="form" method="post" action=""
class="pure-form pure-form-aligned">
<div id="tab-content">
- <h3><xsl:value-of select="php:function('lang',
'organization')"/></h3>
+ <h3>
+ <xsl:value-of
select="php:function('lang', 'organization')"/>
+ </h3>
<div>
<div>
<xsl:for-each
select="datatable_def">
@@ -30,25 +33,35 @@
</xsl:for-each>
</div>
</div>
- <h3><xsl:value-of select="php:function('lang',
'activities')"/></h3>
+ <h3>
+ <xsl:value-of
select="php:function('lang', 'activities')"/>
+ </h3>
<div>
<div class="pure-custom">
<div class="pure-control-group">
- <label><xsl:value-of
select="php:function('lang', 'activity_state')"/></label>
+ <label>
+ <xsl:value-of
select="php:function('lang', 'activity_state')"/>
+ </label>
<select
id="activity_state" name="activity_state">
<xsl:apply-templates select="list_activity_state_options/options"/>
</select>
- <label><xsl:value-of
select="php:function('lang', 'office')"/></label>
+ <label>
+ <xsl:value-of
select="php:function('lang', 'office')"/>
+ </label>
<select
id="activity_district" name="activity_district">
<xsl:apply-templates select="list_activity_district_options/options"/>
</select>
</div>
<div class="pure-control-group">
- <label><xsl:value-of
select="php:function('lang', 'Category')"/></label>
+ <label>
+ <xsl:value-of
select="php:function('lang', 'Category')"/>
+ </label>
<select
id="activity_category" name="activity_category">
<xsl:apply-templates select="list_activity_category_options/options"/>
</select>
- <label><xsl:value-of
select="php:function('lang', 'date')"/></label>
+ <label>
+ <xsl:value-of
select="php:function('lang', 'date')"/>
+ </label>
<input type="text"
id="date_change" name="date_change" value=""></input>
</div>
</div>
Modified:
branches/dev-syncromind/activitycalendar/templates/base/organization.xsl
===================================================================
--- branches/dev-syncromind/activitycalendar/templates/base/organization.xsl
2015-12-09 19:38:08 UTC (rev 14552)
+++ branches/dev-syncromind/activitycalendar/templates/base/organization.xsl
2015-12-09 19:44:21 UTC (rev 14553)
@@ -1,4 +1,5 @@
- <!-- $Id: organization.xsl 12604 2015-01-15 17:06:11Z nelson224 $ -->
+
+<!-- $Id: organization.xsl 12604 2015-01-15 17:06:11Z nelson224 $ -->
<xsl:template match="data">
<xsl:choose>
<xsl:when test="edit">
@@ -76,17 +77,22 @@
<label>
<xsl:value-of
select="php:function('lang', 'Postnummer/Sted')"/>
</label>
- <input type="text"
id="zip_code" name="zip_code" value="{zip_code}" size="6"/> <input type="text"
id="city" name="city" value="{city}"/>
+ <input type="text"
id="zip_code" name="zip_code" value="{zip_code}" size="6"/>
+ <input type="text" id="city"
name="city" value="{city}"/>
</div>
<div class="pure-control-group">
<label>
<xsl:value-of
select="php:function('lang', 'Beskrivelse')"/>
</label>
- <textarea rows="10" cols="100"
id="org_description" name="org_description"><xsl:value-of
select="description"/></textarea>
+ <textarea rows="10" cols="100"
id="org_description" name="org_description">
+ <xsl:value-of
select="description"/>
+ </textarea>
</div>
<div class="pure-control-group">
- <label><xsl:value-of
select="php:function('lang', 'Kontaktperson 1')"/></label>
+ <label>
+ <xsl:value-of
select="php:function('lang', 'Kontaktperson 1')"/>
+ </label>
</div>
<input type="hidden" id="contact1_id"
name="contact1_id" value="{contact1_id}"/>
<div class="pure-control-group">
@@ -110,7 +116,9 @@
<xsl:if test="contact2_id != ''">
<div class="pure-control-group">
- <label><xsl:value-of
select="php:function('lang', 'Kontaktperson 2')"/></label>
+ <label>
+ <xsl:value-of
select="php:function('lang', 'Kontaktperson 2')"/>
+ </label>
</div>
<input type="hidden"
id="contact2_id" name="contact2_id" value="{contact2_id}"/>
<div class="pure-control-group">
@@ -209,7 +217,8 @@
<label>
<xsl:value-of
select="php:function('lang', 'Postnummer/Sted')"/>
</label>
- <xsl:value-of
select="zip_code"/> <xsl:value-of select="city"/>
+ <xsl:value-of
select="zip_code"/>
+ <xsl:value-of select="city"/>
</div>
<div class="pure-control-group">
<label>
@@ -219,7 +228,9 @@
</div>
<div class="pure-control-group">
- <label><xsl:value-of
select="php:function('lang', 'Kontaktperson 1')"/></label>
+ <label>
+ <xsl:value-of
select="php:function('lang', 'Kontaktperson 1')"/>
+ </label>
</div>
<input type="hidden" id="contact1_id"
name="contact1_id" value="{contact1_id}"/>
<div class="pure-control-group">
@@ -243,7 +254,9 @@
<xsl:if test="contact2_id != ''">
<div class="pure-control-group">
- <label><xsl:value-of
select="php:function('lang', 'Kontaktperson 2')"/></label>
+ <label>
+ <xsl:value-of
select="php:function('lang', 'Kontaktperson 2')"/>
+ </label>
</div>
<input type="hidden"
id="contact2_id" name="contact2_id" value="{contact2_id}"/>
<div class="pure-control-group">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14553] activitycalendar: formatting code,
Sigurd Nes <=