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
5961c3bd
Commit
5961c3bd
authored
Apr 14, 2005
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- now pretty much running
parent
9d3f768f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
26 deletions
+80
-26
intranet-wiki-procs.tcl
tcl/intranet-wiki-procs.tcl
+73
-20
index.adp
www/index.adp
+6
-0
index.tcl
www/index.tcl
+1
-6
No files found.
tcl/intranet-wiki-procs.tcl
View file @
5961c3bd
...
...
@@ -6,8 +6,42 @@ ad_library {
@creation-date 27 April 2005
}
ad_proc im_wiki_home_component
{
}
{
Wiki component to be shown at the system home page
}
{
return
[
im_wiki_base_component
""
0
]
}
ad_proc im_wiki_project_component
{
project_id
}
{
Wiki component to be shown at the system home page
}
{
return
[
im_wiki_base_component im_project
$project
_id
]
}
ad_proc im_wiki_company_component
{
company_id
}
{
Wiki component to be shown at the system home page
}
{
return
[
im_wiki_base_component im_company
$company
_id
]
}
ad_proc im_wiki_office_component
{
office_id
}
{
Wiki component to be shown at the system home page
}
{
return
[
im_wiki_base_component im_office
$office
_id
]
}
ad_proc im_wiki_user_component
{
user_id
}
{
Wiki component to be shown at the system home page
}
{
return
[
im_wiki_base_component user
$user
_id
]
}
ad_proc im_wiki_base_component
{
object_type object_id
}
{
Wiki component to be shown at the system home page
}
{
set folder_id
[
wiki::get_folder_id
]
set colspan 1
...
...
@@ -17,39 +51,58 @@ ad_proc im_wiki_home_component { } {
select
ap.package_id,
cf.folder_id,
cr.title
cr.title as wiki_title,
sn.name as wiki_mount
from
apm_packages ap,
cr_folders cf,
cr_items ci,
cr_revisions cr
cr_revisions cr,
site_nodes sn
where
ap.package_key = 'wiki'
and cf.package_id = ap.package_id
and ci.parent_id = cf.folder_id
and ci.name = 'index'
and cr.revision_id = ci.live_revision
and sn.object_id = ap.package_id
"
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
""
db_foreach wikis
$wikis
_sql
{
append wikis_html
"<tr><td>
<A href="
$package
_id>$title</a>
</td></tr>
\n
"
}
set html
"
<table>
<tr>
<td colspan=
$colspan
>
</td>
</tr>
<tr>
<td class=rowtitle colspan=
$colspan
>Title</td>
</tr>
$wikis
_html
</table>
incr ctr
append wikis_html
"<b>
$wiki
_title Wiki</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
\"
>Main Index</A>
<li><A href=
\"
/
$wiki
_mount/Category
\"
>Categories</A>
"
return
[
im_table_with_title
"Wikis"
$html
]
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=
$folder
_id
\"
>Admin Wiki Permissions</A>
\n
"
append wikis_html
"<li><A href=
\"
/intranet-wiki/admin/index?folder_id=
$folder
_id
\"
>Admin Wiki Changes</A>
\n
"
}
append wikis_html
"<p>
\n
"
}
# Skip the component if there is no Wiki
if
{
0 ==
$ctr
}
{
return
""
}
return
[
im_table_with_title
"Wikis"
$wikis
_html
]
}
www/index.adp
View file @
5961c3bd
...
...
@@ -2,5 +2,11 @@
<property name="title">Wiki</property>
<property name="main_navbar_label">home</property>
<table>
<tr>
<td>
@wiki_html;noquote@
</td>
</tr>
</table>
www/index.tcl
View file @
5961c3bd
# /packages/intranet-
filestorage
/www/index.tcl
# /packages/intranet-
wiki
/www/index.tcl
#
# Copyright (C
)
2003-2004 Project/Open
#
...
...
@@ -18,8 +18,3 @@ ad_page_contract {
set
wiki_html
[
im_wiki_home_component
]
#db_release_unused_handles
#ad_returnredirect "/intranet/"
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