Commit 6e785dd6 authored by Frank Bergmann's avatar Frank Bergmann

brought forums to run - I still need to check

if potential asignees of tasks and incidents are
calculated correctly and if the read permissions
...
parent 2b9e4604
This diff is collapsed.
This diff is collapsed.
...@@ -25,7 +25,7 @@ set user_id [ad_maybe_redirect_for_registration] ...@@ -25,7 +25,7 @@ set user_id [ad_maybe_redirect_for_registration]
set page_body "<PRE>\n" set page_body "<PRE>\n"
if {$return_url == ""} { if {$return_url == ""} {
set return_url "/intranet/forum/" set return_url "/intranet-forum/"
} }
set topic_list [array names topic_id] set topic_list [array names topic_id]
......
...@@ -79,7 +79,7 @@ set forum_topic_types [im_memoize_list select_forum_topic_types \ ...@@ -79,7 +79,7 @@ set forum_topic_types [im_memoize_list select_forum_topic_types \
"select * from im_forum_topic_types order by topic_type_id"] "select * from im_forum_topic_types order by topic_type_id"]
set forum_topic_types [linsert $forum_topic_types 0 1 "Tasks & Incidents"] set forum_topic_types [linsert $forum_topic_types 0 1 "Tasks & Incidents"]
set forum_topic_types [linsert $forum_topic_types 0 0 All] set forum_topic_types [linsert $forum_topic_types 0 0 All]
ns_log Notice "/intranet/forum/index: forum_topic_types=$forum_topic_types" ns_log Notice "/intranet-forum/index: forum_topic_types=$forum_topic_types"
# project_types will be a list of pairs of (project_type_id, project_type) # project_types will be a list of pairs of (project_type_id, project_type)
set project_types [im_memoize_list select_project_types \ set project_types [im_memoize_list select_project_types \
...@@ -170,7 +170,7 @@ set page_body " ...@@ -170,7 +170,7 @@ set page_body "
$filter_html $filter_html
</form> </form>
[im_forum_navbar "/intranet/projects/index" [list forum_group_id forum_start_idx forum_order_byforum_how_many forum_mine_p forum_view_name]] [im_forum_navbar "/intranet-forum/index" [list forum_group_id forum_start_idx forum_order_byforum_how_many forum_mine_p forum_view_name]]
$forum_content $forum_content
......
...@@ -45,24 +45,6 @@ ad_page_contract { ...@@ -45,24 +45,6 @@ ad_page_contract {
{submit_clarify ""} {submit_clarify ""}
} }
# ------------------------------------------------------------------
# Procedures
# ------------------------------------------------------------------
ad_proc -public im_forum_topic_alert_user {
$topic_id
$owner_id
$asignee_id
$topic_status_id
$old_topic_status_id
} {
Returns 1/0 to indicate whether the specific user wants to be
informed about a specific event
} {
return 1
}
# ------------------------------------------------------------------ # ------------------------------------------------------------------
# Security, Parameters & Default # Security, Parameters & Default
# ------------------------------------------------------------------ # ------------------------------------------------------------------
...@@ -104,7 +86,7 @@ if {$topic_type_id == 1102 || $topic_type_id == 1104} { ...@@ -104,7 +86,7 @@ if {$topic_type_id == 1102 || $topic_type_id == 1104} {
if {"" != $comments} { if {"" != $comments} {
set user_name [db_string get_user_name [im_name_from_user_id(user_id)]] set user_name [db_string get_user_name "select im_name_from_user_id(:user_id) from dual"]
set today_date [db_string get_today_date "select sysdate from dual"] set today_date [db_string get_today_date "select sysdate from dual"]
append message "\n\n\[Comment from $user_name on $today_date\]:\n$comments" append message "\n\n\[Comment from $user_name on $today_date\]:\n$comments"
} }
...@@ -115,7 +97,7 @@ if {"" != $comments} { ...@@ -115,7 +97,7 @@ if {"" != $comments} {
if {[string equal $actions "reply"]} { if {[string equal $actions "reply"]} {
ad_returnredirect "/intranet-forum/forum/new-tind" ad_returnredirect "/intranet-forum/new-tind"
} }
...@@ -217,10 +199,11 @@ if {$asignee_id != $old_asignee_id} { ...@@ -217,10 +199,11 @@ if {$asignee_id != $old_asignee_id} {
# Always send a mail to a new asignee # Always send a mail to a new asignee
# #
set msg_url "[ad_parameter SystemUrl]" set msg_url "[ad_parameter SystemUrl]"
append msg_url "/intranet-forum/forum/view?topic_id=$topic_id" append msg_url "/intranet-forum/view?topic_id=$topic_id"
set topic_type [db_string topic_type "select category from im_categories where category_id=:topic_type_id"] set topic_type [db_string topic_type "select category from im_categories where category_id=:topic_type_id"]
set msg_subject "New $topic_type: $subject" set msg_subject "New $topic_type: $subject"
im_send_alert $asignee_id "hourly" $msg_url $msg_subject $message # im_send_alert $asignee_id "hourly" $msg_url $msg_subject $message
###!!! ToDo: enable alerts
# Inform the owner about the change except if it iss a client # Inform the owner about the change except if it iss a client
# or if it is someone who # or if it is someone who
...@@ -255,7 +238,7 @@ where m.topic_id=:topic_id ...@@ -255,7 +238,7 @@ where m.topic_id=:topic_id
db_foreach update_stakeholders $stakeholder_sql { db_foreach update_stakeholders $stakeholder_sql {
set msg_url "[ad_parameter SystemUrl]" set msg_url "[ad_parameter SystemUrl]"
append msg_url "/intranet-forum/forum/view?topic_id=$topic_id" append msg_url "/intranet-forum/view?topic_id=$topic_id"
set topic_type [db_string topic_type "select category from im_categories where category_id=:topic_type_id"] set topic_type [db_string topic_type "select category from im_categories where category_id=:topic_type_id"]
set msg_subject "Closed $topic_type: $subject" set msg_subject "Closed $topic_type: $subject"
im_send_alert $asignee_id "hourly" $msg_url $msg_subject $message im_send_alert $asignee_id "hourly" $msg_url $msg_subject $message
...@@ -292,7 +275,7 @@ where m.topic_id=:topic_id ...@@ -292,7 +275,7 @@ where m.topic_id=:topic_id
db_foreach update_stakeholders $stakeholder_sql { db_foreach update_stakeholders $stakeholder_sql {
set msg_url "[ad_parameter SystemUrl]" set msg_url "[ad_parameter SystemUrl]"
append msg_url "/intranet-forum/forum/view?topic_id=$topic_id" append msg_url "/intranet-forum/view?topic_id=$topic_id"
set topic_type [db_string topic_type "select category from im_categories where category_id=:topic_type_id"] set topic_type [db_string topic_type "select category from im_categories where category_id=:topic_type_id"]
set msg_subject "Accepted $topic_type: $subject" set msg_subject "Accepted $topic_type: $subject"
im_send_alert $asignee_id "hourly" $msg_url $msg_subject $message im_send_alert $asignee_id "hourly" $msg_url $msg_subject $message
......
This diff is collapsed.
...@@ -31,7 +31,7 @@ if {"" == $return_url} { ...@@ -31,7 +31,7 @@ if {"" == $return_url} {
} }
set page_title "View Topic" set page_title "View Topic"
set context_bar [ad_context_bar [list /intranet/forum/ Forum] $page_title] set context_bar [ad_context_bar [list /intranet-forum/ Forum] $page_title]
# -------------- Get the tree -------------------------- # -------------- Get the tree --------------------------
......
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