Commit bf129e54 authored by Frank Bergmann's avatar Frank Bergmann

- XoWiki Integration:

  Added integration for companies and conf-items
parent aa83cee8
......@@ -34,13 +34,19 @@ set last_url_piece [lindex $url_pieces end]
set user_id [ad_get_user_id]
# Convert the name of the page into project_id, user_id or ticket_id
if {![info exists project_id]} {
set project_id [db_string pid "select project_id from im_projects where project_nr = :last_url_piece" -default ""]
}
if {![info exists project_id]} { set project_id [db_string pid "select project_id from im_projects where project_nr = :last_url_piece" -default ""] }
if {"" == $project_id} { set project_id [db_string pid "select max(project_id) from im_projects where parent_id is null" -default ""] }
# Convert the name of the page into company_id, user_id or ticket_id
if {![info exists company_id]} { set company_id [db_string pid "select company_id from im_companies where company_path = :last_url_piece" -default ""] }
if {"" == $company_id} { set company_id [db_string pid "select max(company_id) from im_companies" -default ""] }
# Convert the name of the page into conf_item_id, user_id or ticket_id
if {![info exists conf_item_id]} { set conf_item_id [db_string pid "select conf_item_id from im_conf_items where conf_item_nr = :last_url_piece" -default ""] }
if {"" == $conf_item_id} { set conf_item_id [db_string pid "select max(conf_item_id) from im_conf_items" -default ""] }
if {"" == $project_id} {
set project_id [db_string pid "select max(project_id) from im_projects where parent_id is null" -default ""]
}
# -------------------------------------------------------------
......
::xowiki::Page new -title "company-template" -text {
<p>This is some text at the very top of the page.</p>
>>right-col<<
<p>This is the beginning of the right column.</p>
<p>
{{adp portlets/portlet {portlet "Company Employees"}}} <br />
{{adp portlets/portlet {portlet "Company Contacts"}}} <br />
{{adp portlets/portlet {portlet "Company Offices"}}} <br />
</p>
<p>This is the end of the right column.</p>
>><<
<p>
<p>This is the beginning of the main or left column.</p>
{{adp portlets/portlet {portlet "Company Information"}}} <br />
{{adp portlets/portlet {portlet "Company Projects"}}} <br />
{{adp portlets/portlet {portlet "Company Notes"}}} <br />
{{adp portlets/portlet {portlet "Company Survey Component"}}} <br />
</p>
<p>This is the end of the main or left column.</p>
}
::xowiki::Page new -title "conf-item-template" -text {
<p>This is some text at the very top of the page.</p>
>>right-col<<
<p>This is the beginning of the right column.</p>
<p>
{{adp portlets/portlet {portlet "Conf Item Members"}}} <br />
{{adp portlets/portlet {portlet "Conf Item Related Objects"}}} <br />
</p>
<p>This is the end of the right column.</p>
>><<
<p>
<p>This is the beginning of the main or left column.</p>
{{adp portlets/portlet {portlet "Conf Item Base Data"}}} <br />
{{adp portlets/portlet {portlet "Conf Item CVS Logs"}}} <br />
{{adp portlets/portlet {portlet "Conf Item Filestorage"}}} <br />
</p>
<p>This is the end of the main or left column.</p>
}
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