Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
acs-api-browser
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
acs-api-browser
Commits
1ca805ca
Commit
1ca805ca
authored
Jan 23, 2013
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Modified package-view - the portlet to show a package's
procedures, files etc. for use within XoWiki
parent
dbc76529
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
97 additions
and
38 deletions
+97
-38
package-view.adp
www/package-view.adp
+26
-9
package-view.tcl
www/package-view.tcl
+71
-29
No files found.
www/package-view.adp
View file @
1ca805ca
<if @show_master_p@>
<master>
<property name=title>@title;noquote@</property>
<property name="context">@context;noquote@</property>
</if>
<if "" ne @error_message@>
<!-- <font color=red> -->
@error_message@
<!-- </font> -->
</if>
<if "" ne @version_id@>
@dimensional_slider;noquote@
<if @
kind@ eq "procs_files"
>
<if @
procs_files_p@
>
<blockquote>
<h2>TCL Libraries</h2>
<table cellspacing="0" cellpadding="0">
<multiple name="procs_files">
<tr valign=top>
<td
><b><a href="
procs-file-view?version_id=@version_id@&path=@procs_files.full_path@">@procs_files.path@</a></b></td>
<td
width="30%"><b><a href="@url@/
procs-file-view?version_id=@version_id@&path=@procs_files.full_path@">@procs_files.path@</a></b></td>
<td> </td>
<td>@procs_files.first_sentence@ </td>
<td
width="70%"
>@procs_files.first_sentence@ </td>
</tr>
</multiple>
</table>
</blockquote>
</if>
<if @
kind@ eq "procs"
>
<if @
procs_p@
>
<blockquote>
<h2>TCL Procedures</h2>
<table cellspacing="0" cellpadding="0">
<multiple name="procedures">
<tr valign=top>
<td><b><a href="proc-view?version_id=@version_id@&proc=@procedures.proc@">@procedures.proc@</a></b></td>
<td><b><a href="
@url@/
proc-view?version_id=@version_id@&proc=@procedures.proc@">@procedures.proc@</a></b></td>
<td> </td>
<td>@procedures.first_sentence@ </td>
</tr>
...
...
@@ -30,12 +42,13 @@
</table>
</blockquote>
</if>
<if @
kind@ eq "sql_files"
>
<if @
sql_files_p@
>
<blockquote>
<h2>SQL Files</h2>
<table cellspacing="0" cellpadding="0">
<multiple name="sql_files">
<tr valign=top>
<td><b><a href="display-sql?package_key=@package_key@&url=@sql_files.relative_path@&version_id=@version_id@">@sql_files.path@</a></b></td>
<td><b><a href="
@url@/
display-sql?package_key=@package_key@&url=@sql_files.relative_path@&version_id=@version_id@">@sql_files.path@</a></b></td>
<td> </td>
<td> </td>
</tr>
...
...
@@ -43,13 +56,14 @@
</table>
</blockquote>
</if>
<if @kind@ eq "content">
<if @content_p@>
<h2>Content Files</h2>
<table cellspacing="0" cellpadding="0">
<multiple name="content_pages">
<tr valign=top>
<if @content_pages.content_type@ eq "page">
<td>@content_pages.indentation;noquote@
<b><a href="content-page-view?version_id=@version_id@&path=@content_pages.full_path@">@content_pages.name@</a></b>
<b><a href="
@url@/
content-page-view?version_id=@version_id@&path=@content_pages.full_path@">@content_pages.name@</a></b>
<if @content_pages.type@ ne "">
<a href="type-view?type=@content_pages.type@"></a>
</if>
...
...
@@ -63,3 +77,6 @@
</multiple>
</table>
</if>
</if>
www/package-view.tcl
View file @
1ca805ca
ad_page_contract
{
Shows APIs for a particular package.
@param version_id the ID of the version whose API to view.
@param public_p view only public APIs?
@param kind view which type of APIs? One of <code>procs_files</code>,
if
{
!
[
info
exists package_key
]}
{
ad_page_contract
{
Shows APIs for a particular package.
@param version_id the ID of the version whose API to view.
@param public_p view only public APIs?
@param kind view which type of APIs? One of <code>procs_files</code>,
<code>procs</code> or <code>content</code>.
@author Jon Salz
(
jsalz@mit.edu
)
@creation-date 3 Jul 2000
@cvs-id $Id$
}
{
{
version_id
""
}
{
package_key
""
}
{
public_p
""
}
{
kind
"procs_files"
}
}
-properties
{
title:onevalue
context:onevalue
dimensional_slider:onevalue
kind:onevalue
version_id:onevalue
package_key:onevalue
procs_files:multirow
procedures:multirow
sql_files:multirow
content_pages:multirow
@author Jon Salz
(
jsalz@mit.edu
)
@creation-date 3 Jul 2000
@cvs-id $Id$
}
{
{
version_id
""
}
{
public_p
""
}
{
kind
"all"
}
{
package_key
""
}
}
-properties
{
title:onevalue
context:onevalue
dimensional_slider:onevalue
kind:onevalue
version_id:onevalue
package_key:onevalue
procs_files:multirow
procedures:multirow
sql_files:multirow
content_pages:multirow
}
}
else
{
set kind
"all"
set public_p
""
}
if
{
""
!=
$package
_key
}
{
set version_id
[
db_string package_version
"select min(version_id) from apm_package_versions where package_key = :package_key"
-default
""
]
set
error_message
""
set
dimensional_slider
""
if
{
!
[
info
exists show_master_p
]}
{
set show_master_p 1
}
# if {[info exists package_key
]}
{
# set version_id [db_string package_version "select min(version_id
) from apm_package_versions where package_key = :package_key
" -default ""]
#
}
if
{
!
[
info
exists version_id
]
||
""
==
$version
_id
}
{
if
{[
info
exists package_key
]
&&
""
!=
$package
_key
}
{
set version_id
[
db_string package_version
"select min(version_id) from apm_package_versions where package_key = :package_key"
-default
""
]
}
}
if
{
""
==
$version
_id
}
{
ad_return_complaint 1
"package-view: You need to specify version_id or package_key"
}
# ad_return_complaint 1 $version_id
if
{
""
==
$version
_id
}
{
set error_message
"Package '
$package
_key' is not installed on this server, so there is no documentation available."
}
if
{
"all"
==
$kind
}
{
set kind
"procs_files procs sql_files content"
}
set
url
"/api-doc"
set
public_p
[
api_set_public
$version
_id
$public
_p
]
db_1row pretty_name_from_package_id
{
set
pretty_name
""
set
version_name
""
set
relative_path
""
if
{
!
[
info
exists package_key
]
||
""
==
$package
_key
}
{
set package_key
"intranet-hr"
}
db_0or1row pretty_name_from_package_id
{
select pretty_name, package_key, version_name
from apm_package_version_info
where version_id = :version_id
...
...
@@ -64,8 +95,15 @@ set dimensional_slider "[ad_dimensional \
""
\
[
ad_tcl_vars_to_ns_set version_id kind public_p
]]
"
switch
$kind
{
set
procs_p 0
set
procs_files_p 0
set
sql_files_p 0
set
content_p 0
foreach
k
$kind
{
switch
$k
{
procs_files
{
set procs_files_p 1
array set procs
[
list
]
multirow create procs_files path full_path first_sentence
...
...
@@ -84,6 +122,7 @@ switch $kind {
}
}
procs
{
set procs_p 1
array set procs
[
list
]
foreach path
[
apm_get_package_files -package_key
$package
_key -file_types tcl_procs
]
{
...
...
@@ -107,6 +146,7 @@ switch $kind {
}
}
sql_files
{
set sql_files_p 1
multirow create sql_files path relative_path
set file_types
[
list
data_model data_model_create data_model_drop data_model_upgrade
]
...
...
@@ -119,6 +159,7 @@ switch $kind {
}
}
content
{
set content_p 1
multirow create content_pages indentation full_path content_type name type first_sentence
set last_components
[
list
]
foreach path
[
apm_get_package_files -package_key
$package
_key -file_types content_page
]
{
...
...
@@ -169,3 +210,4 @@ switch $kind {
}
}
}
}
\ No newline at end of file
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