Commit a6086f07 authored by Frank Bergmann's avatar Frank Bergmann
parents 9064128c 41bb6bfd
......@@ -36,8 +36,8 @@ ad_page_contract {
sort_order:integer
aux_int1:integer
aux_int2:integer
aux_string1
aux_string2
aux_string1:allhtml
aux_string2:allhtml
visible_tcl
category_description:allhtml
category_type
......
<master src="../master">
<master>
<property name="doc(title)">@company_name;literal@</property>
<property name="main_navbar_label">companies</property>
<property name="left_navbar">@left_navbar_html;literal@</property>
<property name="sub_navbar">@sub_navbar;literal@</property>
<!-- left - right - bottom design -->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td valign="top" width="50%">
<%= [im_component_bay left] %>
</td>
<td width="2">&nbsp;</td>
<td valign="top">
<!-- Component Bay Right -->
<%= [im_component_bay right] %>
<!-- End Component Bay Right -->
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td>
<%= [im_component_bay bottom] %>
</td></tr>
</table>
<% if {"" eq $view_name || "standard" eq $view_name} { %>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td>
<%= [im_component_bay top] %>
</td></tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td valign="top" width="50%">
<%= [im_component_bay left] %>
</td>
<td width="2">&nbsp;</td>
<td valign="top">
<%= [im_component_bay right] %>
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td>
<%= [im_component_bay bottom] %>
</td></tr>
</table>
<% } elseif {"files" eq $view_name} { %>
<div id="position_filestorage_view_files">
<%= [im_component_insert "Companies Filestorage Component"] %>
</div>
<% } else { %>
<%= [im_component_page -plugin_id $plugin_id -return_url "/intranet/companies/view?company_id=$company_id"] %>
<% } %>
......@@ -27,6 +27,7 @@ ad_page_contract {
{ forum_order_by "" }
show_all_correspondance_comments:integer,optional
{ plugin_id "" }
{ view_name "" }
}
# -----------------------------------------------------------
......@@ -48,6 +49,14 @@ if {0 == $company_id} {
return
}
if {"" eq $view_name} {
if {"" eq $plugin_id} {
set view_name "standard"
} else {
set view_name "component"
}
}
# Check permissions. "See details" is an additional check for
# critical information
im_company_permissions $user_id $company_id view read write admin
......
......@@ -237,8 +237,8 @@ db_foreach column_list_sql $column_sql {
lappend column_vars "$column_render_tcl"
lappend column_headers_admin $admin_html
if {"" != $extra_select} { lappend extra_selects [eval "set a \"$extra_select\""] }
if {"" != $extra_from} { lappend extra_froms $extra_from }
if {"" != $extra_where} { lappend extra_wheres $extra_where }
if {"" != $extra_from} { lappend extra_froms [eval "set a \"$extra_from\""] }
if {"" != $extra_where} { lappend extra_wheres [eval "set a \"$extra_where\""] }
if {"" != $order_by_clause &&
$order_by==$column_name} {
set view_order_by_clause $order_by_clause
......@@ -497,26 +497,13 @@ switch [string tolower $order_by] {
}
set where_clause [join $criteria " and\n "]
if { $where_clause ne "" } {
set where_clause " and $where_clause"
}
if { $where_clause ne "" } { set where_clause " and $where_clause" }
set extra_select [join $extra_selects ",\n\t"]
if { $extra_select ne "" } {
set extra_select ",\n\t$extra_select"
}
if { $extra_select ne "" } { set extra_select ",\n\t$extra_select" }
set extra_from [join $extra_froms ",\n\t"]
if { $extra_from ne "" } {
set extra_from ",\n\t$extra_from"
}
if { $extra_from ne "" } { set extra_from ",\n\t$extra_from" }
set extra_where [join $extra_wheres "and\n\t"]
if { $extra_where ne "" } {
set extra_where ",\n\t$extra_where"
}
if { $extra_where ne "" } { set extra_where " and\n\t$extra_where" }
# Create a ns_set with all local variables in order
......
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