Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
acs-developer-support
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-developer-support
Commits
0b464951
Commit
0b464951
authored
Feb 10, 2012
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- V4.0.3.0.0:
Updated to OpenACS 5.7
parent
1340b465
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
32 deletions
+34
-32
css-edit.tcl
www/css-edit.tcl
+9
-15
css-list.tcl
www/css-list.tcl
+2
-0
css-make-live.tcl
www/css-make-live.tcl
+1
-0
request-info.adp
www/request-info.adp
+18
-17
request-info.tcl
www/request-info.tcl
+2
-0
search.tcl
www/search.tcl
+2
-0
No files found.
www/css-edit.tcl
View file @
0b464951
...
...
@@ -17,6 +17,7 @@ ad_page_contract {
}
-errors
{
}
ds_require_permission
[
ad_conn package_id
]
"admin"
if
{[
file
exists
$file
_location
]
&&
[
file
extension
$file
_location
]
eq
".css"
}
{
...
...
@@ -32,11 +33,7 @@ if {[file exists $file_location] && [file extension $file_location] eq ".css"} {
set package_id
[
ad_conn package_id
]
set css_path
"<a href='
$css
_location'>
$css
_location</a>"
if
{
$revision
_id eq
""
}
{
set fp
[
open
"
$file
_location"
"r"
]
}
else
{
set fp
[
open
[
content::revision::get_cr_file_path -revision_id
$revision
_id
]
"r"
]
}
set fp
[
open
"
$file
_location"
"r"
]
set css_content
""
while
{
[
gets
$fp
line
]
>= 0
}
{
append css_content
"
$line
\n
"
...
...
@@ -49,26 +46,25 @@ if {[file exists $file_location] && [file extension $file_location] eq ".css"} {
append revision_html
"<ol>"
db_foreach revision
{
select revision_id, publish_date, description from cr_revisions where item_id = :item_id order by publish_date desc
}
{
if
{
[
content::revision::is_live -revision_id
$revision
_id
]
eq
"t"
}
{
set make_live
"<
b>that's live!</b
>"
set make_live
"<
strong>that's live!</strong
>"
}
else
{
set return_url_2
[
ad_return_url
]
set make_live
"<a href=
\"
[
export_vars -base
"css-make-live"
-url
{
revision_id return_url_2 file_location
}]
\"
>make live!</a>"
}
set return_url
""
set revision_url
[
export_vars -base
"css-edit"
{
revision_id file_location css_location
}]
append revision_html
"<li><a href='
$revision
_url'>
$publish
_date</a>
\[
$make
_live
\]
:
[
string
range
$description
0 50
]
</li>"
append revision_html
"<li><a href='/o/
$revision
_id'>
$publish
_date</a>
\[
$make
_live
\]
:
[
string
range
$description
0 50
]
</li>"
}
append revision_html
"</ol>"
file stat
$file
_location file_stat_arr
# mcordova: ugly things until I figure out how to do that in a
# better way...
set item_id
[
content::item::get_id_by_name -name
$file
_location -parent_id
$package
_id
]
ns_log Notice
" * * * the file
$file
_location (cr_item_id:
$item
_id) has that modif time:
\[
$file
_stat_arr(mtime)
\]
"
#todo compare file mtime with live revision time
## if they are not the same date, show user a warning
# recommening to make a new revision...
}
else
{
append revision_html
"<em>no revisions yet</em>"
}
}
-on_submit
{
...
...
@@ -80,12 +76,10 @@ if {[file exists $file_location] && [file extension $file_location] eq ".css"} {
# Get the old version to initialize the item with
set fp
[
open
"
$file
_location"
"r"
]
set old_css_content
""
while
{
[
gets
$fp
line
]
>= 0
}
{
append old_css_content
"
$line
\n
"
}
set old_css_content
[
read
$fp
]
close
$fp
set item_id
[
content::item::new -name
$file
_location -parent_id
$package
_id -title
"
$css
_location"
-description
"First revision"
-text
$old
_css_content
]
set item_id
[
content::item::new -name
$file
_location -parent_id
$package
_id -title
"
$css
_location"
-description
"First revision"
-text
$old
_css_content
]
}
...
...
@@ -104,4 +98,4 @@ if {[file exists $file_location] && [file extension $file_location] eq ".css"} {
}
-cancel_url
$return
_url
}
else
{
ad_returnredirect
$return
_url
}
}
\ No newline at end of file
www/css-list.tcl
View file @
0b464951
...
...
@@ -15,6 +15,8 @@ ad_page_contract {
}
-errors
{
}
ds_require_permission
[
ad_conn package_id
]
"admin"
template::multirow create css_multirow css_location file_location edit_url
foreach
css
$css
_list
{
set css_path_list
[
split
$css
"/"
]
...
...
www/css-make-live.tcl
View file @
0b464951
...
...
@@ -16,6 +16,7 @@ ad_page_contract {
}
-errors
{
}
ds_require_permission
[
ad_conn package_id
]
"admin"
content::item::set_live_revision -revision_id
$revision
_id
...
...
www/request-info.adp
View file @
0b464951
...
...
@@ -12,22 +12,23 @@
</p></if>
@body;noquote@
<if @expired_p@ eq 0>
<if @dbreqs:rowcount@ gt 0>
<listfilters name="dbreqs" style="inline-filters"></listfilters>
<listtemplate name="dbreqs"></listtemplate>
</if>
<if @dbreqs:rowcount@ gt 0>
<listfilters name="dbreqs" style="inline-filters"></listfilters>
<listtemplate name="dbreqs"></listtemplate>
</if>
<if @profiling:rowcount@ gt 0>
<h3>Profiling Information</h3>
<listtemplate name="profiling"></listtemplate>
<if @page_fragment_cache_p@ true>
<p>
<form name="searchfrags" action="search">
<input type="hidden" name="request" value="@request@">
<input type="text" name="expression" value="">
<input type="submit" name="search" value="Search">
</form>
</p></if>
<if @profiling:rowcount@ gt 0>
<h3>Profiling Information</h3>
<listtemplate name="profiling"></listtemplate>
<if @page_fragment_cache_p@ true>
<p>
<form name="searchfrags" action="search">
<input type="hidden" name="request" value="@request@">
<input type="text" name="expression" value="">
<input type="submit" name="search" value="Search">
</form>
</p>
</if>
</if>
</if>
www/request-info.tcl
View file @
0b464951
...
...
@@ -26,6 +26,7 @@ foreach name [nsv_array names ds_request] {
}
if
{
[
info
exists property
(
start
)]
}
{
set expired_p 0
append body
"
<h3>Parameters</h3>
...
...
@@ -33,6 +34,7 @@ if { [info exists property(start)] } {
<table cellspacing=0 cellpadding=0>
<tr><th align=left>Request Start Time: </th><td>
[
clock
format
[
lindex
$property
(
start
)
0
]
-format
"%Y-%m-%d %H:%M:%S"
]
\n
"
}
else
{
set expired_p 1
append body
"The information for this request is gone - either the server has been restarted, or
the request is more than
[
parameter::get -parameter DeveloperSupportLifetime -default 900
]
seconds old.
[
ad_admin_footer
]
"
...
...
www/search.tcl
View file @
0b464951
...
...
@@ -9,6 +9,8 @@ ad_page_contract {
expression:notnull
}
ds_require_permission
[
ad_conn package_id
]
"admin"
set
context
[
list
[
list
request-info?request=$request
"request
$request
"
]
search
]
if
{
!
[
ns_cache get ds_page_bits
$request
pages
]}
{
...
...
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