Commit 7878213f authored by Frank Bergmann's avatar Frank Bergmann

- OpenACS 5.9

parent 08369fbc
......@@ -19,6 +19,7 @@
<msg key="Cancel">Cancel</msg>
<msg key="Comment">Comment:</msg>
<msg key="Comments">Comments</msg>
<msg key="Comments_of">Comments of %user_name%</msg>
<msg key="Confirm">Confirm</msg>
<msg key="Confirm_comment">Confirm comment</msg>
<msg key="Confirm_comment_on">Confirm comment on</msg>
......
......@@ -8,21 +8,21 @@
<singleton-p>t</singleton-p>
<auto-mount>comments</auto-mount>
<version name="5.8.1" url="http://openacs.org/repository/download/apm/general-comments-5.8.1.apm">
<version name="5.9.0" url="http://openacs.org/repository/download/apm/general-comments-5.9.0.apm">
<owner url="mailto:dave@thedesignexperience.org">Dave Bauer</owner>
<owner url="mailto:dhogaza@pacifier.com">Don Baccus</owner>
<summary>Service to provide comment entry and display on objects.</summary>
<release-date>2013-09-08</release-date>
<release-date>2015-10-04</release-date>
<vendor url="http://openacs.org">OpenACS</vendor>
<description format="text/html">General comments provides the widgets and UI to support commentability on any object. There is also an admin interface to edit/hide/delete comments.</description>
<license>GPL</license>
<maturity>2</maturity>
<provides url="general-comments" version="5.8.1"/>
<requires url="acs-kernel" version="5.8.1"/>
<requires url="acs-content-repository" version="5.8.1"/>
<provides url="general-comments" version="5.9.0"/>
<requires url="acs-kernel" version="5.9.0"/>
<requires url="acs-content-repository" version="5.9.0"/>
<requires url="acs-messaging" version="5.8.1"/>
<requires url="acs-messaging" version="5.9.0"/>
<callbacks>
</callbacks>
......
......@@ -19,3 +19,9 @@ ad_proc -public -callback general_comments::notify_objects {
@param comment Comment that was provided. This is HTML.
@param object_type Object Type of the object id. This is useful to quickly say in the package implementations wether you want to deal with the comment or not.
} -
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -208,9 +208,9 @@ ad_proc -private general_comments_print_comment {
append attachments_html "<li>$title "
if { $mime_type eq "image_gif" || $mime_type eq "image/jpeg" } {
append attachments_html "(<a href=\"[ad_quotehtml ${package_url}view-image?image_id=$item_id&return_url=$return_url]\">$name</a>)\n"
append attachments_html "(<a href=\"[ns_quotehtml ${package_url}view-image?image_id=$item_id&return_url=$return_url]\">$name</a>)\n"
} else {
append attachments_html "(<a href=\"[ad_quotehtml ${package_url}file-download?item_id=$item_id]\">$name</a>)\n"
append attachments_html "(<a href=\"[ns_quotehtml ${package_url}file-download?item_id=$item_id]\">$name</a>)\n"
}
}
......@@ -218,7 +218,7 @@ ad_proc -private general_comments_print_comment {
select i.item_id, e.label, e.url
from cr_items i, cr_extlinks e
where i.parent_id = :comment_id and e.extlink_id = i.item_id" {
append attachments_html "<li><a href=\"[ad_quotehtml $url]\">$label</a>\n"
append attachments_html "<li><a href=\"[ns_quotehtml $url]\">$label</a>\n"
}
if { $attachments_html ne "" } {
append html "<h5>[_ general-comments.Attachments]</h5>\n<ul>\n$attachments_html</ul>\n"
......@@ -231,7 +231,7 @@ ad_proc -private general_comments_print_comment {
}]
} else {
append html [subst {
<li><a href="[ad_quotehtml [export_vars -base ${package_url}view-comment {comment_id return_url}]]">$title</a>
<li><a href="[ns_quotehtml [export_vars -base ${package_url}view-comment {comment_id return_url}]]">$title</a>
}]
if {$print_user_info_p} {
append html [subst {
......
......@@ -36,3 +36,9 @@ db_exec_plsql delete_comment {
ad_returnredirect $return_url
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -48,3 +48,9 @@ set page_title "[_ general-comments.Delete_a_comment]"
set context [list "[_ general-comments.Delete_a_comment]"]
ad_return_template
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -48,7 +48,7 @@ template::list::create -name comments_list \
}
comment_id {
label "#general-comments.ID#"
display_template {<a href="view-comment?comment_id=@comments.comment_id@">@comments.comment_id@</a>}
display_template {<a href="../view-comment?comment_id=@comments.comment_id@">@comments.comment_id@</a>}
orderby {comment_id}
}
title {
......@@ -92,3 +92,9 @@ set context {}
ad_return_template
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -47,3 +47,9 @@ if { $live_revision != $revision_id } {
}
ad_returnredirect $return_url
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -46,3 +46,9 @@ set target "comment-add-3"
set html_content [ad_html_text_convert -from $comment_mime_type -- $content]
ad_return_template "comment-ae-2"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -52,3 +52,9 @@ if { $attach_p == "f" && $return_url ne "" } {
} else {
ad_returnredirect [export_vars -base view-comment { comment_id return_url }]
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -51,3 +51,9 @@ ad_return_template "comment-ae"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -41,3 +41,9 @@ set html_content [ad_html_text_convert -from $comment_mime_type -- $content]
ad_return_template "comment-ae-2"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -55,3 +55,9 @@ db_transaction {
ad_returnredirect [export_vars -base view-comment {comment_id return_url}]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -56,3 +56,9 @@ set target "comment-edit-2"
ad_return_template "comment-ae"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -32,3 +32,9 @@ db_exec_plsql delete_comment {}
ad_returnredirect $return_url
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -82,3 +82,9 @@ ad_returnredirect [export_vars -base view-comment {{comment_id $parent_id} retur
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -30,3 +30,9 @@ set page_title "[_ general-comments.Delete_attachment]"
set context "\"[_ general-comments.Delete_attachment]\""
ad_return_template
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -50,3 +50,9 @@ set page_title "[_ general-comments.Delete_a_comment]"
set context [list "[_ general-comments.Delete_a_comment]"]
ad_return_template
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
This diff is collapsed.
<property name="context">{/doc/general-comments {General Comments}} {Developer's guide}</property>
<property name="doc(title)">Developer's guide</property>
<master>
<div class="NAVHEADER"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><th colspan="3" align="center">General Comments</th></tr><tr>
<td width="10%" align="left" valign="bottom"><a href="index">Prev</a></td><td width="80%" align="center" valign="bottom"></td><td width="10%" align="right" valign="bottom"><a href="design">Next</a></td>
</tr>
</table></div>
<div class="chapter">
<h1><a name="dev-guide" id="dev-guide">Chapter 1. Developer's
guide</a></h1><div class="sect1">
<h1 class="sect1"><a name="requirements" id="requirements">1.1.
Requirements Document</a></h1><div class="sect2">
<h2 class="sect2"><a name="requirements-introduction" id="requirements-introduction">1.1.1. Introduction</a></h2><p>This is the requirements document for the General Comments
package for ACS 4.0. General Comments is an application that takes
advantage of the ACS Messaging service package.</p>
</div><div class="sect2">
<h2 class="sect2"><a name="requirements-vision-statement" id="requirements-vision-statement">1.1.2. Vision Statement</a></h2><p>User feedback and engagement is the very heart of a
collaborative community. General Comments allows users to comment
on any object in the community, such as articles, white papers,
press releases or pictures.</p><p>Comments are not limited to text, but can include attachments
such as links, pictures or other documents.</p><p>Users can edit their own comments and an administrator can
choose to moderate all or particular comments before they go live
on the site.</p>
</div><div class="sect2">
<h2 class="sect2"><a name="requirements-application-overview" id="requirements-application-overview">1.1.3. Application
Overview</a></h2><p>General Comments is an application package that relies on the
ACS Messaging package. Comments can be associated with any object
in ACS 4.0, which gives you the benefits of the Permission System.
Comments are stored as ACS Messages.</p><p>When a user creates a comment, General Comments stores the
comment as an ACS Message and associates the comment to the object
commented on. The value set by the adminstrator on whether comments
go live immediately or needs approval first is stored along with
the comment during this phase. After this, the user is presented
with a page that displays contents of the comment along with
revision history, attachments, and links to perform actions on the
comment such as adding attachments or editing the comment.</p>
</div><div class="sect2">
<h2 class="sect2"><a name="requirements-use-cases-and-user-scenarios" id="requirements-use-cases-and-user-scenarios">1.1.4. Use-cases and
User-scenarios</a></h2><p>This package supports empowering all users with the option of
adding comments to objects in the system, and editing their own
comments later on.</p><p><span class="phrase">A user adding a comment:</span></p><p>Nurse Nancy is browsing through an ACS 4.0 site that has a page
for medical emergencies. Upon reaching the bottom of the page,
Nancy sees a posting that reads, "<i class="emphasis">Please help,
my child has just swallowed some cleaning solution!!!</i>". Nancy
sees that this posting was made only 30 seconds ago and quickly
posts a remedy for this situation. After she makes her posting, she
immediately revisits the page and happily sees that her posting is
already available.</p><p><span class="phrase">A user editing an old comment:</span></p><p>George Genius is reviewing all of the comments he has posted
over the last 24 hours. In one of his postings, George notices that
his mathematical formula for earthquake prediction was incorrect.
He then clicks on the edit link, makes changes to his formula and
submits his changes. Since comments are moderated, others will only
see his older incorrect version until his changes are approved.
George eagerly awaits for his changes to be approved so that he
won't be ridiculed by his colleagues for his mistakes.</p><p><span class="phrase">An adminstrator moderating:</span></p><p>Adam Admin is looking over all recently unnapproved changes to
comments. Adam sees that George Genius has made a correction to the
earthquake prediction formula in which he helped write. He believes
that the their original formaula is correct, so Adam does not
approve of the changes. Several days later, George barges into
Adam's office wondering why his changes were not approved. After a
few hours George convinces Adam that the new modifications were
correct, and so Adam approves George's comment.</p>
</div><div class="sect2">
<h2 class="sect2"><a name="requirements-related-links" id="requirements-related-links">1.1.5. Related Links</a></h2><ul>
<li><p><a href="design">Design Document</a></p></li><li><p><a href="/doc/acs-messaging/" target="_top">ACS
Messaging</a></p></li>
</ul>
</div><div class="sect2">
<h2 class="sect2"><a name="requirements-requirements-data-model" id="requirements-requirements-data-model">1.1.6. Requirements: Data
Model</a></h2><p>
<span class="phrase">10.0</span> Comments can be attached to any
object in the system.</p><p>
<span class="phrase">10.10</span> Maintain revisioning of
comments.</p><p>
<span class="phrase">10.20</span> Store comment as an
acs-message.</p><p>
<span class="phrase">10.30</span> Allow separation of comments
on an object.</p><p>
<span class="phrase">10.40</span> Allow file and url attachments
to comments.</p><p>
<span class="phrase">10.50</span> Allow limitations on size of
file attachments.</p><p>
<span class="phrase">10.60</span> Use permissioning system to
control creation of comments.</p>
</div><div class="sect2">
<h2 class="sect2"><a name="requirements-requirements-api" id="requirements-requirements-api">1.1.7. Requirements: API</a></h2><p>
<span class="phrase">20.0</span> A summary type function that
retrieves all comments for a particular object.</p><p>
<span class="phrase">20.10</span> A link function that generates
an appropriate link to add a comment.</p>
</div><div class="sect2">
<h2 class="sect2"><a name="requirements-requirements-interface" id="requirements-requirements-interface">1.1.8. Requirements:
Interface</a></h2><p><span class="phrase">The Community Member's Interface</span></p><p>The user interface for community members is a set of HTML pages
that allow creation and editing of comments.</p><p>
<span class="phrase">30.0</span> Customized presentation.</p><p>
<span class="phrase">30.0.10</span> Show all comments that the
user created.</p><p>
<span class="phrase">30.0.20</span> Have sliders to show
approved/uapproved comments.</p><p>
<span class="phrase">30.0.30</span> Have sliders to show
comments by age.</p><p>
<span class="phrase">30.10</span> Comments can be viewed in
detail.</p><p>
<span class="phrase">30.20</span> Provide ways for a user to add
attachments to a comment.</p><p>
<span class="phrase">30.30</span> Allow editing of comments.</p><p>
<span class="phrase">30.40</span> Provide a way to display
attached images.</p><p>
<span class="phrase">30.50</span> Allow download of attached
files.</p><p><span class="phrase">The Administrator's Interface</span></p><p>The user interface for adminstrative members is a set of HTML
pages that allows deletion and approval of comments.</p><p>
<span class="phrase">40.0</span> Customized presentation.</p><p>
<span class="phrase">40.0.10</span> Show all created
comments.</p><p>
<span class="phrase">40.0.20</span> Have sliders to show
approved/unapproved comments.</p><p>
<span class="phrase">40.0.30</span> Have sliders to show
comments by age.</p><p>
<span class="phrase">40.10</span> Allow deletion of
comments.</p>
</div><div class="sect2">
<h2 class="sect2"><a name="requirements-revision-history" id="requirements-revision-history">1.1.9. Revision History</a></h2><div class="informaltable">
<a name="AEN108" id="AEN108"></a><table border="1" class="CALSTABLE"><tbody>
<tr>
<td align="center" valign="middle"><i class="emphasis">Document
Revision #</i></td><td align="center" valign="middle"><i class="emphasis">Action
Taken, Notes</i></td><td align="center" valign="middle"><i class="emphasis">When?</i></td><td align="center" valign="middle"><i class="emphasis">By
Whom?</i></td>
</tr><tr>
<td align="left" valign="middle">0.2</td><td align="left" valign="middle">Revision</td><td align="left" valign="middle">12/11/2000</td><td align="left" valign="middle">Phong Nguyen</td>
</tr><tr>
<td align="left" valign="middle">0.1</td><td align="left" valign="middle">Creation</td><td align="left" valign="middle">10/26/2000</td><td align="left" valign="middle">Phong Nguyen</td>
</tr>
</tbody></table>
</div><p>Last modified: $&zwnj;Id: dev-guide.html,v 1.1.1.1 2001/04/20 20:51:11
donb Exp $</p>
</div>
</div>
</div>
<div class="NAVFOOTER">
<hr align="left" width="100%"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="33%" align="left" valign="top"><a href="index">Prev</a></td><td width="34%" align="center" valign="top"><a href="index">Home</a></td><td width="33%" align="right" valign="top"><a href="design">Next</a></td>
</tr><tr>
<td width="33%" align="left" valign="top">General Comments</td><td width="34%" align="center" valign="top"> </td><td width="33%" align="right" valign="top">Design Document</td>
</tr>
</table>
</div>
<property name="context">{/doc/general-comments {General Comments}} {General Comments}</property>
<property name="doc(title)">General Comments</property>
<master>
<div class="BOOK">
<a name="AEN1" id="AEN1"></a><div class="TITLEPAGE">
<h1 class="title"><a name="AEN1" id="AEN1">General
Comments</a></h1><h3 class="author"><a name="AEN4" id="AEN4">Phong Nguyen</a></h3><div class="affiliation"><div class="address"><p class="address">phong\@arsdigita.com</p></div></div>
</div><div class="TOC"><dl>
<dt><b>Table of Contents</b></dt><dt>1. <a href="dev-guide">Developer's guide</a>
</dt><dd><dl>
<dt>1.1. <a href="dev-guide">Requirements
Document</a>
</dt><dd><dl>
<dt>1.1.1. <a href="dev-guide">Introduction</a>
</dt><dt>1.1.2. <a href="dev-guide">Vision
Statement</a>
</dt><dt>1.1.3. <a href="dev-guide">Application
Overview</a>
</dt><dt>1.1.4. <a href="dev-guide">Use-cases
and User-scenarios</a>
</dt><dt>1.1.5. <a href="dev-guide">Related Links</a>
</dt><dt>1.1.6. <a href="dev-guide">Requirements:
Data Model</a>
</dt><dt>1.1.7. <a href="dev-guide">Requirements:
API</a>
</dt><dt>1.1.8. <a href="dev-guide">Requirements:
Interface</a>
</dt><dt>1.1.9. <a href="dev-guide">Revision
History</a>
</dt>
</dl></dd><dt>1.2. <a href="design">Design Document</a>
</dt><dd><dl>
<dt>1.2.1. <a href="design">Essentials</a>
</dt><dt>1.2.2. <a href="design">Introduction</a>
</dt><dt>1.2.3. <a href="design">Historical
Considerations</a>
</dt><dt>1.2.4. <a href="design">Competitive
Analysis</a>
</dt><dt>1.2.5. <a href="design">Design
Tradeoffs</a>
</dt><dt>1.2.6. <a href="design">API</a>
</dt><dt>1.2.7. <a href="design">Data
Model Discussion</a>
</dt><dt>1.2.8. <a href="design">User
Interface</a>
</dt><dt>1.2.9. <a href="design">Configuration/Parameters</a>
</dt><dt>1.2.10. <a href="design">Future
Improvements/Areas of Likely Change</a>
</dt><dt>1.2.11. <a href="design">Authors</a>
</dt><dt>1.2.12. <a href="design">Revision
History</a>
</dt>
</dl></dd>
</dl></dd><dt>2. <a href="users-guide">User's guide</a>
</dt>
</dl></div>
</div>
<div class="NAVFOOTER">
<hr align="left" width="100%"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="33%" align="left" valign="top"> </td><td width="34%" align="center" valign="top"> </td><td width="33%" align="right" valign="top"><a href="dev-guide">Next</a></td>
</tr><tr>
<td width="33%" align="left" valign="top"> </td><td width="34%" align="center" valign="top"> </td><td width="33%" align="right" valign="top">Developer's guide</td>
</tr>
</table>
</div>
<property name="context">{/doc/general-comments {General Comments}} {User's guide}</property>
<property name="doc(title)">User's guide</property>
<master>
<div class="NAVHEADER"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><th colspan="3" align="center">General Comments</th></tr><tr>
<td width="10%" align="left" valign="bottom"><a href="design">Prev</a></td><td width="80%" align="center" valign="bottom"></td><td width="10%" align="right" valign="bottom"> </td>
</tr>
</table></div>
<div class="chapter"><h1><a name="users-guide" id="users-guide">Chapter 2. User's
guide</a></h1></div>
<div class="NAVFOOTER">
<hr align="left" width="100%"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="33%" align="left" valign="top"><a href="design">Prev</a></td><td width="34%" align="center" valign="top"><a href="index">Home</a></td><td width="33%" align="right" valign="top"> </td>
</tr><tr>
<td width="33%" align="left" valign="top">Design Document</td><td width="34%" align="center" valign="top"> </td><td width="33%" align="right" valign="top"> </td>
</tr>
</table>
</div>
......@@ -142,3 +142,9 @@ db_transaction {
ad_returnredirect [export_vars -base view-comment {{comment_id $parent_id} return_url}]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -44,3 +44,9 @@ ad_return_template "file-ae"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -17,3 +17,9 @@ ad_page_contract {
permission::require_permission -object_id $item_id -privilege read
cr_write_content -item_id $item_id
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -34,3 +34,9 @@ ad_returnredirect [export_vars -base view-comment {{comment_id $parent_id} retur
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -41,3 +41,9 @@ set context [list [list "view-comment?comment_id=$parent_id" "[_ general-comment
set target "file-edit-2"
ad_return_template "file-ae"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -3,8 +3,9 @@
<property name="context">@context;literal@</property>
<if @admin_p@ eq 1>
[ <a href="admin/">#general-comments.Administer#</a> ]
<div style="float: right;">[ <a href="admin/">#general-comments.Administer#</a> ]</div>
</if>
<h1>#general-comments.Comments_of#</h1>
<p>
@dimensional_bar;noquote@
<p>
......
......@@ -29,6 +29,7 @@ set admin_p [permission::permission_p -object_id $package_id -privilege admin]
# this page with the proper parameters
set return_url [ns_urlencode index?[export_ns_set_vars url]]
set user_name [person::name -person_id $user_id]
set dimensional [list \
[list approval "[_ general-comments.Status]" any [list \
......@@ -91,3 +92,9 @@ set context {}
ad_return_template
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -49,3 +49,9 @@ set return_url [ad_conn url]
set params_url [export_vars -base /shared/parameters {package_id return_url}]
ad_return_template
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -52,3 +52,9 @@ ad_returnredirect [export_vars -base view-comment {{comment_id $parent_id} retur
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -45,3 +45,9 @@ ad_return_template "url-ae"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -32,3 +32,9 @@ ad_returnredirect [export_vars -base view-comment {{comment_id $parent_id} retur
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -38,3 +38,9 @@ set context [list [list "view-comment?comment_id=$parent_id" "[_ general-comment
set target "url-edit-2"
ad_return_template "url-ae"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -135,3 +135,9 @@ if { $live_revision ne $revision_id } {
}
ad_return_template
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -41,3 +41,9 @@ set context [list [list "$return_url" "[_ general-comments.Go_back_to_comment]"]
ad_return_template
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment