noalyss Version-9
todo_list_display.php
Go to the documentation of this file.
1<?php
2/*
3 * * Copyright (C) 2015 Dany De Bontridder <dany@alchimerys.be>
4*
5* This program is free software; you can redistribute it and/or
6* modify it under the terms of the GNU General Public License
7* as published by the Free Software Foundation; either version 2
8* of the License, or (at your option) any later version.
9*
10* This program is distributed in the hope that it will be useful,
11* but WITHOUT ANY WARRANTY; without even the implied warranty of
12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13* GNU General Public License for more details.
14*
15* You should have received a copy of the GNU General Public License
16* along with this program; if not, write to the Free Software
17* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/
19
20
21/**
22 * @brief included from Todo_List::display
23 * create a html with content
24 * @see Todo_List
25 */
26global $g_user;
27$wDate=new IDate('p_date_todo',$this->tl_date);
28
29$wTitle=new IText('p_title',$this->tl_title);
30$wDesc=new ITextArea('p_desc', strip_tags($this->tl_desc));
31$wDesc->heigh=5;
32$wDesc->width=40;
33$is_public=new ICheckBox('p_public');
34$is_public->value='Y';
35$is_public->set_check($this->is_public);
37$close_share=" if ( \$('shared_{$this->tl_id}') ){ \$('shared_{$this->tl_id}').remove();}";
38echo HtmlInput::title_box("Note","todo_list_div".$this->tl_id,'close',$close_share,'y');
39?>
40<form id="todo_form_<?php echo $this->tl_id?>" onsubmit="todo_list_save(<?php echo $this->tl_id?>);return false">
41 <table>
42 <tr>
43 <td>
44 <?php echo _("Date") ?>
45 </td>
46
47 <td>
48 <?php echo $wDate->input() ?>
49 </td>
50
51 </tr>
52 <tr>
53 <td>
54 <?php echo _("Titre") ?>
55 </td>
56
57 <td>
58 <?php echo h($wTitle->input());?>
59 </td>
60
61 </tr>
62
63 <?php
64 // Section about Public note
65 // display only if priv granted
66 if ($g_user->check_action(SHARENOTEPUBLIC) == 1):
67 ?>
68 <tr>
69 <td>
70 <?php echo _('Public')?>
71 </td>
72 <td>
73 <?php echo $is_public->input()?>
74 </td>
75 </tr>
76 <?php
77 endif;
78 ?>
79 <?php
80 // section if the user can share note with other
81 //users
82 if ($g_user->check_action(SHARENOTE)) :
83 ?>
84
85 <tr>
86 <td>
87 <?php echo _('Partage')?>
88 </td>
89 <td>
90 <?php echo HtmlInput::anchor(_('Partage'), "", " onclick=\"todo_list_share({$this->tl_id},{$dossier}) \";")?>
91 </td>
92 </tr>
93 <?php
95 ?>
96 </table>
97 <?php echo h($wDesc->input()); ?>
98 <?php echo dossier::hidden(); ?>
99 <?php echo HtmlInput::hidden('act','save') ?>
100 <?php echo HtmlInput::hidden('id',$this->tl_id) ?>
101 <p style='text-align: center'>
102 <ol style="list-style: none;">
103 <?php if ($this->use_login == $_SESSION[SESSION_KEY.'g_user']) : ?>
104 <li style="display:inline">
105 <input type="submit" class="smallbutton" value="<?php echo _('Sauve');?>" onclick="todo_list_save(<?php echo $this->tl_id?>);return false">
106 </li>
107 <?php endif; ?>
108 <li style="display:inline">
109 <?php echo HtmlInput::button_close("todo_list_div".$this->tl_id);?>
110 </li>
111 </ol>
112 </p>
113</form>
tr($p_string, $p_extra='')
Definition: ac_common.php:88
p($p_string)
Definition: ac_common.php:39
td($p_string='', $p_extra='')
surround the string with td
Definition: ac_common.php:83
h( $row[ 'oa_description'])
$opd_description style
$input_from type
Definition: balance.inc.php:65
static id()
return the 'gDossier' value after a check
static button_close($div_name, $class='smallbutton')
close button for the HTML popup
static anchor($p_text, $p_url="", $p_js="", $p_style=' class="line" ', $p_title="click", array $p_attribute=[])
Return a simple anchor with a url or a javascript if $p_js is not null then p_url will be javascript:...
static hidden($p_name, $p_value, $p_id="")
static title_box($p_name, $p_div, $p_mod="close", $p_js="", $p_draggable="n", $p_enlarge='n')
Title for boxes, you can customize the symbol thanks symbol with the mode "custom".
Html Input.
Html Input : Input a date format dd.mm.yyyy The property title should be set to indicate what it is e...
Definition: idate.class.php:34
Html Input.
Definition: itext.class.php:30
$all table
const SHARENOTEPUBLIC
const SHARENOTE
$close_share
global $g_user
included from Todo_List::display create a html with content
return false Date Titre onclick endif
$is_public value