[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [17304] categories: update ui
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [17304] categories: update ui |
Date: |
Tue, 14 Nov 2017 04:48:15 -0500 (EST) |
Revision: 17304
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17304
Author: sigurdne
Date: 2017-11-14 04:48:14 -0500 (Tue, 14 Nov 2017)
Log Message:
-----------
categories: update ui
Modified Paths:
--------------
trunk/admin/inc/class.uicategories.inc.php
trunk/admin/setup/phpgw_no.lang
trunk/admin/templates/base/cats.xsl
trunk/helpdesk/setup/phpgw_no.lang
trunk/phpgwapi/inc/class.categories.inc.php
trunk/phpgwapi/inc/class.nextmatchs_xslt.inc.php
trunk/phpgwapi/templates/base/search_field.xsl
Modified: trunk/admin/inc/class.uicategories.inc.php
===================================================================
--- trunk/admin/inc/class.uicategories.inc.php 2017-11-13 20:49:40 UTC (rev
17303)
+++ trunk/admin/inc/class.uicategories.inc.php 2017-11-14 09:48:14 UTC (rev
17304)
@@ -264,7 +264,7 @@
'start' => $this->start,
'num_records' => count($categories),
'all_records' =>
$this->bo->cats->total_records,
- 'link_data' => $link_data,
+ 'link_data' =>
array_merge($link_data, array('query' => $this->query)),
'allow_all_rows'=> true,
'allrows' => $this->allrows
);
@@ -346,13 +346,27 @@
}
$parent = $cats[0]['parent'];
+ if($this->cat_id)
+ {
+ $function = lang('edit category');
+ }
+ else
+ {
+ $function = lang('add category');
+ }
+
if ( $appname )
{
- $GLOBALS['phpgw_info']['flags']['app_header'] =
lang($appname) . ' ' . $location?"::{$location}":'' . lang('global categories')
. ': ' . ($this->cat_id?lang('edit category'):lang('add category'));
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang($appname);
+ if($location)
+ {
+
$GLOBALS['phpgw_info']['flags']['app_header'] .= "::{$location}";
+ }
+ $GLOBALS['phpgw_info']['flags']['app_header']
.= '::' . lang('global categories') . "::$function";
}
else
{
- $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('global categories') . ': ' . (isset($function)?$function:'');
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('global categories') . "::$function";
}
$GLOBALS['phpgw']->xslttpl->add_file('cats');
Modified: trunk/admin/setup/phpgw_no.lang
===================================================================
--- trunk/admin/setup/phpgw_no.lang 2017-11-13 20:49:40 UTC (rev 17303)
+++ trunk/admin/setup/phpgw_no.lang 2017-11-14 09:48:14 UTC (rev 17304)
@@ -96,3 +96,6 @@
users admin no Brukere
view the config admin no Vis konfigurasjon
warn admin no Varsel
+add category admin no Legg til kategori
+edit category admin no Endre kategori
+parent category admin no Foreldrekategori
\ No newline at end of file
Modified: trunk/admin/templates/base/cats.xsl
===================================================================
--- trunk/admin/templates/base/cats.xsl 2017-11-13 20:49:40 UTC (rev 17303)
+++ trunk/admin/templates/base/cats.xsl 2017-11-14 09:48:14 UTC (rev 17304)
@@ -1,68 +1,66 @@
<!-- $Id$ -->
<xsl:template name="cats">
- <xsl:choose>
- <xsl:when test="cat_list">
- <xsl:apply-templates select="cat_list"/>
- </xsl:when>
- <xsl:when test="cat_edit">
- <xsl:apply-templates select="cat_edit"/>
- </xsl:when>
- </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="cat_list">
+ <xsl:apply-templates select="cat_list"/>
+ </xsl:when>
+ <xsl:when test="cat_edit">
+ <xsl:apply-templates select="cat_edit"/>
+ </xsl:when>
+ </xsl:choose>
</xsl:template>
<!-- BEGIN cat_list -->
<xsl:template match="cat_list">
- <center>
- <table border="0" cellspacing="2" cellpadding="2"
class="pure-table pure-table-bordered">
- <tr>
- <td colspan="6" width="100%">
- <xsl:call-template
name="nextmatchs"/>
- </td>
- </tr>
- <tr>
- <td colspan="6" width="100%" align="right">
- <xsl:call-template
name="search_field"/>
- </td>
- </tr>
- <xsl:apply-templates
select="cat_header"/>
- <xsl:apply-templates select="cat_data"/>
- </table>
- <xsl:apply-templates select="cat_add"/>
- </center>
+ <table border="0" cellspacing="2" cellpadding="2" class="pure-table
pure-table-bordered">
+ <tr>
+ <td colspan="6" width="100%">
+ <xsl:call-template name="nextmatchs"/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="6" width="100%" align="right">
+ <xsl:call-template name="search_field"/>
+ </td>
+ </tr>
+ <xsl:apply-templates select="cat_header"/>
+ <xsl:apply-templates select="cat_data"/>
+ </table>
+ <xsl:apply-templates select="cat_add"/>
</xsl:template>
<!-- BEGIN cat_header -->
<xsl:template match="cat_header">
- <xsl:variable name="sort_name" select="sort_name"/>
- <xsl:variable name="sort_descr" select="sort_descr"/>
- <xsl:variable name="lang_sort_statustext"
select="lang_sort_statustext"/>
- <tr class="th">
- <td width="20%">
+ <xsl:variable name="sort_name" select="sort_name"/>
+ <xsl:variable name="sort_descr" select="sort_descr"/>
+ <xsl:variable name="lang_sort_statustext"
select="lang_sort_statustext"/>
+ <tr class="th">
+ <th width="20%">
<a href="{$sort_name}" title="{$lang_sort_statustext}"
class="th_text">
<xsl:value-of select="lang_name"/>
</a>
- </td>
- <td width="32%">
+ </th>
+ <th width="32%">
<a href="{$sort_descr}" title="{$lang_sort_statustext}"
class="th_text">
<xsl:value-of select="lang_descr"/>
</a>
- </td>
- <td width="8%" align="center">
+ </th>
+ <th width="8%" align="center">
<xsl:value-of select="lang_status"/>
- </td>
- <td width="8%" align="center">
+ </th>
+ <th width="8%" align="center">
<xsl:value-of select="lang_add_sub"/>
- </td>
- <td width="8%" align="center">
+ </th>
+ <th width="8%" align="center">
<xsl:value-of select="lang_edit"/>
- </td>
- <td width="8%" align="center">
+ </th>
+ <th width="8%" align="center">
<xsl:value-of select="lang_delete"/>
- </td>
- </tr>
+ </th>
+ </tr>
</xsl:template>
<!-- BEGIN cat_data -->
@@ -77,27 +75,27 @@
<xsl:variable name="lang_delete_statustext">
<xsl:value-of select="lang_delete_statustext"/>
</xsl:variable>
- <tr>
- <xsl:attribute name="class">
- <xsl:choose>
- <xsl:when test="@class">
- <xsl:value-of select="@class"/>
- </xsl:when>
- <xsl:when test="position() mod 2 = 0">
- <xsl:text>row_off</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>row_on</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="status != 1">
- <xsl:text> inactive</xsl:text>
- </xsl:when>
- </xsl:choose>
- </xsl:attribute>
+ <tr>
+ <xsl:attribute name="class">
<xsl:choose>
- <xsl:when test="main = 'yes'">
+ <xsl:when test="@class">
+ <xsl:value-of select="@class"/>
+ </xsl:when>
+ <xsl:when test="position() mod 2 = 0">
+ <xsl:text>row_off</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>row_on</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="status != 1">
+ <xsl:text> inactive</xsl:text>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="main = 'yes'">
<td class="alarm">
<b>
<xsl:value-of
disable-output-escaping="yes" select="name"/>
@@ -108,8 +106,8 @@
<xsl:value-of select="descr"/>
</b>
</td>
- </xsl:when>
- <xsl:otherwise>
+ </xsl:when>
+ <xsl:otherwise>
<td>
<xsl:value-of
disable-output-escaping="yes" select="name"/>
</td>
@@ -116,30 +114,30 @@
<td>
<xsl:value-of select="descr"/>
</td>
- </xsl:otherwise>
- </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
<td align="center">
<xsl:value-of select="status_text"/>
</td>
- <td align="center">
- <xsl:variable name="add_sub_url"
select="add_sub_url"/>
+ <td align="center">
+ <xsl:variable name="add_sub_url" select="add_sub_url"/>
<a href="{add_sub_url}"
title="{$lang_add_sub_statustext}" class="th_text">
<xsl:value-of select="lang_add_sub"/>
</a>
- </td>
- <td align="center">
- <xsl:variable name="edit_url"
select="edit_url"/>
+ </td>
+ <td align="center">
+ <xsl:variable name="edit_url" select="edit_url"/>
<a href="{edit_url}" title="{$lang_edit_statustext}"
class="th_text">
<xsl:value-of select="lang_edit"/>
</a>
- </td>
- <td align="center">
- <xsl:variable name="delete_url"
select="delete_url"/>
+ </td>
+ <td align="center">
+ <xsl:variable name="delete_url" select="delete_url"/>
<a href="{delete_url}"
title="{$lang_delete_statustext}" class="th_text">
<xsl:value-of select="lang_delete"/>
</a>
- </td>
- </tr>
+ </td>
+ </tr>
</xsl:template>
<!-- BEGIN cat_add -->
@@ -148,32 +146,32 @@
<xsl:variable name="action_url">
<xsl:value-of select="action_url"/>
</xsl:variable>
- <form method="post" action="{$action_url}">
- <table>
- <tr height="50" valign="bottom">
- <td colspan="2">
+ <form method="post" action="{$action_url}">
+ <table>
+ <tr height="50" valign="bottom">
+ <td colspan="2">
<xsl:variable name="lang_add">
<xsl:value-of
select="lang_add"/>
</xsl:variable>
- <input type="submit" name="add"
value="{$lang_add}">
- <xsl:attribute
name="title">
- <xsl:value-of
select="lang_add_statustext"/>
- </xsl:attribute>
- </input>
- </td>
- <td colspan="3" align="right">
+ <input type="submit" name="add"
value="{$lang_add}">
+ <xsl:attribute name="title">
+ <xsl:value-of
select="lang_add_statustext"/>
+ </xsl:attribute>
+ </input>
+ </td>
+ <td colspan="3" align="right">
<xsl:variable name="lang_done">
<xsl:value-of
select="lang_done"/>
</xsl:variable>
- <input type="submit"
name="done" value="{$lang_done}">
- <xsl:attribute
name="title">
-
<xsl:value-of select="lang_done_statustext"/>
- </xsl:attribute>
- </input>
- </td>
- </tr>
- </table>
- </form>
+ <input type="submit" name="done"
value="{$lang_done}">
+ <xsl:attribute name="title">
+ <xsl:value-of
select="lang_done_statustext"/>
+ </xsl:attribute>
+ </input>
+ </td>
+ </tr>
+ </table>
+ </form>
</xsl:template>
<!-- END cat_list -->
@@ -181,8 +179,8 @@
<!-- BEGIN cat_edit -->
<xsl:template match="cat_edit" xmlns:php="http://php.net/xsl">
- <xsl:variable name="edit_url" select="edit_url"/>
- <form method="post" action="{$edit_url}">
+ <xsl:variable name="edit_url" select="edit_url"/>
+ <form method="post" action="{$edit_url}">
<table cellpadding="2" cellspacing="2" align="center">
<tr>
<td colspan="3" align="center">
@@ -261,7 +259,7 @@
</input>
</td>
<td>
- <xsl:variable name="lang_apply"
select="lang_apply"/>
+ <xsl:variable name="lang_apply"
select="lang_apply"/>
<input type="submit"
name="values[apply]" value="{$lang_apply}">
<xsl:attribute name="title">
<xsl:value-of
select="lang_apply_statustext"/>
@@ -280,15 +278,15 @@
</td>
</tr>
</table>
- </form>
+ </form>
</xsl:template>
<xsl:template match="options">
- <option value="{id}">
- <xsl:if test="selected != 0">
- <xsl:attribute name="selected"
value="selected"/>
- </xsl:if>
- <xsl:value-of disable-output-escaping="yes"
select="name"/>
- </option>
+ <option value="{id}">
+ <xsl:if test="selected != 0">
+ <xsl:attribute name="selected" value="selected"/>
+ </xsl:if>
+ <xsl:value-of disable-output-escaping="yes" select="name"/>
+ </option>
</xsl:template>
Modified: trunk/helpdesk/setup/phpgw_no.lang
===================================================================
--- trunk/helpdesk/setup/phpgw_no.lang 2017-11-13 20:49:40 UTC (rev 17303)
+++ trunk/helpdesk/setup/phpgw_no.lang 2017-11-14 09:48:14 UTC (rev 17304)
@@ -220,4 +220,4 @@
ticket is forwarded helpdesk no Melding er videresendt
email_create_account_title helpdesk no LRS systemtilgang
email_create_account_message helpdesk no Systemmelding fra LRS
til %1 %2:<br/>Det er opprettet en tilgang for deg i LRS<br/><br/>Du får
tilgang til systemet via kommunens intranett.<br/>Under verktøy i høyre
kolonne, velg fra LRS listen.<br/>Brukerveiledning finner du i systemet, ved å
velge "Hjelp" i toppmenyen.<br/>Har du spørsmål send en e-post til LRS
brukerstøtte.<br/>
-choose a section from the menu helpdesk no Velg en seksjon fra
menyen
\ No newline at end of file
+choose a section from the menu helpdesk no Velg en avdeling fra
menyen
\ No newline at end of file
Modified: trunk/phpgwapi/inc/class.categories.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.categories.inc.php 2017-11-13 20:49:40 UTC (rev
17303)
+++ trunk/phpgwapi/inc/class.categories.inc.php 2017-11-14 09:48:14 UTC (rev
17304)
@@ -25,6 +25,7 @@
var $db;
var $total_records;
var $grants;
+ var $like;
protected $location;
protected $location_id;
/**
@@ -48,7 +49,8 @@
}
$this->account_id = (int) $account_id;
- $this->db =&
$GLOBALS['phpgw']->db;
+ $this->db = &
$GLOBALS['phpgw']->db;
+ $this->like = & $this->db->like;
$this->set_appname($app_name, $location);
}
@@ -203,7 +205,7 @@
$querymethod = '';
if ($query)
{
- $querymethod = " AND (cat_name LIKE '%$query%'
OR cat_description LIKE '%$query%') ";
+ $querymethod = " AND (cat_name {$this->like}
'%$query%' OR cat_description {$this->like} '%$query%') ";
}
if($lastmod && $lastmod >= 0)
@@ -347,7 +349,7 @@
$querymethod = '';
if ($query)
{
- $querymethod = " AND (cat_name LIKE '%$query%'
OR cat_description LIKE '%$query%') ";
+ $querymethod = " AND (cat_name {$this->like}
'%$query%' OR cat_description {$this->like} '%$query%') ";
}
$filter_location = '';
@@ -356,9 +358,9 @@
$filter_location = "AND location_id =
{$this->location_id}";
}
- $sql = "SELECT * FROM phpgw_categories WHERE
(cat_appname='{$this->app_name}' {$filter_location} AND $grant_cats
$global_cats) $querymethod";
+ $sql = "SELECT * FROM phpgw_categories WHERE
(cat_appname='{$this->app_name}' {$filter_location} AND $grant_cats
$global_cats)";
- $this->db->query($sql . $parent_select .
$ordermethod,__LINE__,__FILE__);
+ $this->db->query($sql . $querymethod . $parent_select .
$ordermethod,__LINE__,__FILE__);
$total = $this->db->num_rows();
$_cats = array();
Modified: trunk/phpgwapi/inc/class.nextmatchs_xslt.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.nextmatchs_xslt.inc.php 2017-11-13 20:49:40 UTC
(rev 17303)
+++ trunk/phpgwapi/inc/class.nextmatchs_xslt.inc.php 2017-11-14 09:48:14 UTC
(rev 17304)
@@ -127,7 +127,7 @@
'right_grey_img' =>
$GLOBALS['phpgw']->common->image('phpgwapi','right-grey'),
'last_img' =>
$GLOBALS['phpgw']->common->image('phpgwapi','last'),
'last_grey_img' =>
$GLOBALS['phpgw']->common->image('phpgwapi','last-grey'),
- 'all_img' =>
$GLOBALS['phpgw']->common->image('phpgwapi','down_nm'),
+ 'all_img' =>
$GLOBALS['phpgw']->common->image('phpgwapi','down'),
'title_first' => lang('first page'),
'title_previous' => lang('previous
page'),
'title_next' => lang('next page'),
Modified: trunk/phpgwapi/templates/base/search_field.xsl
===================================================================
--- trunk/phpgwapi/templates/base/search_field.xsl 2017-11-13 20:49:40 UTC
(rev 17303)
+++ trunk/phpgwapi/templates/base/search_field.xsl 2017-11-14 09:48:14 UTC
(rev 17304)
@@ -1,28 +1,30 @@
<!-- $Id$ -->
- <xsl:template name="search_field">
- <xsl:apply-templates select="search_data"/>
- </xsl:template>
+<xsl:template name="search_field">
+ <xsl:apply-templates select="search_data"/>
+</xsl:template>
- <xsl:template match="search_data">
- <xsl:variable name="select_url"><xsl:value-of
select="select_url"/></xsl:variable>
- <xsl:variable name="query"><xsl:value-of
select="query"/></xsl:variable>
- <xsl:variable name="lang_search"><xsl:value-of
select="lang_search"/></xsl:variable>
- <form method="post" action="{$select_url}">
- <input type="text" name="query"
value="{$query}" onMouseout="window.status='';return true;">
- <xsl:attribute name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
- <xsl:value-of
select="lang_searchfield_statustext"/>
- <xsl:text>'; return
true;</xsl:text>
- </xsl:attribute>
- </input>
- <xsl:text> </xsl:text>
- <input type="submit" name="submit"
value="{$lang_search}" onMouseout="window.status='';return true;">
- <xsl:attribute name="onMouseover">
-
<xsl:text>window.status='</xsl:text>
- <xsl:value-of
select="lang_searchbutton_statustext"/>
- <xsl:text>'; return
true;</xsl:text>
- </xsl:attribute>
- </input>
- </form>
- </xsl:template>
+<xsl:template match="search_data">
+ <xsl:variable name="select_url">
+ <xsl:value-of select="select_url"/>
+ </xsl:variable>
+ <xsl:variable name="query">
+ <xsl:value-of select="query"/>
+ </xsl:variable>
+ <xsl:variable name="lang_search">
+ <xsl:value-of select="lang_search"/>
+ </xsl:variable>
+ <form method="post" action="{$select_url}">
+ <input type="text" name="query" value="{$query}">
+ <xsl:attribute name="title">
+ <xsl:value-of
select="lang_searchfield_statustext"/>
+ </xsl:attribute>
+ </input>
+ <xsl:text> </xsl:text>
+ <input type="submit" name="submit" value="{$lang_search}">
+ <xsl:attribute name="title">
+ <xsl:value-of
select="lang_searchbutton_statustext"/>
+ </xsl:attribute>
+ </input>
+ </form>
+</xsl:template>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [17304] categories: update ui,
sigurdne <=