Commit 8a8648c1 authored by Frank Bergmann's avatar Frank Bergmann

- V4.0.3.0.0:

  Updated to OpenACS 5.7
parent a8cc2351
......@@ -8,22 +8,22 @@
<singleton-p>f</singleton-p>
<implements-subsite-p>t</implements-subsite-p>
<version name="5.6.0" url="http://openacs.org/repository/download/apm/acs-subsite-5.6.0.apm">
<version name="5.7.0" url="http://openacs.org/repository/download/apm/acs-subsite-5.7.0.apm">
<owner url="http://openacs.org">OpenACS</owner>
<summary>Subsite</summary>
<release-date>2010-06-17</release-date>
<release-date>2011-06-12</release-date>
<vendor url="http://openacs.org">OpenACS</vendor>
<description format="text/html">Provides for creating subsites within the OpenACS Community System. Aware of parties, groups, users, portraits. Can be themed via a per subsite master template.</description>
<license>GPL</license>
<maturity>3</maturity>
<provides url="acs-subsite" version="5.6.0"/>
<requires url="acs-authentication" version="5.6.0"/>
<requires url="acs-content-repository" version="5.6.0"/>
<requires url="acs-kernel" version="5.6.0"/>
<requires url="acs-tcl" version="5.6.0"/>
<requires url="acs-lang" version="5.6.0"/>
<requires url="acs-mail-lite" version="5.6.0"/>
<provides url="acs-subsite" version="5.7.0"/>
<requires url="acs-authentication" version="5.7.0"/>
<requires url="acs-content-repository" version="5.7.0"/>
<requires url="acs-kernel" version="5.7.0"/>
<requires url="acs-tcl" version="5.7.0"/>
<requires url="acs-lang" version="5.7.0"/>
<requires url="acs-mail-lite" version="5.7.0"/>
<callbacks>
<callback type="after-install" proc="subsite::package_install"/>
......
This diff is collapsed.
This diff is collapsed.
......@@ -268,7 +268,12 @@ ad_form -extend -name login -on_request {
} else {
# Display the message on a separate page
ad_returnredirect [export_vars -base "[subsite::get_element -element url]register/account-closed" { { message $auth_info(account_message) } }]
ad_returnredirect \
-message $auth_info(account_message) \
-html \
[export_vars \
-base "[subsite::get_element \
-element url]register/account-closed"]
ad_script_abort
}
}
......
......@@ -137,7 +137,12 @@ ad_form -extend -name register -on_request {
}
default {
# Display the message on a separate page
ad_returnredirect [export_vars -base "[subsite::get_element -element url]register/account-closed" { { message $creation_info(account_message) } }]
ad_returnredirect \
-message $creation_info(account_message) \
-html \
[export_vars \
-base "[subsite::get_element \
-element url]register/account-closed"]
ad_script_abort
}
}
......
......@@ -13,10 +13,10 @@ create table subsite_themes (
constraint subsite_themes_key_pk
primary key,
name varchar(100)
constraint subsite_theme_name_nn
constraint subsite_themes_name_nn
not null,
template varchar(200)
constraint subsite_theme_template_nn
constraint subsite_themes_template_nn
not null,
css varchar(2000),
form_template varchar(200),
......
......@@ -13,10 +13,10 @@ create table subsite_themes (
constraint subsite_themes_key_pk
primary key,
name text
constraint subsite_theme_name_nn
constraint subsite_themes_name_nn
not null,
template text
constraint subsite_theme_template_nn
constraint subsite_themes_template_nn
not null,
css text,
form_template text,
......
......@@ -13,10 +13,10 @@ create table subsite_themes (
constraint subsite_theme_key_pk
primary key,
name text
constraint subsite_theme_name_nn
constraint subsite_themes_name_nn
not null,
template text
constraint subsite_theme_template_nn
constraint subsite_themes_template_nn
not null,
css text,
form_template text,
......
......@@ -218,6 +218,7 @@ namespace eval rel_types {
Add a permissible relationship for a given group type
} {
if {[catch {
set group_rel_type_id [db_nextval acs_object_id_seq]
db_dml insert_rel_type {}
} errmsg]} {
}
......
......@@ -23,7 +23,7 @@ update acs_object_types set dynamic_p='t' where object_type = :rel_type
insert into group_type_rels
(group_rel_type_id, group_type, rel_type)
values
(acs_object_id_seq.nextval, :group_type, :rel_type)
(:group_rel_type_id, :group_type, :rel_type)
</querytext>
</fullquery>
......
......@@ -6,5 +6,5 @@
<formtemplate id="application"></formtemplate>
<ul class="action-links">
<li><a href="@multiple_add_url@">Add multiple applications</a></li>
<li><a href="@multiple_add_url@">#acs-subsite.Add_multiple_applications#</a></li>
</ul>
......@@ -9,7 +9,7 @@ ad_page_contract {
{return_url "."}
}
set page_title "New Application"
set page_title "[_ acs-subsite.New_Application]"
set context [list [list "." "Applications"] $page_title]
set packages [subsite::get_application_options]
......@@ -26,18 +26,18 @@ ad_form -name application -cancel_url . -form {
{return_url:text(hidden),optional}
{node_id:key}
{package_key:text(select)
{label "Application"}
{label "[_ acs-subsite.Application]"}
{options $packages}
{help_text "The type of application you want to add. If the application is not in the list, you may need to <a href=\"/acs-admin/install/\">install</a> it on the server."}
{mode {[ad_decode [ad_form_new_p -key node_id] 1 "" "display"]}}
}
{instance_name:text,optional
{label "Application name"}
{label "[_ acs-subsite.Application_name]"}
{help_text "The human-readable name of your application. If blank, the name of the application is used (e.g. 'Forums')."}
{html {size 50}}
}
{folder:text,optional
{label "URL folder name"}
{label "[_ acs-subsite.URL_folder_name]"}
{help_text "The partial URL of the new application. This should be a short string, all lowercase, with hyphens instead of spaces. If blank, the package name is used (e.g. 'forum')."}
{html {size 30}}
}
......
......@@ -6,7 +6,7 @@ ad_page_contract {
@cvs-id $Id$
}
set page_title "Applications"
set page_title "[_ acs-subsite.Applications]"
set context [list $page_title]
# Get the subsite node ID
......@@ -26,49 +26,49 @@ list::create \
-multirow applications \
-key node_id \
-actions {
"Add application" application-add "Add new application"
"#acs-subsite.Add_application#" application-add "#acs-subsite.Add_new_app#"
} \
-bulk_actions {
"Delete" application-delete "Delete selected applications"
"#acs-subsite.Delete#" application-delete "#acs-subsite.Delete_selected_app#"
} \
-elements {
edit {
sub_class narrow
display_template {
<img src="/shared/images/Edit16.gif" height="16" width="16" alt="Edit application name and path" style="border:0">
<img src="/shared/images/Edit16.gif" height="16" width="16" alt="#acs-subsite.Edit_application_name_and_path#" style="border:0">
}
link_url_eval {[export_vars -base application-add { node_id }]}
link_html { title "Edit application name and path" }
link_html { title "#acs-subsite.Edit_application_name_and_path#" }
}
instance_name {
label "Name"
label "[_ acs-subsite.Name]"
link_url_eval {../../$name/}
}
name {
label "URL"
label "[_ acs-subsite.URL]"
}
package_pretty_name {
label "Application"
label "[_ acs-subsite.Application]"
}
permissions {
label "Permissions"
label "[_ acs-subsite.Permissions]"
link_url_eval {[export_vars -base permissions { package_id }]}
display_template {Permissions}
display_template { #acs-subsite.Permissions# }
sub_class narrow
}
parameters {
label "Parameters"
label "[_ acs-subsite.Parameters]"
link_url_col parameter_url
display_template {<if @applications.parameter_url@ not nil>Parameters</if>}
display_template {<if @applications.parameter_url@ not nil>[_ acs-subsite.Parameters]</if>}
sub_class narrow
}
delete {
sub_class narrow
display_template {
<img src="/shared/images/Delete16.gif" height="16" width="16" alt="Delete this application" style="border:0">
<img src="/shared/images/Delete16.gif" height="16" width="16" alt="#acs-subsite.Delete_this_application#" style="border:0">
}
link_url_eval {[export_vars -base application-delete { node_id }]}
link_html { title "Delete this application" }
link_html { title "#acs-subsite.Delete_this_application#" }
}
}
......
<master>
<property name="title">@page_title@</property>
<property name="doc(title)">@doc.title@</property>
<property name="context">@context@</property>
<property name="focus">application.package_key</property>
......
......@@ -8,16 +8,16 @@ ad_page_contract {
{return_url "."}
}
set page_title "Add Applications"
set context [list [list "." "Applications"] $page_title]
set doc(title) "[_ acs-subsite.Add_multiple_applications]"
set context [list [list "." [_ acs-subsite.Applications]] $doc(title)]
set packages [subsite::get_application_options]
ad_form -name application -cancel_url . -export { return_url } -form {
{package_key:text(checkbox),multiple
{label "Select Applications"}
{label "[_ acs-subsite.Select_Applications]"}
{options $packages}
{help_text "If the application is not in the list, you may need to <a href=\"/acs-admin/install/\">install</a> it on the server."}
{help_text "[_ acs-subsite.Select_Applications__helptext]"}
}
} -on_submit {
# Find the package pretty name from the list of packages
......
......@@ -6,32 +6,32 @@ ad_page_contract {
@cvs-id $Id$
}
set page_title "Subsite Configuration"
set page_title "[_ acs-subsite.Subsite_Configuration]"
set context [list "Configuration"]
set context [list "[_ acs-subsite.Configuration]"]
set group_id [application_group::group_id_from_package_id]
ad_form -name name -cancel_url [ad_conn url] -mode display -form {
{instance_name:text
{label "Subsite name"}
{label "[_ acs-subsite.Subsite_name]"}
{html {size 50}}
}
{theme:text(select)
{label "Theme"}
{label "[_ acs-subsite.Theme]"}
{help_text "Choose the layout and navigation theme you want for your subsite."}
{options [subsite::get_theme_options]}
}
{visibility:text(select)
{label "Visible to"}
{options { { "Members only" "members" } { "Anyone" "any" } }}
{label "[_ acs-subsite.Visible_to]"}
{options { { "[_ acs-subsite.Members_only]" "members" } { "[_ acs-subsite.Anyone]" "any" } }}
}
{join_policy:text(select)
{label "Join policy"}
{label "[_ acs-subsite.Join_policy]"}
{options [group::get_join_policy_options]}
}
{description:text(textarea),optional
{label "Description"}
{label "[_ acs-subsite.Description]"}
{html { rows 6 cols 80 }}
}
} -on_request {
......
<master>
<property name="doc(title)">@doc.title@</property>
<property name="context">@context;noquote@</property>
<property name="title">Group type administration</property>
Currently, the system is able to handle the following types of groups:
<h1>@doc.title@</h1>
<p>#acs-subsite.Currently_the_system_is#:</p>
<ul>
<if @group_types:rowcount@ eq 0>
<li>(none)</li>
<li>#acs-subsite.none#</li>
</if>
<else>
<multiple name="group_types">
<li> @group_types.indent;noquote@<a href="one?group_type=@group_types.group_type@">@group_types.pretty_plural@</a> (number of groups defined: @group_types.number_groups@)
<li> @group_types.indent;noquote@<a href="one?group_type=@group_types.group_type@">@group_types.pretty_plural@</a> (#acs-subsite.number_of_groups_defined#: @group_types.number_groups@)
</li>
</multiple>
</else>
<p>
<li><a href="new">Define a new group type</a>
</ul>
<p><a href="new" class="button">#acs-subsite.Define_a_new_group_type#</a></p>
......@@ -13,7 +13,8 @@ ad_page_contract {
group_types:multirow
}
set context [list "Group types"]
set doc(title) [_ acs-subsite.Group_type_administration]
set context [list [_ acs-subsite.Group_Types]]
# we may want to move the inner count to get the number of groups of
# each type to its own pl/sql function. That way, we execute the
......
<master>
<property name="context">@context;noquote@</property>
<property name="title">Add group type</property>
<property name="doc(title)">@doc.title@</property>
<property name="focus">group_type.object_type</property>
<h1>@doc.title@</h1>
<formtemplate id="group_type"></formtemplate>
......@@ -16,13 +16,14 @@ ad_page_contract {
context:onevalue
}
set context [list [list "[ad_conn package_url]admin/group-types/" "Group types"] "Add type"]
set doc(title) [_ acs-subsite.Add_group_type]
set context [list [list "[ad_conn package_url]admin/group-types/" [_ acs-subsite.Group_Types]] [_ acs-subsite.Add_type]]
template::form create group_type
template::element create group_type object_type \
-datatype "text" \
-label "Group type" \
-label "[_ acs-subsite.Group_type]" \
-html { size 30 maxlength 30 }
set supertype_options [db_list_of_lists "select_group_supertypes" {
......@@ -38,16 +39,16 @@ template::element create group_type supertype \
-datatype "text" \
-widget select \
-options $supertype_options_i18n \
-label "Supertype"
-label "[_ acs-subsite.Supertype]"
template::element create group_type pretty_name \
-datatype "text" \
-label "Pretty name" \
-label "[_ acs-subsite.Pretty_name]" \
-html { size 50 maxlength 100 }
template::element create group_type pretty_plural \
-datatype "text" \
-label "Pretty plural" \
-label "[_ acs-subsite.Pretty_plural]" \
-html { size 50 maxlength 100 }
set approval_policy_options {
......
<master>
<property name="context">@context;noquote@</property>
<property name="title">Group Type "@group_type_pretty_name;noquote@"</property>
<property name="doc(title)">@doc.title@</property>
<h4>Groups of this type</h4>
<h1>@doc.title@</h1>
<h2>#acs-subsite.Groups_of_this_type#</h2>
<ul>
<if @groups:rowcount@ eq 0>
<li>(none)</li>
<li>(#acs-subsite.none#)</li>
</if>
<else>
<multiple name="groups">
<if @groups.rownum@ gt 25>
<li> <a href="groups-display?group_type=@group_type_enc@">View all groups of this type</a> </li>
<li> <a href="groups-display?group_type=@group_type_enc@">#acs-subsite.View_all_groups_of_this_type#</a> </li>
</if>
<else>
<li> <a href="../groups/one?group_id=@groups.group_id@">@groups.group_name@</a> </li>
</else>
</multiple>
</else>
<p><li> <a href=../parties/new?party_type=@group_type_enc@&add_with_rel_type=composition_rel&return_url=@return_url_enc@>Add a group of this type</a>
</ul>
<ul>
<li><a href="@add_group_url@">#acs-subsite.Add_a_group_of_this_type#</a></li>
</ul>
<h4>Attributes of this type of group</h4>
<h2>#acs-subsite.Attributes_of_this_type_of_group#</h2>
<ul>
<multiple name="attributes">
<if @attributes.ancestor_type@ eq @group_type_enc@>
<li> <a href="../attributes/one?attribute_id=@attributes.attribute_id@&return_url=@return_url_enc@">@attributes.pretty_name@</a>
</if><else>
<li> @attributes.pretty_name@ (via <a href=one?group_type=@attributes.ancestor_type@>@attributes.ancestor_pretty_name@</a>)
<li><a href="@attributes.one_attribute_url@">@attributes.pretty_name@</a></li>
</if>
<else>
<li>@attributes.pretty_name@ (via <a href="one?group_type=@attributes.ancestor_type@">@attributes.ancestor_pretty_name@</a>)</li>
</else>
</li>
</multiple>
<if @attributes:rowcount@ eq 0>
<li>(none)</li>
<li>#acs-subsite.none#</li>
</if>
</ul>
<ul>
<if @dynamic_p@ eq "t">
<p><li> <a href="../attributes/add?object_type=@group_type_enc@&return_url=@return_url_enc@">Add an attribute</a>
</if><else>
<p><li> Attributes can only be added by programmers since this object type is not dynamically created
<li><a href="@add_attribute_url@">#acs-subsite.Add_an_attribute#</a></li>
</if>
<else>
<li>#acs-subsite.Attributes_can_only_be_added_by_programmers#</li>
</else>
</ul>
<h4>Default allowed relationship types</h4>
<h2>#acs-subsite.Default_allowed_relationship_types#</h2>
You can specify the default types of relationships that can be used
for groups of this type. Note that each group can later change its
allowed relationship types.
<p>#acs-subsite.You_can_specify_the_default_types_of#</p>
<ul>
<if @allowed_relations:rowcount@ eq 0>
<li>(none)</li>
</if></else>
<li>#acs-subsite.none#</li>
</if>
<else>
<multiple name="allowed_relations">
<li> <a href=../rel-types/one?rel_type=@allowed_relations.rel_type@>@allowed_relations.pretty_name@</a> (<a href=rel-type-remove?group_rel_type_id=@allowed_relations.group_rel_type_id@>remove</a>)
<li><a href="../rel-types/one?rel_type=@allowed_relations.rel_type@">@allowed_relations.pretty_name@</a> (<a href="rel-type-remove?group_rel_type_id=@allowed_relations.group_rel_type_id@">#acs-subsite.remove#</a>)</li>
</multiple>
</else>
<p><li> <a href="rel-type-add?group_type=@group_type_enc@">Add a permissible relationship type</a> </li>
</ul>
<ul>
<li><a href="rel-type-add?group_type=@group_type_enc@">#acs-subsite.Add_a_permissible_relationship_type#</a></li>
</ul>
<h4>Administration</h4>
<h2>#acs-subsite.Administration#</h2>
<ul>
<if @dynamic_p@ eq "t">
<li> Default join policy: @default_join_policy@
(<a href=change-join-policy?group_type=@group_type_enc@>edit</a>)
<li> <a href=delete?group_type=@group_type_enc@>Delete this group type</a>
</if><else>
<li> This group type can only be administered by programmers
<li>#acs-subsite.Default_join_policy#: @default_join_policy@
(<a href="change-join-policy?group_type=@group_type_enc@">#acs-subsite.edit#</a>)
</li>
<li> <a href="delete?group_type=@group_type_enc@">#acs-subsite.Delete_this_group_type#</a>
</li>
</if>
<else>
<li>#acs-subsite.This_group_type_can_only_be_administered_by_programmers#</li>
</else>
</ul>
......@@ -29,8 +29,6 @@ set group_type_enc [ad_urlencode $group_type]
set package_id [ad_conn package_id]
set context [list [list "[ad_conn package_url]admin/group-types/" "Group types"] "One type"]
if { ![db_0or1row select_pretty_name {
select t.pretty_name as group_type_pretty_name, t.dynamic_p,
nvl(gt.default_join_policy, 'open') as default_join_policy
......@@ -42,6 +40,10 @@ if { ![db_0or1row select_pretty_name {
return
}
set doc(title) [_ acs-subsite.Details_for__group_type_pretty_name]
set context [list [list "[ad_conn package_url]admin/group-types/" [_ acs-subsite.Group_Types]] $group_type_pretty_name]
# Pull out the first 25 groups of this type. If there are more, we'll
# offer a link to display them all. Alphabetize the first 25 groups
......@@ -63,7 +65,7 @@ db_multirow groups groups_select {
}
# Select out all the attributes for groups of this type
db_multirow attributes attributes_select {
db_multirow -extend {one_attribute_url} attributes attributes_select {
select a.attribute_id, a.pretty_name,
a.ancestor_type, t.pretty_name as ancestor_pretty_name
from acs_object_type_attributes a,
......@@ -74,9 +76,13 @@ db_multirow attributes attributes_select {
where a.object_type = :group_type
and t.object_type = a.ancestor_type
order by type_level
} {
set one_attribute_url [export_vars -url -base "../attributes/one" {attribute_id {return_url $return_url_enc}}]
}
# Select out all the allowed relationship types
db_multirow allowed_relations relations_select {
select t.pretty_name, g.rel_type, g.group_rel_type_id
......@@ -89,4 +95,11 @@ db_multirow allowed_relations relations_select {
# See if we need to offer a link to add a rel type
set more_relation_types_p [rel_types::additional_rel_types_p -group_type $group_type]
set add_group_url [export_vars -url -base "../parties/new" {{party_type $group_type} {add_with_rel_type composition_rel} {return_url $return_url_enc}}]
set add_attribute_url [export_vars -url -base "../attributes/add" {{object_type $group_type} {return_url $return_url_enc}}]
ad_return_template
......@@ -31,11 +31,13 @@ ad_page_contract {
}
if { [catch {db_dml insert_rel_type {
if { [catch {
set group_rel_type_id [db_nextval acs_object_id_seq]
db_dml insert_rel_type {
insert into group_type_rels
(group_rel_type_id, group_type, rel_type)
values
(acs_object_id_seq.nextval, :group_type, :rel_type)
(:group_rel_type_id, :group_type, :rel_type)
} } err_msg] } {
# Does this pair already exists?
if { ![db_string exists_p {select count(*) from group_type_rels where group_type = :group_type and rel_type = :rel_type}] } {
......
<master>
<property name="context">@context;noquote@</property>
<property name="title">Add permissible relationship type</property>
<property name="doc(title)">@doc.title@</property>
<h1>#acs-subsite.Add_relationship_for_group__group_type#</h1>
<if @primary_rels:rowcount@ eq "0">
There are no other relationship types that you can add. You can
<a href=../rel-types/new?return_url=@return_url_enc@>create a new relationship type</a> if you like.
<p>There are no other relationship types that you can add. You can <a href=../rel-types/new?return_url=@return_url_enc@>create a new relationship type</a> if you like.</p>
</if>
<else>
<form method=get action=rel-type-add-2>
@export_vars;noquote@
Select relation type:
<select name="rel_type">
<option value="" selected> -- Please select --
<multiple name="primary_rels">
<option value="@primary_rels.rel_type@"> @primary_rels.indent@ @primary_rels.pretty_name@
</multiple>
</select>
<center>
<input type=submit>
</center>
<form method="get" action="rel-type-add-2">
<div>@export_vars;noquote@</div>
<div>
<label for="rel_type">#acs-subsite.Select_relation_type#
<select name="rel_type" id="rel_type">
<option value="" selected> #acs-subsite.Please_select#</option>
<multiple name="primary_rels">
<option value="@primary_rels.rel_type@"> @primary_rels.indent;noquote@ @primary_rels.pretty_name@</option>
</multiple>
</select>
</label>
<input type="submit" value="OK">
</div>
</form>
<ul>
<li> <a href=../rel-types/new?return_url=@return_url_enc@>create a new relationship type</a> </li>
</ul>
<p>
<a href="../rel-types/new?return_url=@return_url_enc@" class="button">#acs-subsite.create_a_new_relationship_type#</a>
</p>
</else>
......@@ -19,7 +19,9 @@ ad_page_contract {
}
set return_url_enc [ad_urlencode "[ad_conn url]?[ad_conn query]"]
set context [list [list "[ad_conn package_url]admin/group-types/" "Group types"] [list one?[ad_export_vars {group_type}] "One type"] "Add relation type"]
set doc(title) [_ acs-subsite.Add_a_permissible_relationship_type]
set context [list [list "[ad_conn package_url]admin/group-types/" [_ acs-subsite.Group_Types]] [list one?[ad_export_vars {group_type}] $group_type] $doc(title)]
# Select out all the relationship types that are not currently
......
<if @group_types:rowcount@ eq 0>
<ul>
<li>(none)</li>
<li>#acs-subsite.none#</li>
</ul>
</if>
<else>
......
<ul>
<if @rels:rowcount@ eq 0>
<li>There are no allowable relationship types for this group</li>
</if>
<else>
<multiple name="rels">
<p><li> <b>@rels.role_pretty_plural@ (@rels.rel_type_pretty_name@)</b> </li>
<group column=rel_type>
<if @rels.num_rels@ nil>
<multiple name="rels">
<li><strong>@rels.role_pretty_plural@ (@rels.rel_type_pretty_name@)</strong>
<group column=rel_type>
<if @rels.num_rels@ nil>
<ul>
<li> There are currently no @rels.role_pretty_plural@ </li>
</ul>
</if>
<else>
<if @rels.num_rels@ gt 10>
<ul>
<li><a href="@elements_display_url@">Display all @rels.num_rels@ @rels.role_pretty_plural@</a> </li>
</ul>
</if>
<else>
<br>
<include src="elements-display-list" group_id="@group_id;noquote@" rel_type="@rels.rel_type;noquote@" return_url_enc="@return_url_enc;noquote@" member_state="approved">
</else>
</else>
</group>
<ul>
<li> There are currently no @rels.role_pretty_plural@ </li>
<li>#acs-subsite.Administration#
<ul>
<if @create_p@ eq 1 and @rels.rel_type_valid_p@ eq 1>
<li><a href="@relations_add_url@">Add @rels.role_pretty_name@</a> </li>
</if>
<li>Relational segment:
<if @rels.segment_id@ nil>
<em>#acs-subsite.none#</em> (<a href="../rel-segments/new?group_id=@group_id@&rel_type=@rels.rel_type@&return_url=@return_url_enc@">create segment</a>)
</if>
<else>
<a href="../rel-segments/one?segment_id=@rels.segment_id@">@rels.segment_name@</a>
</else>
</li>
<if @admin_p@ eq "1">
<li><a href="rel-type-remove?group_rel_id=@rels.group_rel_id@">Remove this relationship type</a></li>
</if>
</ul>
</li>
</ul>
</if><else>
<if @rels.num_rels@ gt 10>
<ul>
<li> <a href=elements-display?group_id=@group_id@&rel_type=@rels.rel_type@>Display all @rels.num_rels@ @rels.role_pretty_plural@</a> </li>
</ul>
</if><else>
<br>
<include src="elements-display-list" group_id="@group_id;noquote@" rel_type="@rels.rel_type;noquote@" return_url_enc=@return_url_enc;noquote@ member_state="approved">
</else>
</else>
</group>
<ul>
<p><li> Administration</li>
<ul>
<if @create_p@ eq 1 and @rels.rel_type_valid_p@ eq 1>
<li> <a href=../relations/add?group_id=@group_id@&rel_type=@rels.rel_type@&return_url=@return_url_enc@>Add @rels.role_pretty_name@</a> </li>
</if>
<li> Relational segment:
<if @rels.segment_id@ nil>
<em>none</em> (<a href=../rel-segments/new?group_id=@group_id@&rel_type=@rels.rel_type@&return_url=@return_url_enc@>create segment</a>) </li>
</if>
<else>
<a href="../rel-segments/one?segment_id=@rels.segment_id@">(@rels.segment_name@)</a> </li>
</else>
<if @admin_p@ eq "1">
<li> <a href=rel-type-remove?group_rel_id=@rels.group_rel_id@>Remove this relationship type</a> </li>
</if>
</ul>
</ul>
</multiple>
</li>
</multiple>
</else>
<p><li> <a href="rel-type-add?group_id=@group_id@">Add a permissible relationship type</a> </li>
<li> <a href="rel-type-add?group_id=@group_id@">#acs-subsite.Add_a_permissible_relationship_type#</a> </li>
</ul>
......@@ -30,7 +30,7 @@ set create_p [ad_permission_p $group_id "create"]
set return_url "[ad_conn url]?[ad_conn query]"
set return_url_enc [ad_urlencode $return_url]
db_multirow rels relations_query {
db_multirow -extend {elements_display_url relations_add_url} rels relations_query {
select g.rel_type, g.group_rel_id,
acs_object_type.pretty_name(g.rel_type) as rel_type_pretty_name,
s.segment_id, s.segment_name,
......@@ -66,4 +66,8 @@ db_multirow rels relations_query {
# to be localized before they are displayed
set role_pretty_name [lang::util::localize $role_pretty_name]
set role_pretty_plural [lang::util::localize $role_pretty_plural]
set elements_display_url [export_vars -url -base "elements-display" {group_id rel_type}]
set relations_add_url [export_vars -url -base "../relations/add" {group_id rel_type {return_url $return_url_enc}}]
}
<master>
<property name="doc(title)">@doc.title@</property>
<property name="context">@context;noquote@</property>
<property name="title">Group administration</property>
Currently, the @instance_name@ has the following groups:
<h1>@doc.title@</h1>
<p>
<p>@intro_text@</p>
<if @view_by@ eq group_type>
<b>
by group type
<strong>
#acs-subsite.by_group_type#
|
<a href=@this_url@?view_by=rel_type>relationship to site</a>
</b>
<a href="@this_url@?view_by=rel_type">#acs-subsite.relationship_to_site#</a>
</strong>
<include src="elements-by-group-type" group_id=@subsite_group_id;noquote@>
</if>
<else>
<b>
by <a href=@this_url@?view_by=group_type>group type</a>
<strong>
<a href="@this_url@?view_by=group_type">#acs-subsite.by_group_type#</a>
|
relationship to site
</b>
#acs-subsite.relationship_to_site#
</strong>
<include src="elements-by-rel-type" group_id=@subsite_group_id;noquote@>
</else>
To add a group, first select a group type above or go to the <a href=../group-types/>group type administration</a> page
\ No newline at end of file
<p>#acs-subsite.To_add_a_group_first_select_a_group_type_above_or_go_to_the#</p>
......@@ -24,7 +24,8 @@ ad_page_contract {
view_by:onevalue
}
set context [list "Groups"]
set context [list [_ acs-subsite.Groups]]
set doc(title) [_ acs-subsite.Group_administration]
set this_url [ad_conn url]
......@@ -37,5 +38,6 @@ db_1row subsite_info {
and ag.package_id = :package_id
}
set intro_text [lang::util::localize [_ acs-subsite.Currently_the_instance_name_has_the_following_groups]]
ad_return_template
......@@ -35,11 +35,13 @@ ad_page_contract {
}
}
if { [catch {db_dml insert_rel_type {
if { [catch {
set group_rel_id [db_nextval acs_object_id_seq]
db_dml insert_rel_type {
insert into group_rels
(group_rel_id, group_id, rel_type)
values
(acs_object_id_seq.nextval, :group_id, :rel_type)
(:group_rel_id, :group_id, :rel_type)
} } err_msg] } {
# Does this pair already exists?
if { ![db_string exists_p {
......
<master>
<property name="title">@page_title@</property>
<property name="doc(title)">@page_title@</property>
<property name="context">@context@</property>
<h3>Registered hostname/URL pairs</h3>
<h1>@page_title@</h1>
<h2>#acs-subsite.Registered_hostname_URL_pairs#</h2>
<listtemplate name="host_node_pairs"></listtemplate>
<h3>Add another hostname/URL pair</h3>
<h2>#acs-subsite.Add_another_hostname_URL_pair#</h2>
<formtemplate id="add_host_node_mapping"></formtemplate>
......@@ -6,8 +6,8 @@ ad_page_contract {
} {
}
set page_title "Host-Node Map"
set context [list "Host-Node Map"]
set page_title [_ acs-subsite.Host_Node_Map]
set context [list $page_title]
template::list::create \
-name host_node_pairs \
......@@ -15,13 +15,13 @@ template::list::create \
-key node_id \
-elements {
host {
label "Hostname"
label "[_ acs-subsite.Hostname]"
}
node_id {
label "Root Node"
label "[_ acs-subsite.Root_Node]"
}
url {
label "Root URL"
label "[_ acs-subsite.Root_URL]"
}
delete_url {
display_template "<if @host_node_pairs.delete_url@ not nil><a href=\"@host_node_pairs.delete_url@\" title=\"Delete this mapping\">delete</a></if>"
......@@ -47,18 +47,18 @@ set sorted_node_list [lsort $node_list]
ad_form -name add_host_node_mapping -form {
{host:text(text)
{label "Hostname"}
{label "[_ acs-subsite.Hostname]"}
{html {size 40}}
{value "mydomain.com"}
{help_text "Hostname must be unique"}
{help_text "[_ acs-subsite.Hostname_must_be_unique]"}
}
{root:text(radio)
{label "Root Node"}
{label "[_ acs-subsite.Root_Node]"}
{options $sorted_node_list}
{help_text "Site node you would like to map hostname to"}
{help_text "[_ acs-subsite.Site_node_you_would_like_to_map_hostname_to]"}
}
{submit:text(submit)
{label "Add Pair"}
{label "[_ acs-subsite.Add_Pair]"}
}
} -validate {
{host
......
......@@ -3,31 +3,31 @@
<h1>@title;noquote@</h1>
<ul>
<li><a href="applications/">Applications</a>
<li><a href="configure">Configure</a>
<li><a href="permissions">Permissions</a>
<li><a href="../members/">Members</a>
<li><a href="../shared/parameters">Parameters</a>
<li><a href="subsite-add">Create new subsite</a>
<li><a href="applications/">#acs-subsite.Applications#</a></li>
<li><a href="configure">#acs-subsite.Configure#</a></li>
<li><a href="permissions">#acs-subsite.Permissions#</a></li>
<li><a href="../members/">#acs-subsite.Members#</a></li>
<li><a href="../shared/parameters">#acs-subsite.Parameters#</a></li>
<li><a href="subsite-add">#acs-subsite.Create_new_subsite#</a></li>
<if @convert_subsite_p@>
<li><a href="subsite-convert-type">Convert to descendent subsite type</a>
<li><a href="subsite-convert-type">#acs-subsite.Convert_to_descendent_subsite_type#</a></li>
</if>
</ul>
<h1>Advanced Features</h1>
<h1>#acs-subsite.Advanced_Features#</h1>
<ul>
<li><a href="site-map/">Site Map</a>
<li><a href="groups/">Groups</a>
<li><a href="group-types/">Group Types</a>
<li><a href="rel-segments/">Relational Segments</a>
<li><a href="rel-types/">Relationship Types</a>
<li><a href="host-node-map/">Host-Node Map</a>
<li><a href="object-types/">Object Types</a>
<li><a href="site-map/">#acs-subsite.Site_Map#</a></li>
<li><a href="groups/">#acs-subsite.Groups#</a></li>
<li><a href="group-types/">#acs-subsite.Group_Types#</a></li>
<li><a href="rel-segments/">#acs-subsite.Relational_Segments#</a></li>
<li><a href="rel-types/">#acs-subsite.Relationship_Types#</a></li>
<li><a href="host-node-map/">#acs-subsite.Host_Node_Map#</a></li>
<li><a href="object-types/">#acs-subsite.Object_Types#</a></li>
</ul>
<if @sw_admin_p@ true>
<h1>Core Services</h1>
<h1>#acs-subsite.Core_Services#</h1>
<ul>
<li>
<a href="@acs_admin_url@">@acs_admin_name@</a>
......
......@@ -17,7 +17,7 @@ ad_page_contract {
}
array set this_node [site_node::get -url [ad_conn url]]
set title "$this_node(instance_name) Administration"
set title "$this_node(instance_name) [_ acs-subsite.Administration]"
set acs_admin_url [apm_package_url_from_key "acs-admin"]
array set acs_admin_node [site_node::get -url $acs_admin_url]
......
<master>
<property name="title">@page_title@</property>
<property name="doc(title)">@doc.title@</property>
<property name="context">@context@</property>
<ul class="action-links">
<li><a href="index">View Hierarchical Index</a></li>
</ul>
<p>
<h1>@doc.title@</h1>
<p><a href="index" class="button">View Hierarchical Index</a></p>
<multiple name="alpha_object_types">
<a href="one?object_type=@alpha_object_types.object_type@">@alpha_object_types.pretty_name@</a><br>
</multiple>
<ul>
<multiple name="alpha_object_types">
<li><a href="one?object_type=@alpha_object_types.object_type@">@alpha_object_types.pretty_name@</a></li>
</multiple>
</ul>
......@@ -8,6 +8,6 @@ ad_page_contract {
} {}
set page_title "Object Type Alphabetical Index"
set doc(title) "Object Type Alphabetical Index"
set context [list "Object Type Alphabetical Index"]
db_multirow alpha_object_types object_type_in_alphabetical_order {}
<master>
<property name="title">@page_title@</property>
<property name="doc(title)">@doc.title@</property>
<property name="context">@context@</property>
<ul class="action-links">
<li><a href="alphabetical-index">View Alphabetical Index</a></li>
</ul>
<p>
<h1>@doc.title@</h1>
<p><a href="alphabetical-index" class="button">#acs-subsite.View_Alphabetical_Index#</a></p>
<p>
@object_type_hierarchy;noquote@
</p>
......@@ -9,6 +9,7 @@ ad_page_contract {
} {}
set page_title "Object Type Hierarchical Index"
set doc(title) "Object Type Hierarchical Index"
set context [list "Object Type Hierarchical Index"]
set object_type_hierarchy [acs_object_type_hierarchy]
<master>
<property name="context">@context;noquote@</property>
<property name="title">Relational Segment administration</property>
<property name="doc(title)">@doc.title@</property>
Currently, the system is able to handle the following relational segments:
<h1>@doc.title@</h1>
<p>#acs-subsite.Currently_the_system_is_able_to_handle_the_following_relational_segments#</p>
<ul>
<if @seg:rowcount@ eq 0>
<li>(none)</li>
<li>#acs-subsite.none#</li>
</if>
<else>
<multiple name="seg">
<li> <a href="one?segment_id=@seg.segment_id@">@seg.segment_name@</a> (<a href=../rel-types/one?rel_type=@seg.rel_type@>@seg.rel_type_pretty_name@</a> to <a href=../groups/one?group_id=@seg.group_id@>@seg.group_name@</a>)
<li> <a href="one?segment_id=@seg.segment_id@">@seg.segment_name@</a> (<a href="../rel-types/one?rel_type=@seg.rel_type@">@seg.rel_type_pretty_name@</a> to <a href="../groups/one?group_id=@seg.group_id@">@seg.group_name@</a>)
</li>
</multiple>
......@@ -20,4 +22,4 @@ Currently, the system is able to handle the following relational segments:
</ul>
Note: Relational segments are created from the <a href=../groups/>groups administration pages</a>
<p>#acs-subsite.Note_Relational_segments_are_created_from_the_groups_administration_pages#</p>
......@@ -14,7 +14,8 @@ ad_page_contract {
seg:multirow
}
set context [list "Relational segments"]
set context [list [_ acs-subsite.Relational_Segments]]
set doc(title) [_ acs-subsite.Relational_Segment_administration]
set user_id [ad_conn user_id]
......
<master>
<property name="context">@context;noquote@</property>
<property name="title">Relationship administration</property>
<property name="doc(title)">#acs-subsite.Relationship_types_administration#</property>
Currently, the system is able to handle the following types of relationships:
<h1>#acs-subsite.Relationship_types_administration#</h1>
<p>#acs-subsite.Currently_the_system_is_able_to_handle_the_following_types_of_relationships#</p>
<ul>
<if @rel_types:rowcount@ eq 0>
<li><em>(none)</em></li>
<li><em>#acs-subsite.none#</em></li>
</if>
<else>
<multiple name="rel_types">
<li> @rel_types.indent;noquote@<a href="one?rel_type=@rel_types.rel_type@">@rel_types.pretty_name@</a> (number of relationships defined: @rel_types.number_relationships@)
<li>@rel_types.indent;noquote@<a href="one?rel_type=@rel_types.rel_type@">@rel_types.pretty_name@</a> (#acs-subsite.number_of_relationships_defined#: @rel_types.number_relationships@)
</li>
</multiple>
</else>
</ul>
<p>
<li><a href="new">Define a new relationship type</a>
<li><a href="roles">View all roles</a>
<ul>
<li><a href="new">#acs-subsite.Define_a_new_relationship_type#</a></li>
<li><a href="roles">#acs-subsite.View_all_roles#</a></li>
</ul>
......@@ -15,7 +15,7 @@ ad_page_contract {
rel_types:multirow
}
set context [list "Relationship types"]
set context [list [_ acs-subsite.Relationship_Types]]
set package_id [ad_conn package_id]
......
<master>
<property name="context">@context;noquote@</property>
<property name="title">Create relation type</property>
<property name="doc(title)">#acs-subsite.Create_relation_type#</property>
First, select the supertype for the new relationship type:
<h1>#acs-subsite.Create_relation_type#</h1>
<p>#acs-subsite.First_select_the_supertype#</p>
<form method=get action=new-2>
@export_vars;noquote@
<div>@export_vars;noquote@</div>
Supertype: <select name=supertype>
<multiple name="supertypes">
<option value="@supertypes.object_type@"> @supertypes.name;noquote@
</multiple>
</select>
<div>
<label for="supertype">
#acs-subsite.Supertype#
<select name="supertype" id="supertype">
<multiple name="supertypes">
<option value="@supertypes.object_type@">@supertypes.name;noquote@</option>
</multiple>
</select>
</label>
<p>
<center><input type=submit value="Continue"></center>
<input type="submit" value="Continue">
</div>
</form>
......@@ -23,7 +23,7 @@ db_multirow supertypes select_supertypes {
start with t.object_type in ('membership_rel','composition_rel')
}
set context [list [list "[ad_conn package_url]admin/rel-types/" "Relationship types"] "Add relationship type"]
set context [list [list "[ad_conn package_url]admin/rel-types/" [_ acs-subsite.Relationship_Types]] [_ acs-subsite.Create_relation_type]]
set export_vars [ad_export_vars -form {return_url}]
......
<master>
<property name="title">@page_title;noquote@</property>
<property name="doc(title)">@doc.title@</property>
<property name="context">@context;noquote@</property>
<property name="javascript">@javascript;noquote@</property>
<b>@head;noquote@</b>
<h1>@doc.title@</h1>
<listtemplate name="nodes"></listtemplate>
<b>&raquo;</b><a href="application-new">Create new application</a><br>
<b>&raquo;</b><a href="unmounted">Manage unmounted applications</a><br>
<b>&raquo;</b><a href="site-map">Build Site Map</a>
<ul>
<li><a href="application-new">#acs-subsite.Create_new_application#</a></li>
<li><a href="unmounted">#acs-subsite.Manage_unmounted_applications#</a></li>
<li><a href="site-map">#acs-subsite.Build_Site_Map#</a></li>
</ul>
<h2>Services</h2>
<h2>#acs-subsite.Services#</h2>
<ul>@services;noquote@</ul>
<h2>Site Map Instructions</h2>
<h2>#acs-subsite.Site_Map_Instructions#</h2>
<ul>
<li>To <strong>add an application</strong> to this site, use <em>new sub
folder</em> to create a new site node beneath under the selected
folder. Then choose <em>new application</em> to select an installed
application package for instantiation. The application will then be
available at the displayed URL.
<li>To <strong>configure</strong> an application select <em>set
parameters</em> to view and edit application specific options.
<em>set permissions</em> allows one to grant privileges to users and
groups to specific application instances or other application data.
For more info on parameters and permissions, see the package specific
documentation.
<li>To <strong>copy</strong> an application instance to another URL,
create a new folder as above, then select <em>mount</em>. Select
the application to be copied from the list of available packages.
<li>To <strong>move</strong> an application,
copy it as above to the new location, then select
<em>unmount</em> at the old location. Selecting <em>delete</em> on
the empty folder will remove it from the site node.
<li>To <strong>remove</strong> an application and all of its data, select
<em>unmount</em> from all the site nodes it is mounted from, then
<em>delete</em> it from the <em>Unmounted Applications</em> link below
the site map.
<li>#acs-subsite.To_add_an_application_to_this_site#</li>
<li>#acs-subsite.To_configure_an_application_select_set_parameters#</li>
<li>#acs-subsite.To_copy_an_application_instance_to_another#</li>
<li>#acs-subsite.To_move_an_application_copy_it_as_above#</li>
<li>#acs-subsite.To_remove_an_application_and_all_of_its_data#</li>
</ul>
......@@ -44,8 +44,8 @@ if {$new_parent ne ""} {
set parent_link ".?[export_url_vars expand:multiple root_id=$parent_id]"
set page_title "Site Map"
set context [list $page_title]
set doc(title) [_ acs-subsite.Site_Map]
set context [list $doc(title)]
set user_id [ad_conn user_id]
......@@ -60,7 +60,7 @@ if {$subsite_number > 100} {
db_foreach path_select {} {
if {$node_id != $root_id && $admin_p eq "t"} {
append head "<a href=.?[export_url_vars expand:multiple root_id=$node_id]>"
append head [subst {<a href=".?[export_url_vars expand:multiple root_id=$node_id]">}]
}
if {$name eq ""} {
append head "$obj_name:"
......@@ -115,8 +115,8 @@ template::list::create \
<form name=new_parent action=new>
@nodes.tree_indent;noquote@
@nodes.action_form_part;noquote@
<input name=name type=text size=8 value=Untitled>
<input type=submit value=New>
<input name="name" type="text" size="8" value="Untitled">
<input type="submit" value="New">
</form>
</if>
</if>
......@@ -130,18 +130,18 @@ template::list::create \
display_template {
<if @nodes.action_type@ eq "new_app">
<a name="new" />
<form name=new_application action=package-new>
<input name=instance_name type=text size=8 value="">
<form name="new_application" action="package-new">
<input name="instance_name" type="text" size="8" value="">
@nodes.action_form_part;noquote@
<input type=submit value=New>
<input type="submit" value="New">
</form>
</if>
<if @nodes.action_type@ eq "rename_app">
<a name="rename" />
<form name=rename_application action=rename>
<input name=instance_name type=text value="@nodes.instance@">
<form name="rename_application" action="rename">
<input name="instance_name" type="text" value="@nodes.instance@">
@nodes.action_form_part;noquote@
<input type=submit value=Rename>
<input type="submit" value="Rename">
</form>
</if>
<else>
......@@ -298,10 +298,10 @@ db_foreach nodes_select {} {
}
set new_app_form_part_1 "<form name=new_application action=package-new><input type=hidden name=node_id value=$node(node_id)><input type=hidden name=root_id value=$node(node_id)><input type=hidden name=new_node_p value=t>[export_form_vars expand:multiple]<input name=node_name type=text size=8>"
set new_app_form_part_1 [subst {<form name="new_application" action="package-new"><input type="hidden" name="node_id" value="$node(node_id)"><input type="hidden" name="root_id" value="$node(node_id)"><input type="hidden" name="new_node_p" value="t">[export_form_vars expand:multiple]<input name="node_name" type="text" size="8">}]
set new_app_form_part_2 "[apm_application_new_checkbox]"
set new_app_form_part_3 "<input type=submit value=\"Mount Package\"></form>"
set new_app_form_part_3 "<input type=\"submit\" value=\"Mount Package\"></form>"
multirow append nodes -99999 "" "" "" $new_app_form_part_1 "" "" "" $new_app_form_part_2 "" "" "" "" "" "" "" "" "" "" $new_app_form_part_3
set services ""
......
......@@ -9,8 +9,8 @@ ad_page_contract {
auth::require_login
set page_title "New subsite"
set subsite_pretty_name "Subsite name"
set page_title "[_ acs-subsite.New_subsite]"
set subsite_pretty_name "[_ acs-subsite.Subsite_name]"
set context [list $page_title]
......@@ -28,7 +28,7 @@ if { [llength $subsite_package_options] == 1 } {
} else {
ad_form -extend -name subsite -form {
{package_key:text(select)
{label "Subsite Package"}
{label "[_ acs-subsite.Subsite_Package]"}
{help_text "Choose the subsite package you'd like to mount"}
{options $subsite_package_options}
}
......@@ -38,25 +38,25 @@ if { [llength $subsite_package_options] == 1 } {
ad_form -extend -name subsite -form {
{instance_name:text
{label $subsite_pretty_name}
{help_text "The name of the new subsite you're setting up."}
{help_text "[_ acs-subsite.The_name_of_the_new_subsite_you_re_setting_up]"}
{html {size 30}}
}
{folder:url_element(text),optional
{label "URL folder name"}
{help_text "This should be a short string, all lowercase, with hyphens instead of spaces, whicn will be used in the URL of the new application. If you leave this blank, we will generate one for you from name of the application."}
{label "[_ acs-subsite.URL_folder_name]"}
{help_text "[_ acs-subsite.This_should_be_a_short_string]"}
{html {size 30}}
}
{theme:text(select)
{label "Theme"}
{help_text "Choose the layout and navigation theme you want for your subsite."}
{label "[_ acs-subsite.Theme]"}
{help_text "[_ acs-subsite.Choose_the_layout_and_navigation]"}
{options [subsite::get_theme_options]}
}
{visibility:text(select)
{label "Visible to"}
{options { { "Members only" "members" } { "Anyone" "any" } }}
{label "[_ acs-subsite.Visible_to]"}
{options { { "[_ acs-subsite.Members_only]" "members" } { "[_ acs-subsite.Anyone]" "any" } }}
}
{join_policy:text(select)
{label "Join policy"}
{label "[_ acs-subsite.Join_policy]"}
{options [group::get_join_policy_options]}
}
} -on_submit {
......
......@@ -3,19 +3,25 @@
<property name="title">@page_title;noquote@</property>
<property name="focus">user_search.user_id</property>
<h2>#acs-subsite.Search_For_Exist_User#</h2>
<h1>#acs-subsite.Invite_a_user#</h1>
<p>
#acs-subsite.lt_If_you_happen_to_know#
</p>
<if @subsite_p@>
<formtemplate id="user_search"></formtemplate>
<h2>#acs-subsite.Search_For_Exist_User#</h2>
<h2>#acs-subsite.Or_add_a_new_user#</h2>
<p>
#acs-subsite.lt_If_you_happen_to_know#
</p>
<p>
#acs-subsite.lt_If_you_dont_think_the#
</p>
<formtemplate id="user_search"></formtemplate>
<h2>#acs-subsite.Or_add_a_new_user#</h2>
<p>
#acs-subsite.lt_If_you_dont_think_the#
</p>
</if>
<formtemplate id="user_create"></formtemplate>
......
......@@ -18,6 +18,10 @@ group::get \
-group_id $group_id \
-array group_info
# if we are at main site, only show the form for creating a new user
set subsite_p [expr { [subsite::main_site_id] ne [ad_conn package_id] }]
ad_form -name user_search -cancel_url . -form {
{user_id:search
{result_datatype integer}
......
......@@ -7,4 +7,4 @@
self_register_p="0"
email="@email@"
return_url="."
rel_group_id="@group_id@" />
rel_group_id="@rel_group_id@" />
......@@ -11,6 +11,14 @@ ad_page_contract {
subsite::assert_user_may_add_member
set group_id [application_group::group_id_from_package_id]
set mainsite_group_id [application_group::group_id_from_package_id \
-no_complain \
-package_id [subsite::main_site_id]]
set rel_group_id ""
if { $mainsite_group_id ne $group_id } {
set rel_group_id $group_id
}
set page_title "Inivite Member to [ad_conn instance_name]"
set context [list [list "." "Members"] "Invite"]
......
......@@ -45,7 +45,7 @@ foreach priv $privs {
label [string totitle [string map {_ { }} [_ acs-subsite.$priv]]] \
display_template "
<if @permissions.${priv}_p@ ge 2>
<img src=\"/shared/images/checkboxchecked\" style=\"border:0\" height=\"13\" width=\"13\" alt=\"X\" title=\"This permission is inherited, to remove, click the 'Do not inherit ...' button above.\">
<img src=\"/shared/images/checkboxchecked.gif\" style=\"border:0\" height=\"13\" width=\"13\" alt=\"X\" title=\"This permission is inherited, to remove, click the 'Do not inherit ...' button above.\">
</if>
<else>
<input type=\"checkbox\" name=\"perm\" value=\"@permissions.grantee_id@,${priv}\" @permissions.${priv}_checked@>
......
......@@ -48,8 +48,6 @@ list::create \
return_url {}
}
set page_where_clause [list::page_where_clause -name users -and]
db_multirow -extend { add_url } users users_who_dont_have_any_permissions {} {
set add_url [export_vars -base "${perm_url}perm-user-add-2" { return_url object_id user_id }]
}
......
......@@ -9,8 +9,7 @@
u.first_names || ' ' || u.last_name as name,
u.email
from cc_users u
where u.user_id not in (select grantee_id from acs_permissions_all where object_id = :object_id)
$page_where_clause
where [template::list::page_where_clause -name users]
order by upper(first_names), upper(last_name)
</querytext>
......@@ -19,7 +18,8 @@
<fullquery name="users_who_dont_have_any_permissions_paginator">
<querytext>
select u.user_id
select u.user_id,
u.first_names || ' ' || u.last_name
from cc_users u
where u.user_id not in (select grantee_id from acs_permissions_all where object_id = :object_id)
order by upper(first_names), upper(last_name)
......
<master>
<property name="title">@title@</property>
<property name="context">@context@</property>
<property name="context">@context;noquote@</property>
<include src="perm-user-add-include">
......@@ -2,5 +2,5 @@
<property name="title">@page_title;noquote@</property>
<property name="context">@context;noquote@</property>
<p> @message;noquote@ </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