Commit f7518a94 authored by Frank Bergmann's avatar Frank Bergmann

Initial Import

parents
Pipeline #556 failed with stages
<?xml version="1.0" encoding="ISO-8859-1"?>
<message_catalog package_key="openacs-default-theme" locale="en_US" charset="ISO-8859-1">
<msg key="plain">OpenACS Default Plain</msg>
<msg key="tabbed">OpenACS Default Tabbed</msg>
</message_catalog>
<?xml version="1.0" encoding="ISO-8859-1"?>
<message_catalog package_key="openacs-default-theme" locale="es_ES" charset="ISO-8859-1">
<msg key="plain">OpenACS sencillo</msg>
<msg key="tabbed">OpenACS con pestaas</msg>
</message_catalog>
<master src="/www/blank-master">
<if @doc@ defined><property name="&doc">doc</property></if>
<if @body@ defined><property name="&body">body</property></if>
<if @head@ not nil><property name="head">@head;noquote@</property></if>
<if @focus@ not nil><property name="focus">@focus;noquote@</property></if>
<property name="skip_link">@skip_link;noquote@</property>
<div id="wrapper">
<div id="system-name">
<if @system_url@ not nil><a href="@system_url@">@system_name@</a></if>
<else>@system_name@</else>
</div>
<div id="header">
<div class="block-marker">Begin header</div>
<div id="header-navigation">
<ul class="compact">
<li>
<if @untrusted_user_id@ ne 0>#acs-subsite.Welcome_user#</if>
<else>#acs-subsite.Not_logged_in#</else> |
</li>
<li><a href="@whos_online_url@" title="#acs-subsite.view_all_online_members#">@num_users_online@ <if @num_users_online@ eq 1>#acs-subsite.Member#</if><else>#acs-subsite.Members#</else> #acs-subsite.Online#</a> |</li>
<if @pvt_home_url@ not nil>
<li><a href="@pvt_home_url@" title="#acs-subsite.Change_pass_email_por#">@pvt_home_name@</a> |</li>
</if>
<if @login_url@ not nil>
<li><a href="@login_url@" title="#acs-subsite.Log_in_to_system#">#acs-subsite.Log_In#</a></li>
</if>
<if @logout_url@ not nil>
<li><a href="@logout_url@" title="#acs-subsite.Logout_from_system#">#acs-subsite.Logout#</a></li>
</if>
</ul>
</div>
<div id="breadcrumbs">
<if @context_bar@ not nil>
@context_bar;noquote@
</if>
<else>
<if @context:rowcount@ not nil>
<ul class="compact">
<multiple name="context">
<if @context.url@ not nil>
<li><a href="@context.url@">@context.label@</a> @separator@</li>
</if>
<else>
<li>@context.label@</li>
</else>
</multiple>
</ul>
</if>
</else>
</div>
</div> <!-- /header -->
<if @navigation:rowcount@ not nil>
<list name="navigation_groups">
<div id="@navigation_groups:item@-navigation">
<div class="block-marker">Begin @navigation_groups:item@ navigation</div>
<ul>
<multiple name="navigation">
<if @navigation.group@ eq @navigation_groups:item@>
<li<if @navigation.id@ not nil> id="@navigation.id@"</if>><a href="@navigation.href@"<if @navigation.target@ not nil> target="@navigation.target;noquote@"</if><if @navigation.class@ not nil> class="@navigation.class;noquote@"</if><if @navigation.title@ not nil> title="@navigation.title;noquote@"</if><if @navigation.lang@ not nil> lang="@navigation.lang;noquote@"</if><if @navigation.accesskey@ not nil> accesskey="@navigation.accesskey;noquote@"</if><if @navigation.tabindex@ not nil> tabindex="@navigation.tabindex;noquote@"</if>>@navigation.label@</a></li>
</if>
</multiple>
</ul>
</div>
</list>
</if>
<div id="content-wrapper">
<div class="block-marker">Begin main content</div>
<div id="inner-wrapper">
<if @user_messages:rowcount@ gt 0>
<div id="alert-message">
<multiple name="user_messages">
<div class="alert">
<strong>@user_messages.message;noquote@</strong>
</div>
</multiple>
</div>
</if>
<if @main_content_p@>
<div id="main">
<div id="main-content">
<div class="main-content-padding">
<slave />
</div>
</div>
</div>
</if>
<else>
<slave />
</else>
</div>
</div> <!-- /content-wrapper -->
<comment>
TODO: remove this and add a more systematic / package independent way
TODO of getting this content here
</comment>
<if @curriculum_bar_p@ true><include src="/packages/curriculum/lib/bar" /></if>
<comment> empty UL gives a validation error for the W3C validator
</comment>
<if @num_of_locales@ gt 1 or @locale_admin_url@ not nil>
<div id="footer">
<div class="block-marker">Begin footer</div>
<div id="footer-links">
<ul class="compact">
<if @num_of_locales@ gt 1>
<li><a href="@change_locale_url@">#acs-subsite.Change_locale_label#</a></li>
</if>
<else>
<if @locale_admin_url@ not nil>
<li><a href="@locale_admin_url@">Install locales</a></li>
</if>
</else>
</ul>
</div>
</div> <!-- /footer -->
</if>
</div> <!-- /wrapper -->
ad_page_contract {
This is the highest level site specific master template.
Properties allowed
doc(title) HTML title
head code to be entered into head of document
body
focus HTML id of form element to focus
skip_link href of link to skip to. Should be of format #skip_link
main_content_p if true wrap in the main content divs (if false, provide your own
page structure, for instance two or three columns of content per page)
@author Lee Denison (lee@xarg.co.uk)
@author Don Baccus (dhogaza@pacifier.com)
$Id$
}
if { ![info exists main_content_p] } {
set main_content_p 1
}
#
# Set some basic variables
#
set system_name [ad_system_name]
set subsite_name [lang::util::localize [subsite::get_element -element instance_name]]
if {[ad_conn url] eq "/"} {
set system_url ""
} else {
set system_url [ad_url]
}
if {[template::util::is_nil title]} {
# TODO: decide how best to set the lang attribute for the title
set title [ad_conn instance_name]
}
#
# Organize standard top level navigation, if any, for output by groups (rows of
# horizontal tabs by default)
#
if { [template::multirow exists navigation] } {
if { ![info exists navigation_groups] } {
set navigation_groups [list]
}
for {set i 1} {$i <= [template::multirow size navigation]} {incr i} {
template::multirow get navigation $i
if { [lsearch -exact $navigation_groups $navigation(group)] < 0} {
lappend navigation_groups $navigation(group)
}
}
}
#
# User information and top level navigation links
#
set user_id [ad_conn user_id]
set untrusted_user_id [ad_conn untrusted_user_id]
set sw_admin_p 0
if { $untrusted_user_id == 0 } {
# The browser does NOT claim to represent a user that we know about
set login_url [ad_get_login_url -return]
} else {
# The browser claims to represent a user that we know about
set user_name [person::name -person_id $untrusted_user_id]
set pvt_home_url [ad_pvt_home]
set pvt_home_name [_ acs-subsite.Your_Account]
set logout_url [ad_get_logout_url]
# Site-wide admin link
set admin_url {}
set sw_admin_p [acs_user::site_wide_admin_p -user_id $untrusted_user_id]
if { $sw_admin_p } {
set admin_url "/acs-admin/"
set devhome_url "/acs-admin/developer"
set locale_admin_url "/acs-lang/admin"
} else {
set subsite_admin_p [permission::permission_p \
-object_id [subsite::get_element -element object_id] \
-privilege admin \
-party_id $untrusted_user_id]
if { $subsite_admin_p } {
set admin_url "[subsite::get_element -element url]admin/"
}
}
}
#
# User messages
#
util_get_user_messages -multirow user_messages
#
# Set acs-lang urls
#
set acs_lang_url [apm_package_url_from_key "acs-lang"]
set num_of_locales [llength [lang::system::get_locales]]
if {$acs_lang_url eq ""} {
set lang_admin_p 0
} else {
set lang_admin_p [permission::permission_p \
-object_id [site_node::get_element \
-url $acs_lang_url \
-element object_id] \
-privilege admin \
-party_id [ad_conn untrusted_user_id]]
}
set toggle_translator_mode_url [export_vars \
-base ${acs_lang_url}admin/translator-mode-toggle \
{{return_url [ad_return_url]}}]
set package_id [ad_conn package_id]
if { $num_of_locales > 1 } {
set change_locale_url [export_vars -base $acs_lang_url {package_id}]
}
#
# Change locale link
#
if {[llength [lang::system::get_locales]] > 1} {
set change_locale_url [export_vars -base "/acs-lang/" {package_id}]
}
#
# Who's Online
#
set num_users_online [lc_numeric [whos_online::num_users]]
set whos_online_url "[subsite::get_element -element url]shared/whos-online"
#
# Context bar
#
if {[info exists context]} {
set context_tmp $context
unset context
} else {
set context_tmp {}
}
ad_context_bar_multirow -- $context_tmp
# Context bar separator
set subsite_id [ad_conn subsite_id]
set separator [parameter::get -package_id $subsite_id -parameter ContextBarSeparator -default ":"]
#
# Curriculum specific bar
# TODO: remove this and add a more systematic / package independent way
# TODO of getting this content here
#
set curriculum_bar_p [expr {
[site_node::get_package_url -package_key curriculum] ne ""
}]
if {![info exists skip_link]} {
set skip_link "#content-wrapper"
}
<master src="/packages/openacs-default-theme/lib/plain-master">
<if @doc@ defined><property name="&doc">doc</property></if>
<if @body@ defined><property name="&body">body</property></if>
<if @head@ not nil><property name="head">@head;noquote@</property></if>
<if @focus@ not nil><property name="focus">@focus;noquote@</property></if>
<if @context@ not nil><property name="context">@context;noquote@</property></if>
<property name="&navigation">navigation</property>
<slave>
# Set the tabs then use the plain master to render the page.
subsite_navigation::define_pageflow -navigation_multirow navigation -group main -subgroup sub \
-show_applications_p [parameter::get -package_id [ad_conn subsite_id] \
-parameter ShowApplications -default 1] \
-no_tab_application_list [parameter::get -package_id [ad_conn subsite_id] \
-parameter NoTabApplicationList -default ""] \
-initial_pageflow [parameter::get -package_id [ad_conn subsite_id] \
-parameter UserNavbarTabsList -default ""]
<?xml version="1.0"?>
<!-- Generated by the OpenACS Package Manager -->
<package key="openacs-default-theme" url="http://openacs.org/repository/apm/packages/openacs-default-theme" type="apm_service">
<package-name>OpenACS Default Theme</package-name>
<pretty-plural>OpenACS Default Themes</pretty-plural>
<initial-install-p>t</initial-install-p>
<singleton-p>t</singleton-p>
<version name="5.6.0" url="http://openacs.org/repository/download/apm/openacs-default-theme-5.6.0.apm">
<owner url="mailto:dhogaza@pacifier.com">Don Baccus</owner>
<summary>Provides the default &quot;plain&quot; and &quot;tabbed&quot; themes for OpenACS Subsites.</summary>
<release-date>2010-06-17</release-date>
<description format="text/plain">Provides the default &quot;plain&quot; and &quot;tabbed&quot; themes for OpenACS Subsites. This has been moved out to a separate package, with availability recorded in the database, to make it easier for developer's to create their own themes and distribute and/or install them in package form.
</description>
<maturity>0</maturity>
<provides url="openacs-default-theme" version="5.6.0"/>
<requires url="acs-subsite" version="5.6.0"/>
<callbacks>
<callback type="after-install" proc="openacs_default_theme::install::after_install"/>
</callbacks>
<parameters>
<!-- No version parameters -->
</parameters>
</version>
</package>
namespace eval openacs_default_theme {}
namespace eval openacs_default_theme::install {}
ad_proc openacs_default_theme::install::after_install {} {
Package after installation callback proc. Add our themes, and set the acs-subsite's
default master template parameter's default value to our "plain" theme.
} {
# Insert this package's themes
db_transaction {
subsite::new_subsite_theme \
-key default_plain \
-name #openacs-default-theme.plain# \
-template /packages/openacs-default-theme/lib/plain-master \
-css {{{href /resources/openacs-default-theme/styles/default-master.css} {media all}}
{{href /resources/acs-templating/forms.css} {media all}}
{{href /resources/acs-templating/lists.css} {media all}}} \
-form_template /packages/acs-templating/resources/forms/standard \
-list_template /packages/acs-templating/resources/lists/table \
-list_filter_template /packages/acs-templating/resources/lists/filters
subsite::new_subsite_theme \
-key default_tabbed \
-name #openacs-default-theme.tabbed# \
-template /packages/openacs-default-theme/lib/tabbed-master \
-css {{{href /resources/openacs-default-theme/styles/default-master.css} {media all}}
{{href /resources/acs-templating/forms.css} {media all}}
{{href /resources/acs-templating/lists.css} {media all}}} \
-form_template /packages/acs-templating/resources/forms/standard \
-list_template /packages/acs-templating/resources/lists/table \
-list_filter_template /packages/acs-templating/resources/lists/filters
}
# Set the default value of the master template parameter, so all subsites will
# default to this when mounted. At this point in the ACS installation process, the
# main subsite has yet to be mounted, so it will get the "plain" theme value
# when the installer gets around to doing so.
# Don't do this if you're creating your own theme package! Override the default by
# creating a custom install.xml file to be run during the install process if you want
# it to be installed by default for your sites.
# We don't set up the form or list templates or CSS because the default is to use
# those values set for acs-templating during install.
parameter::set_default -package_key acs-subsite -parameter DefaultMaster \
-value /packages/openacs-default-theme/lib/plain-master
parameter::set_default -package_key acs-subsite -parameter ThemeCSS \
-value {{{href /resources/openacs-default-theme/styles/default-master.css} {media all}}
{{href /resources/acs-templating/forms.css} {media all}}
{{href /resources/acs-templating/lists.css} {media all}}}
parameter::set_default -package_key acs-subsite -parameter ThemeKey -value default_plain
}
This diff is collapsed.
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