Index: openacs-4/packages/theme-ges/README.bin
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/README.bin,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/theme-ges/README.bin 1 Nov 2016 09:08:33 -0000 1.1
@@ -0,0 +1,37 @@
+
+
+This packages is based on selva package, the following instructions will help you to set up this new design on your installation of oacs 5-3,
+this package is a contribution therefore everybody can do any improvement on it, in the near future i will do some improvements.
+After installing the theme-ges package, please follow these instructions:
+
+ 1. At the file blank-compat.tcl, you have to change these paths for the lists.css y forms.css:
+ a. /resources/theme-ges/theme-ges/styles/lists.css instead of /resources/acs-templating/lists.css
+ b. /resources/theme-ges/theme-ges/styles/forms.css instead of /resources/acs-templating/forms.css
+
+ 2. You have to change one parameter of the Main Site at the /admin/site-map:
+ a. DefaultMaster must be /packages/theme-ges/www/theme-ges-master.
+ b. Before you must assign the new template to see the changes, by standard this option is not available therefore
+ you must activate at "/dotlrn/admin/site-templates"
+
+ 3. Yu have to change these parameters of dotlrn at /dotlrn/admin, clicking the link .edit parameters.
+ a. DefaultSiteTemplate must be /packages/theme-ges/www/theme-ges-master.
+ b. DefaultMaster_p must be /packages/theme-ges/www/theme-ges-master.
+
+ 4. Within the directory "files_to_replace" at the package theme-ges you will find some files that you must replace, these files will replace the originals at
+ "/dotlrn/www" for the control-panel and "/acs-subsite/www/pvt" for the home which display the personal information about a user.
+
+ 5. You have to remove from every list builder the called to an specific css to see the changes with new style sheet (lists.css), the same for the ad_forms.
+
+ 6. You have to change the file table.adp located at "/acs-templating/resources/lists" for putting the styles located at lists.css style sheet for the list builder.
+
+
+You will appreciate better this design with explorer 7 than explorer 6, either other browser work fine.
+
+I hope that you enjoy this package.
+
+Best regards.
+
+Cesar.
+Galileo University
+
+Mail: cesarhj@galileo.edu
Index: openacs-4/packages/theme-ges/theme-ges.info.txt
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/theme-ges.info.txt,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/theme-ges/theme-ges.info.txt 1 Nov 2016 09:08:33 -0000 1.1
@@ -0,0 +1,27 @@
+
+
+
+
+ Theme GES
+ Theme GES
+ f
+ f
+
+
+ Cesar Hernandez (admin)
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: openacs-4/packages/theme-ges/catalog/theme-ges.de_DE.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/catalog/theme-ges.de_DE.ISO-8859-1.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/theme-ges/catalog/theme-ges.de_DE.ISO-8859-1.xml 1 Nov 2016 09:08:33 -0000 1.1
@@ -0,0 +1,13 @@
+
+
+
+ Mitgliedschaften
+ Eigene Einstellungen
+ Kurse
+ www.dotlrn.org
+ .LRN-Projekt
+ Abmelden
+ Eigene Startseite
+ angemeldet
+ Einstellungen
+
Index: openacs-4/packages/theme-ges/catalog/theme-ges.en_US.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/catalog/theme-ges.en_US.ISO-8859-1.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/theme-ges/catalog/theme-ges.en_US.ISO-8859-1.xml 1 Nov 2016 09:08:33 -0000 1.1
@@ -0,0 +1,15 @@
+
+
+
+ Communities
+ Control Panel
+ Courses
+ .LRN Home
+ .LRN Project Central
+ Logout
+ My Space
+ online
+ Preferences
+ Tools
+ You are here
+
Index: openacs-4/packages/theme-ges/catalog/theme-ges.es_ES.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/catalog/theme-ges.es_ES.ISO-8859-1.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/theme-ges/catalog/theme-ges.es_ES.ISO-8859-1.xml 1 Nov 2016 09:08:33 -0000 1.1
@@ -0,0 +1,17 @@
+
+
+
+ Notese que ning�n software puede comprobar totalmente la accesibilidad de su sitio web
+ Comunidades
+ Panel de Control
+ Cursos
+ Sitio web de .LRN
+ Proyecto .LRN
+ Salir
+ Mi Espacio
+ conectado
+ Preferencias
+ Documentaci�n del tema Selva
+ Herramientas
+ Est� en
+
Index: openacs-4/packages/theme-ges/catalog/theme-ges.fr_FR.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/catalog/theme-ges.fr_FR.ISO-8859-1.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/theme-ges/catalog/theme-ges.fr_FR.ISO-8859-1.xml 1 Nov 2016 09:08:33 -0000 1.1
@@ -0,0 +1,9 @@
+
+
+
+ Panneau de configuration
+ Cours
+ Logout
+ Mon Espace
+ Preferences
+
Index: openacs-4/packages/theme-ges/catalog/theme-ges.pt_BR.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/catalog/theme-ges.pt_BR.ISO-8859-1.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/theme-ges/catalog/theme-ges.pt_BR.ISO-8859-1.xml 1 Nov 2016 09:08:33 -0000 1.1
@@ -0,0 +1,17 @@
+
+
+
+ Comunidades
+ Painel de Controle
+ Cursos
+ P�gina do .LRN
+ Central do Projeto .LRN
+ In�cio
+ Sair
+ Meu Espa�o
+ conectados
+ Prefer�ncias
+ Documenta��o do Tema Selva
+ Ferramentas
+ Voc� est� aqui
+
Index: openacs-4/packages/theme-ges/files_to_repleace/control-panel.adp.htm
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/files_to_repleace/control-panel.adp.htm,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/theme-ges/files_to_repleace/control-panel.adp.htm 1 Nov 2016 09:08:33 -0000 1.1
@@ -0,0 +1,209 @@
+<%
+
+ #
+ # 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.
+ #
+
+%>
+
+
+@title@
+0
+
+@header_stuff;noquote@
+
+
Index: openacs-4/packages/theme-ges/files_to_repleace/home.tcl.txt
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/files_to_repleace/home.tcl.txt,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/theme-ges/files_to_repleace/home.tcl.txt 1 Nov 2016 09:08:33 -0000 1.1
@@ -0,0 +1,84 @@
+# /pvt/home.tcl
+
+ad_page_contract {
+ user's workspace page
+ @cvs-id $Id: home.tcl.txt,v 1.1 2016/11/01 09:08:33 gustafn Exp $
+} -properties {
+ system_name:onevalue
+ context:onevalue
+ full_name:onevalue
+ email:onevalue
+ url:onevalue
+ screen_name:onevalue
+ bio:onevalue
+ portrait_state:onevalue
+ portrait_publish_date:onevalue
+ portrait_title:onevalue
+ portrait_description:onevalue
+ export_user_id:onevalue
+ ad_url:onevalue
+ member_link:onevalue
+ pvt_home_url:onevalue
+}
+
+set user_id [auth::require_login -account_status closed]
+
+acs_user::get -array user -include_bio -user_id $user_id
+
+set account_status [ad_conn account_status]
+set login_url [ad_get_login_url]
+set subsite_url [ad_conn vhost_subsite_url]
+
+set page_title [ad_pvt_home_name]
+
+set pvt_home_url [ad_pvt_home]
+
+set context [list $page_title]
+
+set fragments [callback -catch user::workspace -user_id $user_id]
+
+set ad_url [ad_url]
+
+set community_member_url [acs_community_member_url -user_id $user_id]
+
+set notifications_url [lindex [site_node::get_children -node_id [subsite::get_element -element node_id] -package_key "notifications"] 0]
+
+set system_name [ad_system_name]
+
+set portrait_upload_url [export_vars -base "../user/portrait/upload" { { return_url [ad_return_url] } }]
+
+if { [llength [lang::system::get_locales]] > 1 } {
+ set change_locale_url [apm_package_url_from_key "acs-lang"]
+}
+
+
+
+if [ad_parameter SolicitPortraitP "user-info" 0] {
+ # we have portraits for some users
+ if ![db_0or1row get_portrait_info "
+ select cr.publish_date, nvl(cr.title,'your portrait') as portrait_title,
+ nvl(cr.description,'no description') as portrait_description
+ from cr_revisions cr, cr_items ci, acs_rels a
+ where cr.revision_id = ci.live_revision
+ and ci.item_id = a.object_id_two
+ and a.object_id_one = :user_id
+ and a.rel_type = 'user_portrait_rel'
+ "] {
+ set portrait_state "upload"
+ } else {
+ if { [empty_string_p $portrait_title] } {
+ set portrait_title "[_ acs-subsite.no_portrait_title_message]"
+ }
+
+ set portrait_state "show"
+ set portrait_publish_date [lc_time_fmt $publish_date "%q"]
+ }
+} else {
+ set portrait_state "none"
+}
+
+
+set whos_online_url "[subsite::get_element -element url]shared/whos-online"
+set make_visible_url "[subsite::get_element -element url]shared/make-visible"
+set make_invisible_url "[subsite::get_element -element url]shared/make-invisible"
+set invisible_p [whos_online::user_invisible_p [ad_conn untrusted_user_id]]
Index: openacs-4/packages/theme-ges/screens/Picture 1.png
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/screens/Picture 1.png,v
diff -u
Binary files differ
Index: openacs-4/packages/theme-ges/screens/Picture 2.png
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/screens/Picture 2.png,v
diff -u
Binary files differ
Index: openacs-4/packages/theme-ges/screens/Picture 4.png
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/screens/Picture 4.png,v
diff -u
Binary files differ
Index: openacs-4/packages/theme-ges/screens/Picture 5.png
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/screens/Picture 5.png,v
diff -u
Binary files differ
Index: openacs-4/packages/theme-ges/screens/Picture 6.png
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/screens/Picture 6.png,v
diff -u
Binary files differ
Index: openacs-4/packages/theme-ges/sql/postgresql/theme-ges-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/sql/postgresql/theme-ges-create.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/theme-ges/sql/postgresql/theme-ges-create.sql 1 Nov 2016 09:08:33 -0000 1.1
@@ -0,0 +1,32 @@
+-- Creating theme GES
+
+SELECT portal_element_theme__new ('ges','GES Theme','../../theme-ges/www/themes/theme-ges-theme','../../theme-ges/www/themes/theme-ges-theme');
+
+-- Adding site templates
+
+create function inline_0()
+returns integer as '
+declare
+ v_site_template_id dotlrn_site_templates.site_template_id%TYPE;
+ v_theme_id portal_element_themes.theme_id%TYPE;
+begin
+ select theme_id into v_theme_id
+ from portal_element_themes
+ where name = ''ges'';
+
+ select acs_object_id_seq.nextval
+ into v_site_template_id
+ from dual;
+
+ insert into dotlrn_site_templates
+ (site_template_id, pretty_name, site_master,portal_theme_id )
+ values
+ (v_site_template_id, ''GES Theme'',''/packages/theme-ges/www/theme-ges-master'',v_theme_id);
+
+ return v_site_template_id;
+
+end;' language 'plpgsql';
+
+select inline_0();
+
+drop function inline_0();
Index: openacs-4/packages/theme-ges/sql/postgresql/theme-ges-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/sql/postgresql/theme-ges-drop.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/theme-ges/sql/postgresql/theme-ges-drop.sql 1 Nov 2016 09:08:33 -0000 1.1
@@ -0,0 +1,61 @@
+create function inline_0()
+returns integer as '
+declare
+ selva_site_template_id dotlrn_site_templates.site_template_id%TYPE;
+ sloan_site_template_id dotlrn_site_templates.site_template_id%TYPE;
+ selva_theme_id portal_element_themes.theme_id%TYPE;
+ sloan_theme_id portal_element_themes.theme_id%TYPE;
+begin
+
+ -- reverting selva site-templates to sloan
+
+ select site_template_id into selva_site_template_id
+ from dotlrn_site_templates
+ where pretty_name = ''GES Theme'';
+
+ select site_template_id into sloan_site_template_id
+ from dotlrn_site_templates
+ where pretty_name = ''#new-portal.sloan_theme_name#'';
+
+ update apm_parameter_values
+ set attr_value = sloan_site_template_id
+ where parameter_id in ( select parameter_id
+ from apm_parameters
+ where (parameter_name = ''CommDefaultSiteTemplate_p'' or parameter_name = ''UserDefaultSiteTemplate_p'') and attr_value = selva_site_template_id);
+
+ -- reverting to sloan for user/comm
+
+ update dotlrn_communities_all
+ set site_template_id = sloan_site_template_id
+ where site_template_id = selva_site_template_id;
+
+ update dotlrn_user_profile_rels
+ set site_template_id = sloan_site_template_id
+ where site_template_id = selva_site_template_id;
+
+ -- removing selva site-template
+
+ delete from dotlrn_site_templates where site_template_id = selva_site_template_id;
+
+ -- removing the Selva theme
+
+ select theme_id into selva_theme_id
+ from portal_element_themes
+ where name = ''ges'';
+
+ select theme_id into sloan_theme_id
+ from portal_element_themes
+ where name = ''#new-portal.sloan_theme_name#'';
+
+ update portals set theme_id = sloan_theme_id where theme_id = selva_theme_id;
+ delete from portal_element_themes WHERE theme_id = selva_theme_id;
+ perform acs_object__delete(selva_theme_id);
+
+ return sloan_site_template_id;
+
+end;' language 'plpgsql';
+
+select inline_0();
+
+drop function inline_0();
+
Index: openacs-4/packages/theme-ges/tcl/apm-callback-procs.tcl.txt
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/tcl/apm-callback-procs.tcl.txt,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/theme-ges/tcl/apm-callback-procs.tcl.txt 1 Nov 2016 09:08:33 -0000 1.1
@@ -0,0 +1,33 @@
+ad_library {
+
+ Theme Selva Package APM callbacks library
+
+ Procedures that deal with installing.
+
+ @creation-date May 2006
+ @author Don Baccus (dhogaza@pacifier.com)
+ @cvs-id $Id: apm-callback-procs.tcl.txt,v 1.1 2016/11/01 09:08:33 gustafn Exp $
+
+}
+
+namespace eval theme_ges {}
+namespace eval theme_ges::apm {}
+
+ad_proc -public theme_ges::apm::after_upgrade {
+ {-from_version_name:required}
+ {-to_version_name:required}
+} {
+ apm_upgrade_logic \
+ -from_version_name $from_version_name \
+ -to_version_name $to_version_name \
+ -spec {
+ 0.7d5 2.2.0b1 {
+ apm_parameter_register \
+ AdditionalNavbarTabs \
+ "list of URL Names pairs which will make it into additional navbar tabs" \
+ theme-ges \
+ "/dotlrn/ #dotlrn.Home# /theme-ges/courses #dotlrn.Courses# /theme-ges/communities #dotlrn.Communities# /dotlrn/control-panel #dotlrn.control_panel#" \
+ string
+ }
+ }
+}
Index: openacs-4/packages/theme-ges/tcl/theme-ges-procs.tcl.txt
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/tcl/theme-ges-procs.tcl.txt,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/theme-ges/tcl/theme-ges-procs.tcl.txt 1 Nov 2016 09:08:33 -0000 1.1
@@ -0,0 +1,273 @@
+#
+# 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.
+#
+
+# tcl/portal-procs.tcl
+
+ad_library {
+
+ Theme-ges.
+
+ @author Cesar Hernandez (cesarhj@galileo.edu)
+ @creation-date Noviembre 2006
+ @version $Id: theme-ges-procs.tcl.txt,v 1.1 2016/11/01 09:08:33 gustafn Exp $
+
+}
+
+namespace eval theme_ges {
+
+ ad_proc -public get_parent_id {
+ {-community_id:required}
+ } {
+ This function return the higher parent id
+ for a community.
+ } {
+ set parent_id [dotlrn_community::get_parent_id -community_id $community_id]
+ if {$parent_id > 0} {
+ theme_ges::get_parent_id -community_id $parent_id
+ } else {
+ return $community_id
+ }
+ }
+
+ ad_proc -public get_user_type {
+ {-user_id:required}
+ } {
+ This function return the type for a given user from
+ the table dotlrn_users, such as:
+ external, admin, professor and student
+ } {
+ set type [db_string get_type {
+ select type
+ from dotlrn_users
+ where user_id = :user_id
+ } -default ""]
+
+ return $type
+ }
+
+ ad_proc -public get_portlet_name {
+ {-element_id:required}
+ } {
+ set name_portlet [db_string get_name {
+ select name
+ from portal_element_map
+ where element_id = :element_id} -default ""]
+ set name_portlet "[string trim $name_portlet].png"
+ return "/resources/theme-ges/theme-ges/images/$name_portlet"
+ }
+
+ ad_proc -public portal_navbar {
+
+ } {
+ A helper procedure that generates the Navbar, ie the tabs,
+ for dotlrn. It is called from the selva-master template.
+ } {
+ set current_url [ad_conn url]
+
+ # Set up some basic stuff
+ set community_id [dotlrn_community::get_community_id]
+ if {![empty_string_p $community_id]} {
+ set community_name [db_string get_name {
+ select class_name
+ from dotlrn_class_instances_full
+ where class_instance_id = :community_id
+ } -default ""]
+ }
+ # Get user information
+ set sw_admin_p 0
+ set user_id [ad_conn user_id]
+ set untrusted_user_id [ad_conn untrusted_user_id]
+ if { $untrusted_user_id != 0 } {
+ 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 {}
+
+ if { $sw_admin_p } {
+ set admin_url "/acs-admin/"
+ set locale_admin_url "/acs-lang/admin"
+ set dotlrn_admin_url "/dotlrn/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/"
+ }
+ }
+ } else {
+ set login_url [ad_get_login_url -return]
+ set user_name {}
+ }
+
+ set navbar [list]
+
+ set tabs_list [list]
+
+ # Verifying if the user is external then this package does not add the
+ # following tabs, cursos actuales, comunidad y panel de control
+
+ set type_user [theme_ges::get_user_type -user_id $user_id]
+
+ foreach {url name image} [parameter::get_from_package_key -package_key "theme-ges" -parameter "AdditionalNavbarTabs" -default ""] {
+ if {$type_user eq "externallll"} {
+ # Then if the user is external we most take off the images
+ # which make one space among tabs at the file theme-ges-lrn-master
+ if {($url eq "/dotlrn/?page_num=0")} {
+ lappend tabs_list [list "$url" "$name" "$image"]
+ }
+ } else {
+ lappend tabs_list [list "$url" "$name" "$image"]
+ }
+ }
+
+ ns_log Debug "TABS" $tabs_list
+ foreach tab_entry $tabs_list {
+ set url [lindex $tab_entry 0]
+ set name [lindex $tab_entry 1]
+ set image [lindex $tab_entry 2]
+ # if url is /dotlrn or /dotlrn/index we highlight the "Home" tab, otherwise we highlight the tab with the current_url, if there is one, i.e. we are not in a community
+ if { $url eq $current_url || ($url eq "/dotlrn/" && $current_url eq "/dotlrn/index")} {
+ append navbar_temp ""
+ #if {$picture != "null" } { append navbar "" }
+ append navbar_temp " [lang::util::localize $name]"
+ lappend navbar [list $navbar_temp]
+ } else {
+ lappend navbar [list " [lang::util::localize $name]"]
+ }
+
+ }
+ return $navbar
+ }
+
+ ad_proc -public portal_subnavbar {
+ {-user_id:required}
+ {-link_control_panel:required}
+ {-control_panel_text:required}
+ {-link_all 0}
+ {-pre_html ""}
+ {-post_html ""}
+ } {
+ A helper procedure that generates the portal subnavbar (the thing
+ with the portal pages on it) for dotlrn. It is called from the
+ dotlrn-master template
+ } {
+
+ set dotlrn_url [dotlrn::get_url]
+ set community_id [dotlrn_community::get_community_id]
+ set control_panel_name control-panel
+ set control_panel_url "$dotlrn_url/$control_panel_name"
+ if { $community_id eq "" } {
+ # We are not under a dotlrn community. However we could be
+ # under /dotlrn (i.e. in the user's portal) or anywhere
+ # else on the site
+ set link "[dotlrn::get_url]/"
+ # Si el url es dotlrn entonces muestra el subnabvar de lo
+ # contraio no muestra nada o si esta en una comunidad o
+ # clase muestra el correspondiente subnabvar
+ if {[dotlrn::user_p -user_id $user_id]} {
+ # this user is a dotlrn user, show their personal portal
+ # subnavbar, including the control panel link
+ set portal_id [dotlrn::get_portal_id -user_id $user_id]
+ set show_control_panel 1
+ } else {
+ # not a dotlrn user, so no user portal to show
+ set portal_id {}
+ set show_control_panel 0
+ }
+ } else {
+ #
+ # We are under a dotlrn community. Get the community's portal_id, etc.
+ #
+ # some defaults
+ set text [dotlrn_community::get_community_header_name $community_id]
+ set control_panel_name one-community-admin
+ # link is important : it sets the options_set value, which will be used later to select the current page
+ set link [dotlrn_community::get_community_url $community_id]
+ set control_panel_url "$link/$control_panel_name"
+
+ # figure out what this privs this user has on the community
+ set admin_p [dotlrn::user_can_admin_community_p \
+ -user_id $user_id \
+ -community_id $community_id
+ ]
+
+ if {!$admin_p} {
+ # the user can't admin this community, perhaps they are a
+ # humble member instead?
+ set member_p [dotlrn_community::member_p $community_id $user_id]
+ set show_control_panel 0
+ } else {
+ # admins always get the control_panel_link, unless it's
+ # explictly turned off
+ set show_control_panel 1
+ }
+
+ if {$admin_p || $member_p} {
+
+ set portal_id [dotlrn_community::get_portal_id \
+ -community_id $community_id
+ ]
+ } else {
+ # show this person the comm's non-member-portal
+ set portal_id [dotlrn_community::get_non_member_portal_id \
+ -community_id $community_id
+ ]
+ }
+ }
+
+ #AG: This code belongs in the portal package, near portal::subnavbar. For display reasons we need to do this
+ #as a ul instead of a table, which portal::subnavbar returns. Obviously we shouldn't be letting display-level
+ #stuff decide where we put our code, but first we'll need to mod the portal package accordingly.
+
+ if { [catch {set page_num [ad_get_client_property dotlrn page_num]}] || $page_num eq "" || ![string is integer $page_num] } {
+ set page_num [ns_queryget page_num]
+ #if {[empty_string_p $page_num]} {
+ #set page_num 0
+ #}
+ #Strip out extra anchors and other crud.
+ #page_num will be empty_string for special pages like
+ #My Space and Control Panel
+ regsub -all {[^0-9]} $page_num {} page_num
+ }
+
+ set subnavbar [list]
+
+ db_foreach list_page_nums_select {} {
+ if {[string equal $page_num $sort_key]} {
+ lappend subnavbar [list "\n
+
+
+
+
+
+
+
Index: openacs-4/packages/theme-ges/www/theme-ges-lrn-master.tcl.txt
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/www/theme-ges-lrn-master.tcl.txt,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/theme-ges/www/theme-ges-lrn-master.tcl.txt 1 Nov 2016 09:08:33 -0000 1.1
@@ -0,0 +1,309 @@
+# $Id: theme-ges-lrn-master.tcl.txt,v 1.1 2016/11/01 09:08:33 gustafn Exp $
+
+set user_id [ad_get_user_id]
+set community_id [dotlrn_community::get_community_id]
+set dotlrn_url [dotlrn::get_url]
+
+# Verifying if the user is external
+# set type_user [theme_ges::get_user_type -user_id $user_id]
+set extra_spaces ""
+set td_align "align=\"center\" valign=\"top\""
+
+set path "comun"
+set cla_com_gru_is_selected 0
+set c_panel_is_selected 0
+set untrusted_user_id [ad_conn untrusted_user_id]
+set type_user $untrusted_user_id
+
+if {[dotlrn::user_p -user_id $user_id]} {
+ set portal_id [dotlrn::get_portal_id -user_id $user_id]
+}
+
+if {![empty_string_p $community_id]} {
+ set have_comm_id_p 1
+} else {
+ set have_comm_id_p 0
+}
+
+if {[exists_and_not_null portal_id]} {
+ set have_portal_id_p 1
+} else {
+ set have_portal_id_p 0
+}
+
+# Verifying if the user is admin, if the user is admin then it shows
+# the admin tab.
+
+set sw_admin_p [acs_user::site_wide_admin_p -user_id $user_id]
+
+# navbar vars
+set show_navbar_p 1
+if {[exists_and_not_null no_navbar_p] && $no_navbar_p} {
+ set show_navbar_p 0
+}
+
+if {![info exists link_all]} {
+ set link_all 0
+}
+
+if {![info exists return_url]} {
+ set link [ad_conn -get extra_url]
+} else {
+ set link $return_url
+}
+
+if {![info exists link_control_panel]} {
+ set link_control_panel 1
+}
+
+if { ![string equal [ad_conn package_key] [dotlrn::package_key]] } {
+ # Peter M: We are in a package (an application) that may or may not be under a dotlrn instance
+ # (i.e. in a news instance of a class)
+ # and we want all links in the navbar to be active so the user can return easily to the class homepage
+ # or to the My Space page
+ set link_all 1
+}
+
+if {$have_comm_id_p} {
+ # in a community or just under one in a mounted package like /calendar
+ # get this comm's info
+ set control_panel_text "Administer"
+
+ set portal_id [dotlrn_community::get_portal_id -community_id $community_id]
+ set text [dotlrn_community::get_community_header_name $community_id]
+ set link [dotlrn_community::get_community_url $community_id]
+ set admin_p [dotlrn::user_can_admin_community_p -user_id $user_id -community_id $community_id]
+
+ if {[empty_string_p $portal_id] && !$admin_p } {
+ # not a member yet
+ set portal_id [dotlrn_community::get_non_member_portal_id -community_id $community_id]
+ }
+
+ if { $have_portal_id_p && $show_navbar_p } {
+ set make_navbar_p 1
+
+ } else {
+ set make_navbar_p 0
+ set portal_id ""
+ }
+} elseif {[parameter::get -parameter community_type_level_p] == 1} {
+ set control_panel_text "Administer"
+
+ set extra_td_html ""
+ set link_all 1
+ set link [dotlrn::get_url]
+ # in a community type
+ set text \
+ [dotlrn_community::get_community_type_name [dotlrn_community::get_community_type]]
+
+ if {$have_portal_id_p && $show_navbar_p} {
+ set make_navbar_p 1
+ } else {
+ set make_navbar_p 0
+ set portal_id ""
+ }
+} else {
+ # we could be anywhere (maybe under /dotlrn, maybe not)
+ set control_panel_text "My Account"
+ set link "[dotlrn::get_url]/"
+ set community_id ""
+ set text ""
+ set make_navbar_p 1
+ if {$have_portal_id_p && $show_navbar_p} {
+ } else {
+ set make_navbar_p 0
+ set portal_id ""
+ }
+}
+
+# Set up some basic stuff
+set user_id [ad_get_user_id]
+if { [ad_conn untrusted_user_id] == 0 } {
+ set user_name {}
+} else {
+ set user_name [acs_user::get_element -user_id [ad_conn untrusted_user_id] -element name]
+}
+
+if {![exists_and_not_null title]} {
+ set title [ad_system_name]
+}
+
+if {[empty_string_p [dotlrn_community::get_parent_community_id -package_id [ad_conn package_id]]]} {
+ set parent_comm_p 0
+} else {
+ set parent_comm_p 1
+}
+
+set community_id [dotlrn_community::get_community_id]
+
+set control_panel_text [_ "dotlrn.control_panel"]
+
+if { $make_navbar_p } {
+ set link_control_panel 0
+
+ set extra_spaces ""
+ set subnavbar [theme_ges::portal_subnavbar \
+ -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
+ ]
+
+ # If you wish add more tabs please it checks the navbar function
+ set navbar [theme_ges::portal_navbar]
+
+ # ------------ Start menu (Navbar) ------------
+
+ # Getting the tabs for the main meu
+ set tab_space [lindex [lindex $navbar 0] 0]
+ set tab_history [lindex [lindex $navbar 1] 0]
+ set tab_community [lindex [lindex $navbar 2] 0]
+ set tab_panel [lindex [lindex $navbar 3] 0]
+
+ # We declare some vars for the tabs.
+ set hist_clases_is_selected 0
+ set inicio_is_selected 0
+ set comunidad_is_selected 0
+ set c_panel_is_selected 0
+ set dotlrn_admin_is_selected 0
+ set cla_com_gru_is_selected 0
+
+ set current_url [ad_conn url]
+
+ if {[string equal $current_url "/dotlrn/"]} {
+ set inicio_is_selected 1
+ set path "comun"
+ } elseif {[string equal $current_url "/dotlrn/courses"]} {
+ set hist_clases_is_selected 1
+ set path "comun"
+ } elseif {[string equal $current_url "/dotlrn/clubs/one-community-type"]} {
+ set comunidad_is_selected 1
+ set path "comun"
+ } elseif {[string equal $current_url "/dotlrn/control-panel"]} {
+ set c_panel_is_selected 1
+ set path "comun"
+ } elseif {[string equal $current_url "/dotlrn/admin/"] && [string equal $sw_admin_p "1"]} {
+ set dotlrn_admin_is_selected 1
+ set path "comun"
+ } elseif { [exists_and_not_null community_id] } {
+ set cla_com_gru_is_selected 1
+ set type [dotlrn_community::get_community_type_from_community_id $community_id]
+ if { $type eq "dotlrn_community" || $type eq "dotlrn_pers_community" } {
+ set path "grupo"
+ set url_image "/resources/theme-ges/theme-ges/images/icSubgrup.png"
+ set community_message_key "Grupo"
+ set url_class [dotlrn_community::get_community_url $community_id]
+ } elseif { $type eq "dotlrn_club" } {
+ set url_image "/resources/theme-ges/theme-ges/images/icSubcom.png"
+ set community_message_key "Comunidad"
+ set path "comunidad"
+ set url_class [dotlrn_community::get_community_url $community_id]
+ } else {
+ set url_image "/resources/theme-ges/theme-ges/images/icClase.png"
+ set community_message_key "Clase"
+ set path "clase"
+ set url_class [dotlrn_community::get_community_url $community_id]
+ }
+ } else {
+ set path "comun"
+ }
+
+ # ------------ End Menu (Navbar) ------------
+
+ # ------------ Start Sub-Menu (suvnavbar) ------------
+ set urls ""
+ set length [llength $subnavbar]
+ for {set x 0} {$x<$length} {incr x} {
+ set url [lindex [lindex $subnavbar $x] 0]
+ append urls "
\n"
+ append urls "$url \n"
+ append urls "
\n"
+ append urls "
\n"
+ append urls " \n"
+ append urls "
\n\n"
+ }
+ if {[empty_string_p $subnavbar]} {
+ set subnavbar 0
+ }
+ # ------------ End Sub-Menu (subnavbar) ------------
+
+} else {
+ set navbar 0
+ set subnavbar 0
+}
+
+
+if { ![info exists header_stuff] } {
+ set header_stuff ""
+}
+
+if { [info exists text] } {
+ set text [lang::util::localize $text]
+}
+
+
+# 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
+
+ "
+
+ 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 ""
+ }
+
+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] } }]
+
+
+# Bring in header stuff from portlets, e.g. dhtml tree javascript
+# from dotlrn-main-portlet.
+global dotlrn_master__header_stuff
+if { ![info exists dotlrn_master__header_stuff] } {
+ set dotlrn_master__header_stuff ""
+}
Index: openacs-4/packages/theme-ges/www/theme-ges-master.adp.htm
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/www/theme-ges-master.adp.htm,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/theme-ges/www/theme-ges-master.adp.htm 1 Nov 2016 09:08:33 -0000 1.1
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+ @title;noquote@
+ @context;noquote@
+ @displayed_object_id@
+ @header_stuff;noquote@
+
+
Index: openacs-4/packages/theme-ges/www/theme-ges-master.tcl.txt
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/www/theme-ges-master.tcl.txt,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/theme-ges/www/theme-ges-master.tcl.txt 1 Nov 2016 09:08:33 -0000 1.1
@@ -0,0 +1,26 @@
+# $Id: theme-ges-master.tcl.txt,v 1.1 2016/11/01 09:08:33 gustafn Exp $
+
+# RAC: If dotlrn is not installed selva-master uses selva-site-master,
+# otherwise uses selva-dotlrn-master
+# this should also allow for pages to call the dotlrn template (i.e. tabs) off
+# maybe by passing a propery in a page
+
+if {![exists_and_not_null displayed_object_id]} {
+ set displayed_object_id ""
+}
+
+if {![exists_and_not_null title]} {
+ set title ""
+}
+
+if {![exists_and_not_null context]} {
+ set context ""
+}
+
+if {![exists_and_not_null header_stuff]} {
+ set header_stuff ""
+}
+
+set dotlrn_installed_p [apm_package_installed_p dotlrn]
+
+append url [ad_url] [ad_return_url]
Index: openacs-4/packages/theme-ges/www/theme-ges-site-master.adp.htm
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/theme-ges/www/theme-ges-site-master.adp.htm,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/theme-ges/www/theme-ges-site-master.adp.htm 1 Nov 2016 09:08:33 -0000 1.1
@@ -0,0 +1,79 @@
+
+
+ @title;noquote@
+ @signatory;noquote@
+ @focus;noquote@
+ @context;noquote@
+ @context_bar;noquote@
+
+
+
+
+
+ @css_region;noquote@
+
+ @header_stuff;noquote@
+
+
+