noalyss Version-9
Public Member Functions | Static Public Member Functions
Tag_Action Class Reference

concerns the tags linked to an action More...

+ Inheritance diagram for Tag_Action:
+ Collaboration diagram for Tag_Action:

Public Member Functions

 __construct ($p_cn, $p_id=-1)
 
 select ($p_prefix="")
 let select a tag to add More...
 
 select_search ($p_prefix, $title=true)
 let select a tag to add to the search More...
 
 update_search_cell ($p_prefix)
 In the screen search add this data to the cell. More...
 
- Public Member Functions inherited from Tag
 __construct ($p_cn, $id=-1)
 
 form_add ()
 Display a inner window with the detail of a tag. More...
 
 get_data ()
 
 query_active_tag ()
 
 remove ($p_array)
 
 save ($p_array)
 
 set_data ($data)
 
 show_form_add ()
 Show the tag you can add to a document. More...
 
 show_list ()
 Show the list of available tag. More...
 

Static Public Member Functions

static add_clear_button ($p_prefix)
 clear the search cell More...
 
static select_tag_search ($p_prefix)
 Show a button to select tag for Search. More...
 

Additional Inherited Members

- Protected Attributes inherited from Tag
 $cn
 

Detailed Description

concerns the tags linked to an action

Definition at line 35 of file tag_action.class.php.

Constructor & Destructor Documentation

◆ __construct()

Tag_Action::__construct (   $p_cn,
  $p_id = -1 
)

Reimplemented from Tag.

Definition at line 37 of file tag_action.class.php.

38 {
39 parent::__construct($p_cn, $p_id);
40 }

References $p_id.

Member Function Documentation

◆ add_clear_button()

static Tag_Action::add_clear_button (   $p_prefix)
static

clear the search cell

Definition at line 66 of file tag_action.class.php.

67 {
68 $clear=HtmlInput::button('clear', 'X', 'onclick="search_clear_tag('.Dossier::id().',\''.$p_prefix.'\');"',
69 'smallbutton');
70 return $clear;
71 }
static id()
return the 'gDossier' value after a check
static button($p_name, $p_value, $p_javascript="", $p_class="smallbutton")

References HtmlInput\button(), and Dossier\id().

+ Here is the call graph for this function:

◆ select()

Tag_Action::select (   $p_prefix = "")

let select a tag to add

Definition at line 45 of file tag_action.class.php.

46 {
47 $ret=parent::query_active_tag();
48 require_once NOALYSS_TEMPLATE.'/tag_select.php';
49 }

References $ret.

◆ select_search()

Tag_Action::select_search (   $p_prefix,
  $title = true 
)

let select a tag to add to the search

Definition at line 90 of file tag_action.class.php.

91 {
92 $res="";
93 $ret=$this->get_data()->seek(' order by t_tag');
94 require_once NOALYSS_TEMPLATE.'/tag_search_select.php';
95 if ($title) return HtmlInput::title_box('Tag', $p_prefix.'tag_div').$res;
96 else return $res;
97 }
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".
get_data()
Definition: tag.class.php:41

◆ select_tag_search()

static Tag_Action::select_tag_search (   $p_prefix)
static

Show a button to select tag for Search.

Returns
HTML

Definition at line 55 of file tag_action.class.php.

56 {
57 $r="";
58 $r.=HtmlInput::button("choose_tag", _("Etiquette"),
59 'onclick="search_display_tag('.Dossier::id().',\''.$p_prefix.'\',\'Tag_Action\')"', "smallbutton");
60 return $r;
61 }
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r

References $r, HtmlInput\button(), and Dossier\id().

+ Here is the call graph for this function:

◆ update_search_cell()

Tag_Action::update_search_cell (   $p_prefix)

In the screen search add this data to the cell.

Definition at line 76 of file tag_action.class.php.

77 {
78 $data=$this->get_data();
79 printf ('<span id="sp_%s%s" class="tagcell tagcell-color%s">',$p_prefix,$data->t_id,$data->t_color);
80 echo h($data->t_tag);
81 echo HtmlInput::hidden($p_prefix.'tag[]', $data->t_id);
82 $js=sprintf("$('sp_".$p_prefix.$data->t_id."').remove();");
83 echo Icon_Action::trash(uniqid(), $js);
84 echo '</span>';
85 }
h( $row[ 'oa_description'])
static hidden($p_name, $p_value, $p_id="")
static trash($p_id, $p_javascript)
Display the icon of a trashbin.
$data
Definition: tag.class.php:33

The documentation for this class was generated from the following file: