Accéder au contenu.
Menu Sympa

devel - [Devel] r299 - branches/dui

Objet : devel-adl

Archives de la liste

[Devel] r299 - branches/dui


Chronologique Discussions 
  • From: svn AT agendadulibre.org
  • To: devel AT agendadulibre.org
  • Subject: [Devel] r299 - branches/dui
  • Date: Tue, 2 Oct 2007 23:53:45 +0200 (CEST)
  • List-archive: <http://agendadulibre.org/pipermail/devel>
  • List-id: Developpement de l'Agenda du Libre <devel.agendadulibre.org>

Author: ldayot
Date: Tue Oct 2 23:52:53 2007
New Revision: 299

Log:
Rendre le sous titre optionnel.



Modified:
branches/dui/funcs.inc.php

Modified: branches/dui/funcs.inc.php
==============================================================================
--- branches/dui/funcs.inc.php (original)
+++ branches/dui/funcs.inc.php Tue Oct 2 23:52:53 2007
@@ -120,7 +120,8 @@
}
echo "<div class=\"main\">\n";
echo "<h1><a href=\"index.php\">$adl_title</a></h1>\n";
- echo "<p id=\"subtitle\"><em>$adl_subtitle</em></p>\n";
+ if ($adl_subtitle>"")
+ echo "<p id=\"subtitle\"><em>$adl_subtitle</em></p>\n";

} // end function put_header

@@ -1079,7 +1080,7 @@
{
$oTags = selectCategoryTags($aTags, 0, $fieldName="tags[tag]",
$multiple=false);
$return = "<strong>". _("Tags"). "</strong> : {$oTags->HTML}<br />\n";
- $aCategoryTags = selectWithCategoryTags($aTags, $multiple=false);
+ $aCategoryTags = selectWithCategoryTags($aTags, $multiple=true);
foreach ($aCategoryTags->HTML as $category_id=>$aSelect)
{
$return .= "<strong>{$aSelect['categoryName']}</strong> : ".
$aSelect['HTMLSelect'].
@@ -1113,7 +1114,7 @@
while ($row = $db->fetchObject($ret))
{
$oneline = selectCategoryTags($aTags, $row->id,
- $fieldName="tags[". ($multiple ? $row->id : $row->name) ."]",
$multiple);
+ $fieldName="tags[". $row->name. "]", $multiple, $row->name);
$tagsSelect .= " ". $oneline->tagsSelect;

$return[$row->id]["categoryName"] = $row->name;
@@ -1142,7 +1143,7 @@
// Function to choose tags
// $aTags is an array (tag_name) of tags to be selected/checked
// output if HTML string select/checkboxes part of form
-function selectCategoryTags($aTags=array(), $categoryId=0,
$fieldName="tags[0]", $multiple=false)
+function selectCategoryTags($aTags=array(), $categoryId=0,
$fieldName="tags[0]", $multiple=false, $categoryName="")
{
global $db;
// TODO Select only tags used twice or more.
@@ -1167,7 +1168,8 @@
while ($row = $db->fetchObject($ret))
{
// is this tag in $aTags = checked/selected
- $inArray = in_array($row->name, $aTags);
+ $inArray = in_array($row->name, is_array($aTags[$categoryName]) ?
$aTags[$categoryName] : $aTags);
+
// only tags used twice or more
if ($categoryId>0 || $row->n>1)
{




  • [Devel] r299 - branches/dui, svn, 02/10/2007

Archives gérées par MHonArc 2.6.16.

Haut de le page