antoniop
committed
on 11 Jul 18
Add documentation to public procs (fixes automated tests), uniform doc sytle
/tcl/faq-admin-portlet-procs.tcl (+8 -3)
17 17 ad_library {
18 18
19 19     Procedures to support the file-storage portlet
20 20
21 21     @creation-date January 19 2002
22 22     @author Arjun Sanyal (arjun@openforce.net)
23 23     @author Ben Adida (ben@openforce.net)
24 24     @cvs-id $Id$
25 25
26 26 }
27 27
28 28 namespace eval faq_admin_portlet {
29 29
30 30     ad_proc -private get_my_name {
31 31     } {
32 32         return "faq_admin_portlet"
33 33     }
34 34
35 35     ad_proc -public get_pretty_name {
36 36     } {
  37         Get the pretty name.
  38     } {
37 39         return "#faq-portlet.admin_pretty_name#"
38 40     }
39 41
40 42     ad_proc -private my_package_key {
41 43     } {
42 44         return "faq-portlet"
43 45     }
44 46
45 47     ad_proc -public link {
46 48     } {
  49         Get the link. This is currently empty.
  50     } {
47 51         return ""
48 52     }
49 53
50 54     ad_proc -public add_self_to_page {
51 55         {-portal_id:required}
52 56         {-package_id:required}
53 57     } {
54 58         Adds a faq admin PE to the given admin portal. There should only
55           ever be one of these portals on an admin page with only one faq_package_id
  59         ever be one of these portals on an admin page with only one faq_package_id.
56 60
57 61         @param portal_id The page to add self to
58 62         @param package_id the id of the faq package
59 63
60 64         @return element_id The new element's id
61 65     } {
62 66         return [portal::add_element_parameters \
63 67             -portal_id $portal_id \
64 68             -portlet_name [get_my_name] \
65 69             -key package_id \
66 70             -value $package_id
67 71         ]
68 72     }
69 73
70 74     ad_proc -public remove_self_from_page {
71 75         portal_id
72 76     } {
73           Removes a faq admin PE from the given portal
  77         Removes a faq admin PE from the given portal.
74 78     } {
75 79         portal::remove_element -portal_id $portal_id -portlet_name [get_my_name]
76 80     }
77 81
78 82     ad_proc -public show {
79 83         cf
80 84     } {
  85         Show the FAQ admin portlet.
81 86     } {
82 87         portal::show_proc_helper \
83 88             -package_key [my_package_key] \
84 89             -config_list $cf \
85 90             -template_src "faq-admin-portlet"
86 91     }
87 92
88 93 }
89 94
90 95 # Local variables:
91 96 #    mode: tcl
92 97 #    tcl-indent-level: 4
93 98 #    indent-tabs-mode: nil
94 99 # End: