fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [7544] added setting of active/inactive on arena


From: Erik Holm-Larsen
Subject: [Fmsystem-commits] [7544] added setting of active/inactive on arena
Date: Thu, 01 Sep 2011 06:35:55 +0000

Revision: 7544
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7544
Author:   erikhl
Date:     2011-09-01 06:35:54 +0000 (Thu, 01 Sep 2011)
Log Message:
-----------
added setting of active/inactive on arena

Modified Paths:
--------------
    trunk/activitycalendar/inc/class.soarena.inc.php
    trunk/activitycalendar/inc/class.uiarena.inc.php
    trunk/activitycalendar/setup/phpgw_no.lang
    trunk/activitycalendar/templates/base/arena.php

Modified: trunk/activitycalendar/inc/class.soarena.inc.php
===================================================================
--- trunk/activitycalendar/inc/class.soarena.inc.php    2011-08-31 18:23:56 UTC 
(rev 7543)
+++ trunk/activitycalendar/inc/class.soarena.inc.php    2011-09-01 06:35:54 UTC 
(rev 7544)
@@ -254,7 +254,8 @@
                $values = array(
                        'arena_name = '         . 
$this->marshal($arena->get_arena_name(), 'string'),
                        'address = '     . 
$this->marshal($arena->get_address(), 'string'),
-                       'internal_arena_id =  '     . 
$this->marshal($arena->get_internal_arena_id(), 'int')
+                       'internal_arena_id =  '     . 
$this->marshal($arena->get_internal_arena_id(), 'int'),
+                       'active = '     . $this->marshal(($arena->is_active() ? 
'true' : 'false'), 'bool'),
                );
                
                $result = $this->db->query('UPDATE activity_arena SET ' . 
join(',', $values) . " WHERE id=$id", __LINE__,__FILE__);

Modified: trunk/activitycalendar/inc/class.uiarena.inc.php
===================================================================
--- trunk/activitycalendar/inc/class.uiarena.inc.php    2011-08-31 18:23:56 UTC 
(rev 7543)
+++ trunk/activitycalendar/inc/class.uiarena.inc.php    2011-09-01 06:35:54 UTC 
(rev 7544)
@@ -105,6 +105,7 @@
                                
$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') . 
' ' . phpgw::get_var('address_no'));
+                               
$arena->set_active(phpgw::get_var('arena_active') == 'on' ? true : false);
                                
                                
if(activitycalendar_soarena::get_instance()->store($arena)) // ... and then try 
to store the object
                                {

Modified: trunk/activitycalendar/setup/phpgw_no.lang
===================================================================
--- trunk/activitycalendar/setup/phpgw_no.lang  2011-08-31 18:23:56 UTC (rev 
7543)
+++ trunk/activitycalendar/setup/phpgw_no.lang  2011-09-01 06:35:54 UTC (rev 
7544)
@@ -387,4 +387,6 @@
 arena_name     activitycalendar        no      Navn
 Send mail to selection activitycalendar        no      Send E-post til utvalg
 contact_person_2_address       activitycalendar        no      Adresse for 
kulturkontoret
-contact_person_2_zip   activitycalendar        no      Poststed for 
kulturkontoret
\ No newline at end of file
+contact_person_2_zip   activitycalendar        no      Poststed for 
kulturkontoret
+active_arena   activitycalendar        no      Aktiv
+inactive_arena activitycalendar        no      Inaktiv
\ No newline at end of file

Modified: trunk/activitycalendar/templates/base/arena.php
===================================================================
--- trunk/activitycalendar/templates/base/arena.php     2011-08-31 18:23:56 UTC 
(rev 7543)
+++ trunk/activitycalendar/templates/base/arena.php     2011-09-01 06:35:54 UTC 
(rev 7544)
@@ -108,6 +108,19 @@
                                        }
                                        ?>
                                </dd>
+                               <?php if($editable) {?>
+                                       <dt>
+                                               <label for="arena_active"><?php 
echo lang('active_arena') ?></label>
+                                       </dt>
+                                       <dd>
+                                               <input type="checkbox" 
name="arena_active" id="arena_active" <?php if($arena->is_active()) { echo 
"checked='checked'";} ?>/>
+                                       </dd>
+                               <?php 
+                               }else{ 
+                               ?>
+                                       <dt><label><?php 
if($arena->is_active()){?><font style="color: green;"><?php echo 
lang('active_arena');?></font><?php }else{ ?><font style="color: red;"><?php 
echo lang('inactive_arena');?></font><?php } ?></label></dt>
+                                       <dd>&nbsp;</dd>
+                               <?php }?>
                        </dl>
                        <div class="form-buttons">
                                <?php




reply via email to

[Prev in Thread] Current Thread [Next in Thread]