Index: openacs-4/packages/openacs-bootstrap3-theme/openacs-bootstrap3-theme.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/openacs-bootstrap3-theme.info,v diff -u -r1.3 -r1.4 --- openacs-4/packages/openacs-bootstrap3-theme/openacs-bootstrap3-theme.info 7 Aug 2017 23:48:13 -0000 1.3 +++ openacs-4/packages/openacs-bootstrap3-theme/openacs-bootstrap3-theme.info 2 Aug 2018 09:13:17 -0000 1.4 @@ -9,21 +9,22 @@ f f - + manderga Theme for OpenACS based on Twitter Bootstrap 3 2017-08-06 WU Vienna This package provides a Theme based on Twitter Bootstrap 3. The theme can be activated via - /admin/configure and it can be configured via - /shared/parameters . + "/admin/configure" and it can be configured via + "/shared/parameters". This theme is currently in use at openacs.org GPL version 2 2 - + + Index: openacs-4/packages/openacs-bootstrap3-theme/resources/masters/plain-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/resources/masters/plain-master.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/openacs-bootstrap3-theme/resources/masters/plain-master.adp 13 Aug 2017 12:36:01 -0000 1.2 +++ openacs-4/packages/openacs-bootstrap3-theme/resources/masters/plain-master.adp 2 Aug 2018 09:13:17 -0000 1.3 @@ -15,7 +15,7 @@
- +
@context_bar;noquote@
@@ -46,7 +46,7 @@ Next Scripting NSF Logo, NaviServer <%= [ns_info patchlevel] %> NaviServer Logo, ipv6 ready, - <%= [expr {[string match *.* [ns_conn peeraddr]] ? "IPv4" : "IPv6"}] %> + <%= [expr {[string match *.* [ns_conn peeraddr]] ? "IPv4" : "IPv6"}] %>)

Index: openacs-4/packages/openacs-bootstrap3-theme/resources/masters/plain-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/resources/masters/plain-master.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/openacs-bootstrap3-theme/resources/masters/plain-master.tcl 7 Aug 2017 23:48:13 -0000 1.2 +++ openacs-4/packages/openacs-bootstrap3-theme/resources/masters/plain-master.tcl 2 Aug 2018 09:13:17 -0000 1.3 @@ -32,6 +32,9 @@ set subsite_link "/" } +set subsite_url [subsite::get_element -element url] +set subsite_name [lang::util::localize [subsite::get_element -element instance_name]] + template::head::add_meta \ -name "viewport" \ -content "width=device-width, initial-scale=1" Index: openacs-4/packages/openacs-bootstrap3-theme/resources/masters/plain-streaming-head.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/resources/masters/plain-streaming-head.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/openacs-bootstrap3-theme/resources/masters/plain-streaming-head.adp 8 Jul 2016 16:13:35 -0000 1.1 +++ openacs-4/packages/openacs-bootstrap3-theme/resources/masters/plain-streaming-head.adp 2 Aug 2018 09:13:17 -0000 1.2 @@ -5,7 +5,7 @@
- +
@context_bar;noquote@
Index: openacs-4/packages/openacs-bootstrap3-theme/resources/masters/plain-streaming-head.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/resources/masters/plain-streaming-head.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/openacs-bootstrap3-theme/resources/masters/plain-streaming-head.tcl 8 Jul 2016 16:13:35 -0000 1.1 +++ openacs-4/packages/openacs-bootstrap3-theme/resources/masters/plain-streaming-head.tcl 2 Aug 2018 09:13:17 -0000 1.2 @@ -5,7 +5,9 @@ set subsite_link "/" } -if {![info exists title]} { set title [ad_system_name] } -if {![info exists doc(title)]} { set doc(title) $title } -if {[info exists context]} { set context_bar [ad_context_bar {*}$context]} +if {![info exists title]} { set title [ad_system_name] } +if {![info exists doc(title)]} { set doc(title) $title } +if {[info exists context]} { set context_bar [ad_context_bar {*}$context]} +set subsite_url [subsite::get_element -element url] +set subsite_name [lang::util::localize [subsite::get_element -element instance_name]] Index: openacs-4/packages/openacs-bootstrap3-theme/resources/masters/tabbed-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/resources/masters/tabbed-master.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/openacs-bootstrap3-theme/resources/masters/tabbed-master.adp 8 Jul 2016 16:13:35 -0000 1.1 +++ openacs-4/packages/openacs-bootstrap3-theme/resources/masters/tabbed-master.adp 2 Aug 2018 09:13:17 -0000 1.2 @@ -4,7 +4,7 @@ @head;noquote@ @focus;noquote@ @context;noquote@ -@subsite_logo;noquote@ +@subsite_logo;noquote@ navigation Index: openacs-4/packages/openacs-bootstrap3-theme/resources/masters/tabbed-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/resources/masters/tabbed-master.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/openacs-bootstrap3-theme/resources/masters/tabbed-master.tcl 8 Jul 2016 16:13:35 -0000 1.1 +++ openacs-4/packages/openacs-bootstrap3-theme/resources/masters/tabbed-master.tcl 2 Aug 2018 09:13:17 -0000 1.2 @@ -5,5 +5,6 @@ -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 ""] -set subsite_logo "/resources/openacs-bootstrap3-theme/images/openacs2_xs.png" +#set subsite_logo "/resources/openacs-bootstrap3-theme/images/openacs2_xs.png" +set subsite_logo "" Index: openacs-4/packages/openacs-bootstrap3-theme/resources/widgets/header-bar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/resources/widgets/header-bar.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/openacs-bootstrap3-theme/resources/widgets/header-bar.adp 8 Jul 2016 16:13:35 -0000 1.1 +++ openacs-4/packages/openacs-bootstrap3-theme/resources/widgets/header-bar.adp 2 Aug 2018 09:13:17 -0000 1.2 @@ -8,12 +8,12 @@ - + Home - - Home - + +
#acs-subsite.Subsite_Home#
+
@@ -22,7 +22,7 @@ Index: openacs-4/packages/openacs-bootstrap3-theme/resources/widgets/navigation.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/resources/widgets/navigation.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/openacs-bootstrap3-theme/resources/widgets/navigation.tcl 9 May 2018 15:33:33 -0000 1.4 +++ openacs-4/packages/openacs-bootstrap3-theme/resources/widgets/navigation.tcl 2 Aug 2018 09:13:17 -0000 1.5 @@ -1,7 +1,7 @@ # Organize standard top level navigation, if any, for output by groups (rows of # horizontal tabs by default) # -set subsite_name [lang::util::localize [subsite::get_element -element instance_name]] +#set subsite_name [lang::util::localize [subsite::get_element -element instance_name]] if { [template::multirow exists navigation] } { set selected_main_nav_item "" Index: openacs-4/packages/openacs-bootstrap3-theme/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/tcl/apm-callback-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/openacs-bootstrap3-theme/tcl/apm-callback-procs.tcl 7 Aug 2017 23:48:13 -0000 1.2 +++ openacs-4/packages/openacs-bootstrap3-theme/tcl/apm-callback-procs.tcl 2 Aug 2018 09:13:17 -0000 1.3 @@ -9,61 +9,60 @@ # Insert this package's themes db_transaction { - subsite::new_subsite_theme \ - -key openacs_bootstrap3 \ - -name #openacs-bootstrap3-theme.tabbed# \ - -template tabbed-master \ - -css { + subsite::new_subsite_theme \ + -key openacs_bootstrap3 \ + -name #openacs-bootstrap3-theme.tabbed# \ + -template tabbed-master \ + -css { {-href /resources/acs-subsite/site-master.css -media all -order 0} -{-href //maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css -media all -order 1} +{-href urn:ad:css:bootstrap3 -media all -order 1} {-href /resources/openacs-bootstrap3-theme/css/main.css -media all -order 2} -{-href /resources/openacs-bootstrap3-theme/css/color/blue.css -media all -order 3} +{-href /resources/openacs-bootstrap3-theme/css/color/grey.css -media all -order 3} {-href /resources/acs-templating/forms.css -media all -order 4} {-href /resources/acs-templating/lists.css -media all -order 5} - } \ - -js { -{-src "/resources/openacs-bootstrap3-theme/js/jquery-1.11.3.min.js" -order 1} -{-src "//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js" -order 2} - } \ - -form_template standard \ - -list_template table \ - -list_filter_template filters \ - -dimensional_template dimensional \ - -resource_dir /packages/openacs-bootstrap3-theme/resources \ - -streaming_head tabbed-streaming-head \ - - subsite::new_subsite_theme \ - -key openacs_bootstrap3_turquois \ - -name #openacs-bootstrap3-theme.tabbed-turquois# \ - -template tabbed-master-turquois \ - -css { + } \ + -js { +{-src /resources/openacs-bootstrap3-theme/js/jquery-1.11.3.min.js -order 1} +{-src urn:ad:js:bootstrap3 -order 2}} + } \ + -form_template standard \ + -list_template table \ + -list_filter_template filters \ + -dimensional_template dimensional \ + -resource_dir /packages/openacs-bootstrap3-theme/resources \ + -streaming_head tabbed-streaming-head \ + + subsite::new_subsite_theme \ + -key openacs_bootstrap3_turquois \ + -name #openacs-bootstrap3-theme.tabbed-turquois# \ + -template tabbed-master-turquois \ + -css { {-href /resources/acs-subsite/site-master.css -media all -order 0} -{-href //maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css -media all -order 1} +{-href urn:ad:css:bootstrap3 -media all -order 1} {-href /resources/openacs-bootstrap3-theme/css/main.css -media all -order 2} {-href /resources/openacs-bootstrap3-theme/css/color/turquois.css -media all -order 3} {-href /resources/acs-templating/forms.css -media all -order 4} {-href /resources/acs-templating/lists.css -media all -order 5} - } \ - -js { -{-src "/resources/openacs-bootstrap3-theme/js/jquery-1.11.3.min.js" -order 1} -{-src "//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js" -order 2} - } \ - -form_template standard \ - -list_template table \ - -list_filter_template filters \ - -dimensional_template dimensional \ - -resource_dir /packages/openacs-bootstrap3-theme/resources \ - -streaming_head tabbed-streaming-head-turquois \ + } \ + -js { +{-src /resources/openacs-bootstrap3-theme/js/jquery-1.11.3.min.js -order 1} +{-src urn:ad:js:bootstrap3 -order 2} + } \ + -form_template standard \ + -list_template table \ + -list_filter_template filters \ + -dimensional_template dimensional \ + -resource_dir /packages/openacs-bootstrap3-theme/resources \ + -streaming_head tabbed-streaming-head-turquois \ } } ad_proc -public openacs_bootstrap3_theme::apm::before_uninstall {} { Uninstall the package } { if {[subsite::get_theme] in {openacs_bootstrap3 openacs_bootstrap3_turquois}} { - subsite::set_theme -theme default_plain + subsite::set_theme -theme default_plain } subsite::delete_subsite_theme -key openacs_bootstrap3 subsite::delete_subsite_theme -key openacs_bootstrap3_turquois } - Index: openacs-4/packages/openacs-bootstrap3-theme/tcl/init-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/tcl/init-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/openacs-bootstrap3-theme/tcl/init-procs.tcl 2 Aug 2018 09:13:17 -0000 1.1 @@ -0,0 +1,35 @@ +namespace eval openacs_bootstrap3_theme { + set bootstrap_version 3.3.7 + + ad_proc -private ::openacs_bootstrap3_theme::resource_info {} { + + Get information about available version(s) of the bootstrap + packages. The goal is to deliver resources either from the + local file system, or from CDN. + + } { + # + # Provide paths for loading either via resources or CDN + # + set resource_dir [acs_package_root_dir openacs-bootstrap3-theme/www/resources]/bootstrap + set resource_url /resources/openacs-bootstrap3-theme/bootstrap + set cdn "//maxcdn.bootstrapcdn.com/bootstrap" + set version $openacs_bootstrap3_theme::bootstrap_version + + if {[file exists $resource_dir/$version]} { + set prefix $resource_url/$version + } else { + set prefix $cdn/$version + } + + lappend result \ + cdn $cdn \ + resource_dir $resource_dir \ + prefix $prefix \ + cssFiles {css/bootstrap.min.css} \ + jsFiles {js/bootstrap.min.js} \ + extraFiles {fonts/glyphicons-halflings-regular.woff fonts/glyphicons-halflings-regular.ttf} + + return $result + } +} Index: openacs-4/packages/openacs-bootstrap3-theme/tcl/resource-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/tcl/resource-init.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/openacs-bootstrap3-theme/tcl/resource-init.tcl 2 Aug 2018 09:13:17 -0000 1.1 @@ -0,0 +1,28 @@ +# +# Register some URNs that we are providing for sharing. +# + +set version $::openacs_bootstrap3_theme::bootstrap_version + +# +# Get resource info from this package. If not locally installed, offer +# a link for download. +# +set resource_info [::openacs_bootstrap3_theme::resource_info] +set prefix [dict get $resource_info prefix] +set regnames {bootstrap.min.js bootstrap3 bootstrap.min.css bootstrap3} + +foreach file [concat \ + [dict get $resource_info cssFiles] \ + [dict get $resource_info jsFiles] \ + ] { + set fn [file tail $file] + if {[dict exists $regnames $fn]} { + set ext [string trimleft [file extension $fn] .] + template::register_urn \ + -urn urn:ad:${ext}:[dict get $regnames $fn] \ + -resource $prefix/$file + } else { + ns_log warning "openacs-bootstrap3_theme: not registering URN for $file" + } +} Index: openacs-4/packages/openacs-bootstrap3-theme/www/resources/css/main.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/www/resources/css/main.css,v diff -u -r1.1 -r1.2 --- openacs-4/packages/openacs-bootstrap3-theme/www/resources/css/main.css 8 Jul 2016 16:13:35 -0000 1.1 +++ openacs-4/packages/openacs-bootstrap3-theme/www/resources/css/main.css 2 Aug 2018 09:13:17 -0000 1.2 @@ -75,10 +75,14 @@ .main-nav .navbar-nav > li > a:visited { color: #fff; } -.main-nav .navbar-nav > li > a { +.main-nav .navbar-nav > li > a { color:#fff; padding:15px 13px; } +.navbar-header a.navbar-brand div { + color:#fff; + padding:12px 13px; +} .main-nav .navbar-nav > li.active > a, .main-nav .navbar-nav > .active > a, @@ -208,6 +212,26 @@ margin-top: 10px; margin-bottom: 10px; } +div#forum-thread blockquote { + font-size: 14px; + font-style: italic; +} h2.forum-heading { margin:0; } +div.portlet-wrapper { + #border: 1px solid #ddd; + #border-radius: 4px; + padding: 10px; +} +div.portlet { + border: 1px solid #ddd; + border-radius: 4px; + padding: 10px; +} +.navbar-default .navbar-brand { + color: #fff; +} +.navbar-default .navbar-brand:hover { + color: #eee; +} Index: openacs-4/packages/openacs-bootstrap3-theme/www/resources/css/color/grey.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/www/resources/css/color/grey.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/openacs-bootstrap3-theme/www/resources/css/color/grey.css 2 Aug 2018 09:13:17 -0000 1.1 @@ -0,0 +1,20 @@ +.main-nav, +div.logo-wrapper { + background-color: #999; +} +span.invisible { + color:#bbb; +} +a:link, +a:visited, +a:hover { + color:#777; +} +.main-nav .navbar-nav > li.active > a, +.main-nav .navbar-nav > .active > a, +.main-nav .navbar-nav > .active > a:hover, +.main-nav .dropdown-menu > li > a, +.main-nav .navbar-nav > .active > a:focus { + color:#777; +} + Index: openacs-4/packages/openacs-bootstrap3-theme/www/sitewide-admin/download.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/www/sitewide-admin/download.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/openacs-bootstrap3-theme/www/sitewide-admin/download.tcl 2 Aug 2018 09:13:17 -0000 1.1 @@ -0,0 +1,16 @@ +ad_page_contract { + @author Gustaf Neumann + + @creation-date Aug 1, 2018 +} { + {version:word,notnull ""} +} + +if {$version eq ""} { + set version $::openacs_bootstrap3_theme::bootstrap_version +} +::util::resources::download \ + -version_dir $version \ + -resource_info [::openacs_bootstrap3_theme::resource_info] + +ad_returnredirect . Index: openacs-4/packages/openacs-bootstrap3-theme/www/sitewide-admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/www/sitewide-admin/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/openacs-bootstrap3-theme/www/sitewide-admin/index.adp 2 Aug 2018 09:13:17 -0000 1.1 @@ -0,0 +1,20 @@ + +@title;literal@ +@context;literal@ + +

@title;noquote@

+

+The current version of the @what@ is @version@. +

This version of the @what@ is installed locally +under @resources@ +

In the current installation the @what@ is used via CDN @cdn@. + +

Do you want to download + version @version@ of @what@ to your file system?

+ + +

The directory @path@ is NOT writable for the server. In + order to be able to download the @what@ via this web interface, + please change the permissions so that OpenACS can write to it.

+
+. \ No newline at end of file Index: openacs-4/packages/openacs-bootstrap3-theme/www/sitewide-admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openacs-bootstrap3-theme/www/sitewide-admin/index.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/openacs-bootstrap3-theme/www/sitewide-admin/index.tcl 2 Aug 2018 09:13:17 -0000 1.1 @@ -0,0 +1,48 @@ +ad_page_contract { + @author Gustaf Neumann + + @creation-date Aug 1, 2018 +} { +} + +set title "Bootstrap3 Theme - Sitewide Admin" +set context [list $title] + +set what "Bootstrap 3 Theme" +set version $::openacs_bootstrap3_theme::bootstrap_version + +# +# Get version info about the resource files of this package. If not +# locally installed, offer a link for download. +# +set resource_info [::openacs_bootstrap3_theme::resource_info] +set resource_dir [dict get $resource_info resource_dir] +set cdn [dict get $resource_info cdn] + +# +# Check, if the resources are already installed. +# +set is_installed [::util::resources::is_installed_locally \ + -resource_info $resource_info \ + -version_dir $version ] +if {$is_installed} { + # + # Tell the users, where the resources are installed. + # + set resources $resource_dir/$version + +} else { + # + # Check, if we can install the resources locally. + # + set writable [util::resources::can_install_locally \ + -resource_info $resource_info \ + -version_dir $version] + if {!$writable} { + # + # If we cannot install locally, tell the user were we want to + # install. + # + set path $resource_dir/$version + } +}