Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-wiki
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-wiki
Commits
86b5d53d
Commit
86b5d53d
authored
Jan 21, 2016
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- intranet-wiki:
Fixed code showing existing wiki below new wiki
parent
60064d58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
88 additions
and
16 deletions
+88
-16
intranet-wiki-procs.tcl
tcl/intranet-wiki-procs.tcl
+88
-16
No files found.
tcl/intranet-wiki-procs.tcl
View file @
86b5d53d
...
...
@@ -11,12 +11,11 @@ ad_proc im_wiki_home_component { } {
Wiki component to be shown at the system home page
}
{
# Wiki home component does't make any sense anymore
return
""
return
[
im_wiki_base_component
""
0
]
set result
""
append result
[
im_wiki_base_component
""
0
]
return
$result
}
ad_proc im_wiki_project_component
{
project_id
}
{
Wiki component to be shown at the system home page
}
{
...
...
@@ -27,9 +26,7 @@ ad_proc im_wiki_project_component { project_id } {
]
append result
[
ad_parse_template -params
$params
"/packages/intranet-wiki/lib/xowiki-project-portlet"
]
}
if
{[
im_package_exists_p wiki
]}
{
append result
[
im_wiki_base_component im_project
$project
_id
]
}
append result
[
im_wiki_base_component im_project
$project
_id
]
return
$result
}
...
...
@@ -43,9 +40,8 @@ ad_proc im_wiki_company_component { company_id } {
]
append result
[
ad_parse_template -params
$params
"/packages/intranet-wiki/lib/xowiki-company-portlet"
]
}
if
{[
im_package_exists_p wiki
]}
{
append result
[
im_wiki_base_component im_company
$company
_id
]
}
append result
[
im_wiki_base_component im_company
$company
_id
]
return
$result
}
...
...
@@ -59,9 +55,8 @@ ad_proc im_wiki_conf_item_component { conf_item_id } {
]
append result
[
ad_parse_template -params
$params
"/packages/intranet-wiki/lib/xowiki-conf-item-portlet"
]
}
if
{[
im_package_exists_p wiki
]}
{
append result
[
im_wiki_base_component im_conf_item
$conf
_item_id
]
}
append result
[
im_wiki_base_component im_conf_item
$conf
_item_id
]
return
$result
}
...
...
@@ -70,9 +65,10 @@ ad_proc im_wiki_office_component { office_id } {
Wiki component to be shown at the system home page
}
{
# XoWiki component for offices not implemented yet
return
""
set result
""
return
[
im_wiki_base_component im_office
$office
_id
]
append result
[
im_wiki_base_component im_office
$office
_id
]
return
$result
}
...
...
@@ -80,6 +76,82 @@ ad_proc im_wiki_user_component { user_id } {
Wiki component to be shown at the system home page
}
{
# XoWiki component for users not implemented yet
return
""
set result
""
append result
[
im_wiki_base_component user
$user
_id
]
return
$result
}
ad_proc im_wiki_base_component
{
object_type object_id
}
{
Wiki component to be shown at the system home page
}
{
if
{
!
[
im_package_exists_p wiki
]}
{
return
""
}
set folder_id
[
wiki::get_folder_id
]
set user_id
[
ad_get_user_id
]
set colspan 1
# Get the list of currently existing Wiki installations
set wikis_sql
"
select
ap.package_id,
cf.folder_id,
ap.instance_name as wiki_title,
sn.name as wiki_mount
from
apm_packages ap,
cr_folders cf,
site_nodes sn
where
ap.package_key = 'wiki'
and cf.package_id = ap.package_id
and sn.object_id = ap.package_id
and 't' = acs_permission__permission_p(ap.package_id, :user_id, 'read')
"
set object_name
[
db_string object_name_for_one_object_id
""
-default
""
]
set object_name_mangled
[
ns_urlencode
$object
_name
]
set ctr 0
set wikis_html
"<ul>"
db_foreach wikis
$wikis
_sql
{
incr ctr
append wikis_html
"<b>
$wiki
_title</b><br>
\n
"
if
{
0 !=
$object
_id
}
{
append wikis_html
"<li><A href=
\"
/
$wiki
_mount/
$object
_name_mangled
\"
>
$object
_name</A>
\n
"
}
append wikis_html
"
<li><A href=
\"
/
$wiki
_mount/index
\"
>
[
lang::message::lookup
""
intranet-wiki.Main_Index
"Main Index"
]
</A></li>
<li><A href=
\"
/
$wiki
_mount/Category
\"
>
[
lang::message::lookup
""
intranet-wiki.Categories Categories
]
</A></li>
"
set admin_p
[
permission::permission_p
\
-object_id
$package
_id
\
-party_id
[
ad_conn user_id
]
\
-privilege
"admin"
]
if
{
$admin
_p
}
{
append wikis_html
"<li><A href=
\"
/intranet/admin/permissions/one?object_id=
$package
_id
\"
>
[
lang::message::lookup
""
intranet-wiki.Admin_Wiki_Permissions
"Admin Wiki Permissions"
]
</A></li>
\n
"
append wikis_html
"<li><A href=
\"
/
$wiki
_mount/admin/index?folder_id=
$folder
_id&modified_only=1
\"
>
[
lang::message::lookup
""
intranet-wiki.Admin_Wiki_Changes
"Admin Wiki Changes"
]
</A></li>
\n
"
append wikis_html
"<li><A href=
\"
/
$wiki
_mount/admin/index?folder_id=
$folder
_id
\"
>
[
lang::message::lookup
""
intranet-wiki.Admin_All_Pages
"Admin All Pages"
]
</A></li>
\n
"
}
append wikis_html
"<p></p>
\n
"
}
append wikis_html
"</ul>"
# Skip the component if there is no Wiki
if
{
0 ==
$ctr
}
{
return
""
}
return
$wikis
_html
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment