Index: openacs-4/packages/dotlrn/www/dotlrn-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/dotlrn-master.adp,v diff -u -r1.33.2.1.4.1 -r1.33.2.1.4.2 --- openacs-4/packages/dotlrn/www/dotlrn-master.adp 26 May 2004 15:54:05 -0000 1.33.2.1.4.1 +++ openacs-4/packages/dotlrn/www/dotlrn-master.adp 1 Jul 2004 13:36:36 -0000 1.33.2.1.4.2 @@ -1,117 +1,29 @@ -<% +<master src="/www/site-master"> + <property name="header_stuff"> + <link rel="stylesheet" type="text/css" href="/resources/dotlrn/dotlrn-master.css" media="all"> + <link rel="stylesheet" type="text/css" href="/resources/calendar/calendar.css" media="all"> + @header_stuff;noquote@ + </property> + <if @context@ not nil><property name="context">@context;noquote@</property></if> + <else><if @context_bar@ not nil><property name="context_bar">@context_bar;noquote@</property></if></else> + <if @focus@ not nil><property name="focus">@focus;noquote@</property></if> + <if @doc_type@ not nil><property name="doc_type">@doc_type;noquote@</property></if> + <if @title@ not nil><property name="title">@title;noquote@</property></if> - # Copyright (C) 2001, 2002 MIT - # - # This file is part of dotLRN. - # - # dotLRN is free software; you can redistribute it and/or modify it under the - # terms of the GNU General Public License as published by the Free Software - # Foundation; either version 2 of the License, or (at your option) any later - # version. - # - # dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY - # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - # details. +<if @navbar@ not nil>@navbar;noquote@</if> - - # /www/dotlrn-default-master.adp - # - # This is the 'default-master' template for dotlrn sites. - # - # Author: Arjun Sanyal (arjun@openforce.net), yon@openforce.net - # - # $Id$ - - -%> - -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<head> - -<title>@title@</title> -<link rel="stylesheet" type="text/css" href="/resources/acs-templating/lists.css" media="all"> -<link rel="stylesheet" type="text/css" href="/resources/acs-templating/forms.css" media="all"> -<link rel="stylesheet" type="text/css" href="/resources/dotlrn/dotlrn-master.css" media="all"> -<script src="/resources/acs-subsite/core.js" language="javascript"></script> -@header_stuff;noquote@ -</head> -<body<multiple name=attribute> @attribute.key@="@attribute.value@"</multiple>> - - <!-- Header Begin --> - - <table width="100%" cellpadding=0 cellspacing=0> - <tr> - <td class="header-logo"> - <a href="@dotlrn_url@/?"> - <img class="header-img" border="0" src="@header_img_url@" alt="@header_img_alt_text@"></a> - </td> - - <td>@text;noquote@</td> - - <td align="right" class="header-text"> - @user_name@ - </td> - </tr> - <tr> - - <td colspan=3 class="header-buttons" align="right" valign="bottom"> - <a href="@dotlrn_url@/?">#dotlrn.user_portal_page_home_title#</a> - <img class="header-img" src="/resources/dotlrn/spacer.gif" height="1" width="10"> - <a href="@help_url@">#dotlrn.help#</a> - <img class="header-img" src="/resources/dotlrn/spacer.gif" height="1" width="10"> - <a href="/register/logout">#dotlrn.logout#</a> - </td> - - </tr> - - <tr><td colspan=3 class="dark-line" height="1"><img src="/resources/dotlrn/spacer.gif"></td></tr> - - <if @in_dotlrn_p@ true> - <!-- navbars on every page --> - <tr><td colspan=3 valign=top>@navbar;noquote@</td></tr> - </table> - <p> - <p> +<div id="page-body"> + <if @title@ not nil> + <h1 class="page-title">@title;noquote@</h1> </if> - <else> - </table> - <h1>@title@</h1> - <if @context_bar@ not nil> - <p>@context_bar;noquote@</p> - </if> - </else> - <!-- Header End --> - <slave> + <div style="clear: both;"></div> +</div> - <if @curriculum_bar_p@ true> - <p><include src="/packages/curriculum/lib/bar" /> - </if> +<if @navbar@ not nil>@navbar;noquote@</if> - <!-- Footer Begin: dotLRN info links --> - - <table width="100%" border="0" cellpadding="0" cellspacing="0" style="clear: both;"> - <tr><td><small>@navbar;noquote@</small></td></tr> - <tr><td colspan=3 class="dark-line" height="1"><img src="/resources/dotlrn/spacer.gif"></td></tr> - </table> - - <!-- Footer End --> - - <p> - <div class="footer"> - <a href="http://www.dotlrn.org">dotLRN Home</a> | - <a href="http://www.openacs.org/projects/dotlrn">dotLRN Project Central</a> | - <a href="@change_locale_url@">#dotlrn.Change_Locale#</a> - <if @lang_admin_p@ true>| <a href="@toggle_translator_mode_url@">Toggle translator mode</a></if> - </div> - <div class="footer">@ds_link;noquote@</div> - </p> - - <p> - <include src="/packages/acs-lang/lib/messages-to-translate"> - </p> -</body> -</html> +<div class="footer"> + <a href="http://www.dotlrn.org">.LRN Home</a> | + <a href="http://www.openacs.org/projects/dotlrn">.LRN Project Central</a> +</div> Index: openacs-4/packages/dotlrn/www/dotlrn-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/dotlrn-master.tcl,v diff -u -r1.29.2.2.4.1 -r1.29.2.2.4.2 --- openacs-4/packages/dotlrn/www/dotlrn-master.tcl 26 May 2004 17:10:14 -0000 1.29.2.2.4.1 +++ openacs-4/packages/dotlrn/www/dotlrn-master.tcl 1 Jul 2004 13:36:36 -0000 1.29.2.2.4.2 @@ -65,7 +65,6 @@ set header_img_file "[acs_root_dir]/packages/dotlrn/www/resources/logo" set header_img_alt_text "Header Logo" -set extra_spaces "<img src=\"/resources/dotlrn/spacer.gif\" border=0 width=15>" set td_align "align=\"center\" valign=\"top\"" if {[dotlrn::user_p -user_id $user_id]} { @@ -301,33 +300,18 @@ } if { $make_navbar_p } { - if {$link_control_panel} { - set link_control_panel 1 - } else { - set link_control_panel 0 - } - set extra_spaces "<img src=\"/resources/dotlrn/spacer.gif\" border=0 width=15>" set navbar [dotlrn::portal_navbar \ - -user_id $user_id \ - -link_control_panel $link_control_panel \ - -control_panel_text $control_panel_text \ - -pre_html "$extra_spaces" \ - -post_html $extra_spaces \ - -link_all $link_all - ] -} else { - set navbar "<br>" + -user_id $user_id \ + -link_control_panel [template::util::is_true $link_control_panel] \ + -control_panel_text $control_panel_text \ + -link_all $link_all] } if { ![info exists header_stuff] } { set header_stuff "" } -if { [info exists text] } { - set text [lang::util::localize $text] -} - # This style sheet should be moved over to an external file for performance append header_stuff " <STYLE TYPE=\"text/css\"> @@ -505,61 +489,3 @@ " -# Focus -multirow create attribute key value - -if { ![template::util::is_nil focus] } { - # Handle elements wohse name contains a dot - if { [regexp {^([^.]*)\.(.*)$} $focus match form_name element_name] } { - - # Add safety code to test that the element exists ' - set header_stuff "$header_stuff - <script language=\"JavaScript\"> - function acs_focus( form_name, element_name ){ - if (document.forms == null) return; - if (document.forms\[form_name\] == null) return; - if (document.forms\[form_name\].elements\[element_name\] == null) return; - if (document.forms\[form_name\].elements\[element_name\].type == 'hidden') return; - - document.forms\[form_name\].elements\[element_name\].focus(); - } - </script> - " - - template::multirow append \ - attribute onload "javascript:acs_focus('${form_name}', '${element_name}')" - } -} - -# Developer-support support -set ds_enabled_p [parameter::get_from_package_key \ - -package_key acs-developer-support \ - -parameter EnabledOnStartupP \ - -default 0 -] - -if {$ds_enabled_p} { - set ds_link [ds_link] -} else { - set ds_link {} -} - -set change_locale_url "/acs-lang/?[export_vars { { package_id "[ad_conn package_id]" } }]" - -# Hack for title and context bar outside of dotlrn - -set in_dotlrn_p [expr [string match "[dotlrn::get_url]/*" [ad_conn url]]] - -if { [info exists context] } { - set context_bar [eval ad_context_bar $context] -} - -set acs_lang_url [apm_package_url_from_key "acs-lang"] -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] } }] - -# Curriculum bar -set curriculum_bar_p [llength [site_node::get_children -all -filters { package_key "curriculum" } -node_id $community_id]]