fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8801]


From: Erik Holm-Larsen
Subject: [Fmsystem-commits] [8801]
Date: Wed, 08 Feb 2012 06:34:42 +0000

Revision: 8801
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8801
Author:   erikhl
Date:     2012-02-08 06:34:40 +0000 (Wed, 08 Feb 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/controller/inc/class.menu.inc.php
    trunk/controller/inc/class.uicalendar.inc.php
    trunk/controller/templates/base/calendar/view_calendar_year.xsl
    trunk/controller/templates/base/css/base.css

Modified: trunk/controller/inc/class.menu.inc.php
===================================================================
--- trunk/controller/inc/class.menu.inc.php     2012-02-08 06:06:45 UTC (rev 
8800)
+++ trunk/controller/inc/class.menu.inc.php     2012-02-08 06:34:40 UTC (rev 
8801)
@@ -60,7 +60,7 @@
                                                'children' => array(
                                                                                
        'location_for_check_list' => array
                                                                                
        (
-                                                                               
                'text'  => lang('Location'),
+                                                                               
                'text'  => lang('location_connections'),
                                                                                
                'url'   => $GLOBALS['phpgw']->link('/index.php', 
array('menuaction'=> 'controller.uicontrol_location.index') ),
                                                                                
                'image' => array('property', 'location_1')
                                                                                
        ),
@@ -72,12 +72,12 @@
                                                                                
        )
                                                                                
)
                                        ),
-                                       'location_for_check_list' => array
+/*                                     'location_for_check_list' => array
                                        (
                                                'text'  => 
lang('location_connections'),
                                                'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction'=> 
'controller.uicontrol_location.index') ),
                                                'image' => array('property', 
'location_1')
-                                       ),
+                                       ),*/
                                        'control_item' => array
                                        (
                                                'text'  => lang('Control_item'),

Modified: trunk/controller/inc/class.uicalendar.inc.php
===================================================================
--- trunk/controller/inc/class.uicalendar.inc.php       2012-02-08 06:06:45 UTC 
(rev 8800)
+++ trunk/controller/inc/class.uicalendar.inc.php       2012-02-08 06:34:40 UTC 
(rev 8801)
@@ -268,12 +268,12 @@
                        
                        foreach($controls_calendar_array as &$inst)
                        {       
-                               $control = &$inst['control'];
+                               $curr_control = &$inst['control'];
                                //var_dump($control['location_code']);
                                foreach($locations_for_control_array as $loc1)
                                {
-                                       if($control["location_code"] == 
$loc1["location_code"])
-                                               $control["location_name"] = 
$loc1["loc1_name"];
+                                       if($curr_control["location_code"] == 
$loc1["location_code"])
+                                               $curr_control["location_name"] 
= $loc1["loc1_name"];
                                }
                        }
                        
@@ -291,7 +291,8 @@
                                'date_format'                     => 
$date_format,
                                'period'                                  => 
$year,
                                'year'                                    => 
$year,
-                               'show_location'                   => 'yes'
+                               'show_location'                   => 'yes',
+                               'control_name'                    => 
$control->get_title()
                        );
                        
                        
self::render_template_xsl('calendar/view_calendar_year', $data);

Modified: trunk/controller/templates/base/calendar/view_calendar_year.xsl
===================================================================
--- trunk/controller/templates/base/calendar/view_calendar_year.xsl     
2012-02-08 06:06:45 UTC (rev 8800)
+++ trunk/controller/templates/base/calendar/view_calendar_year.xsl     
2012-02-08 06:34:40 UTC (rev 8801)
@@ -7,37 +7,49 @@
 <div id="main_content">
                
                <div style="float:left;">
-                       <h1><xsl:value-of 
select="location_array/loc1_name"/></h1>
+                       <xsl:choose>
+                               <xsl:when test="show_location">
+                                       <h1><xsl:value-of 
select="control_name"/></h1>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <h1><xsl:value-of 
select="location_array/loc1_name"/></h1>
+                               </xsl:otherwise>
+                       </xsl:choose>
                        <h3 style="margin:0;font-size:19px;">Kalenderoversikt 
for <xsl:value-of select="period"/></h3>
                </div>
 
                <div style="float:right;width:300px;margin-top:40px;">
-                       <form action="#">
-                               <input type="hidden" name="period_type" 
value="view_year" />
-                               <input type="hidden" name="year">
-                             <xsl:attribute name="value">
-                               <xsl:value-of select="year"/>
-                             </xsl:attribute>
-                               </input>
-
-                               <select id="choose_my_location">
-                                       <xsl:for-each select="my_locations">
-                                               <xsl:variable 
name="loc_code"><xsl:value-of select="location_code"/></xsl:variable>
-                                               <xsl:choose>
-                                                       <xsl:when 
test="location_code = $view_location_code">
-                                                               <option 
value="{$loc_code}" selected="selected">
-                                                                       
<xsl:value-of disable-output-escaping="yes" select="loc1_name"/>
-                                                               </option>
-                                                       </xsl:when>
-                                                       <xsl:otherwise>
-                                                               <option 
value="{$loc_code}">
-                                                                       
<xsl:value-of disable-output-escaping="yes" select="loc1_name"/>
-                                                               </option>
-                                                       </xsl:otherwise>
-                                               </xsl:choose>
-                                       </xsl:for-each>
-                               </select>                                       
-                       </form>
+                       <xsl:choose>
+                               <xsl:when test="show_location">&nbsp;</xsl:when>
+                               <xsl:otherwise>
+                                       <form action="#">
+                                               <input type="hidden" 
name="period_type" value="view_year" />
+                                               <input type="hidden" 
name="year">
+                                             <xsl:attribute name="value">
+                                               <xsl:value-of select="year"/>
+                                             </xsl:attribute>
+                                               </input>
+               
+                                               <select id="choose_my_location">
+                                                       <xsl:for-each 
select="my_locations">
+                                                               <xsl:variable 
name="loc_code"><xsl:value-of select="location_code"/></xsl:variable>
+                                                               <xsl:choose>
+                                                                       
<xsl:when test="location_code = $view_location_code">
+                                                                               
<option value="{$loc_code}" selected="selected">
+                                                                               
        <xsl:value-of disable-output-escaping="yes" select="loc1_name"/>
+                                                                               
</option>
+                                                                       
</xsl:when>
+                                                                       
<xsl:otherwise>
+                                                                               
<option value="{$loc_code}">
+                                                                               
        <xsl:value-of disable-output-escaping="yes" select="loc1_name"/>
+                                                                               
</option>
+                                                                       
</xsl:otherwise>
+                                                               </xsl:choose>
+                                                       </xsl:for-each>
+                                               </select>                       
                
+                                       </form>
+                               </xsl:otherwise>
+                       </xsl:choose>
                                        
                        <ul id="icon_color_map">
                                <li><img height="15" 
src="controller/images/status_icon_yellow_ring.png" /><span>Kontroller satt 
opp</span></li>
@@ -50,12 +62,13 @@
                <ul class="calendar">
                                <li class="heading">
                                        <xsl:if test="show_location">
-                                       <div class="title">Lokasjon</div>
+                                       <div class="location">Lokasjon</div>
                                        </xsl:if>
                                        <div class="title">Tittel</div>
+                                       <div class="assigned">Tildelt</div>
                                        <div class="date">Start dato</div>
                                        <div class="date">Slutt dato</div>
-                                       <div 
class="frequency">Frekvenstype</div>
+                                       <div class="frequency">Frekvens</div>
                                        <div class="months">
                                        <xsl:for-each select="heading_array">
                                                <div>
@@ -83,13 +96,16 @@
                                        <xsl:variable 
name="control_id"><xsl:value-of select="control/id"/></xsl:variable>
                                        <li>
                                                <xsl:if test="//show_location">
-                                                       <div class="title">
+                                                       <div class="location">
                                                                <xsl:value-of 
select="control/location_name"/>
                                                        </div>
                                                </xsl:if>
                                                <div class="title">
                                                <xsl:value-of 
select="control/title"/>
                                                </div>
+                                               <div class="assigned">
+                                               <xsl:value-of 
select="control/responsibility_name"/>
+                                               </div>
                                                <div class="date">
                                                <xsl:value-of 
select="php:function('date', $date_format, number(control/start_date))"/>
                                                </div>

Modified: trunk/controller/templates/base/css/base.css
===================================================================
--- trunk/controller/templates/base/css/base.css        2012-02-08 06:06:45 UTC 
(rev 8800)
+++ trunk/controller/templates/base/css/base.css        2012-02-08 06:34:40 UTC 
(rev 8801)
@@ -854,6 +854,14 @@
 ul.calendar div.title {
        width: 150px;
 }
+ul.calendar div.location {
+       width: 150px;
+       text-align: left;
+}
+ul.calendar div.assigned {
+       width: 80px;
+       text-align: left;
+}
 ul.calendar div.id, ul.calendar.info div.id {
        width: 50px;
 }
@@ -864,7 +872,7 @@
        text-align: center;
 }
 ul.calendar div.frequency, ul.calendar.info div.frequency {
-       width: 120px;   
+       width: 100px;   
 }
 ul.calendar.month {
        margin-top:0;




reply via email to

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