Skip to content

Commit d752c66

Browse files
committed
Merge branch 'release-2.2.0'
2 parents 18d9668 + ff0e8ff commit d752c66

File tree

15 files changed

+169
-31
lines changed

15 files changed

+169
-31
lines changed

CHANGELOG.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,38 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [v2.2.0](https://github.com/rciam/simplesamlphp-module-themevanilla/compare/v2.1.0...v2.2.0) - 2019-06-27
8+
9+
### Added
10+
- Module discopower: Add style rules and logos for the buttons of the IdPs:
11+
- OpenAIRE
12+
- OpenMinTeD
13+
- QQ
14+
- WeChat
15+
- Epos
16+
- Add info about compatiblity in README.
17+
- Enable/disable cookie banner functionality via setting in config file.
18+
19+
### Changed
20+
- Update instructions on module config file usage.
21+
- Update style of Google login button.
722

823
## [v2.1.0](https://github.com/rciam/simplesamlphp-module-themevanilla/compare/v2.0.0...v2.1.0) - 2018-10-18
924

1025
### Added
11-
- Add banner and an extra view for cookies options
12-
- Add corner ribbon that displays customisable text
13-
- Add this changelog file
26+
- Add banner and an extra view for cookies options.
27+
- Add corner ribbon that displays customisable text.
28+
- Add this changelog file.
1429
- Module discopower: Add style rules and logos for the buttons of the IdPs:
1530
- eduTEAMS
1631
- EGI
1732
- Aria
1833

1934
### Changed
20-
- Change vanilla logo and favicon
35+
- Change vanilla logo and favicon.
2136
- Move wording and links from the templates of several modules to the related
22-
definition file
23-
- Render header logo link url customisable
37+
definition file.
38+
- Render header logo link url customisable.
2439

2540
## [v2.0.0](https://github.com/rciam/simplesamlphp-module-themevanilla/compare/v1.0.0...v2.0.0) - 2018-04-17
2641

README.md

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ v1.0.0**.
6464
6565
"post-update-cmd": [
6666
"cp -r 'vendor/rciam/css' 'modules/themevanilla/www/resources'",
67-
"cp -r 'vendor/rciam/js' 'modules/themevanilla/www/resources'"
67+
"cp -r 'vendor/rciam/js' 'modules/themevanilla/www/resources'",
68+
"cp 'modules/themevanilla/config-example/module_themevanilla.php' 'config/module_themevanilla.php'"
6869
]
6970
},
7071
```
@@ -76,12 +77,16 @@ With the above configuration composer will do several operations:
7677
* It will copy the `css` and `js` directories from the `vendor/rciam` directory
7778
in the `themevanilla/www/resources` directory, where the static files of the
7879
theme should be placed.
80+
* It will place the configuration file `module_themevanilla.php` inside the
81+
`config` directory of the installation.
7982

8083
### Direct download
8184

8285
You can download `themevanilla.zip` from the [release page](https://github.com/rciam/simplesamlphp-module-themevanilla/releases).
8386
Download the zip file of the preferred release and extract its contents in the
8487
`modules` directory of your SimpleSAMLphp installation.
88+
Finally, move `example-config/module_themevanilla.php` file to the `config` directory
89+
of your SimpleSAMLphp installation.
8590

8691
### Clone repository
8792

@@ -97,14 +102,8 @@ You'll need to download or produce them. You can download the compressed
97102
directories (`js.zip` and `css.zip`) from the [release page](https://github.com/rciam/simplesamlphp-module-themevanilla/releases) and
98103
extract them under `modules/themevanilla/www/resources`. If you want to produce
99104
them, you may read the customisation instructions below.
100-
101-
### Cookie Policy
102-
103-
In order to use Cookie Policy page you must copy the configuration file
104-
from the `config-example` folder to core config directory.
105-
```
106-
cp <path-to-module>/config-example/module_themevanilla.php <path-to-simplesamlphp>/config
107-
```
105+
As a last step, move `example-config/module_themevanilla.php` file to the `config`
106+
directory of your SimpleSAMLphp installation.
108107

109108

110109
## Configuration
@@ -162,6 +161,16 @@ At the moment there are style rules for the IdPs:
162161
* IGTF
163162
* LinkedIn
164163
* ORCID
164+
* OpenAIRE
165+
* OpenMinTeD
166+
167+
### Cookie Policy
168+
169+
Cookie policy includes a banner at the bottom of each page that prompts the user to
170+
accept the cookies, along with a Cookies Policy page.
171+
The feature is disabled by default.
172+
To enable it, set `enable_cookies_banner` to `true` in the configuration file:
173+
`<path-to-simplesamlphp>/config/module_themevanilla.php`.
165174

166175

167176
## Customization
@@ -186,6 +195,7 @@ You can customise the url of the link of the logo in the header by changing
186195
the `logo_link_url` definition in `dictionaries/default.definition.json` file.
187196

188197
### Footer
198+
189199
If you want to make any changes in the footer you need to modify the template
190200
`footer.php` that is placed in: `themevanilla/themes/ssp/default/includes/`.
191201

@@ -235,8 +245,15 @@ compiling options.
235245
To modify the cookie banner and cookie policy page, you must edit the following files:
236246
`<path-to-module>/dictionaries/policy.definition.json`
237247
and to modify the table in cookie policy page:
238-
`<path-to-simplesamlphp>/config/module_themevanilla.php`
248+
`<path-to-simplesamlphp>/config/module_themevanilla.php`.
239249

250+
## Compatibility Note
251+
252+
If you want to use the theme with **SimpleSAMLphp version greater than 1.14**, you
253+
need to rename the template of the discopower module:
254+
```
255+
themes/ssp/discopower/disco-tpl.php -> themes/ssp/discopower/disco.tpl.php
256+
```
240257

241258
## About SimpleSAMLphp themes
242259

config-example/module_themevanilla.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
array('type' => 'Preferences', 'provider' => 'aai.rciam.eu', 'name' => 'rciam_co_registry_tz', 'thirdParty' => false, 'category' => 'Persistent', 'purpose' => 'Preserve preferred timezone selection for COmanage RCIAM Account Registry'),
1717
array('type' => 'Preferences', 'provider' => 'aai.rciam.eu', 'name' => 'i18next', 'thirdParty' => false, 'category' => 'Session', 'purpose' => 'Preserve preferred language for RCIAM AAI OpenID Connect Provider'),
1818
array('type' => 'Session State', 'provider' => 'aai.rciam.eu', 'name' => 'JSESSIONID', 'thirdParty' => false, 'category' => 'Session', 'purpose' => 'Preserve user session ID to retrieve session information')
19-
)
19+
),
20+
'enable_cookies_banner' => false
2021
);
2122

2223
?>

themes/ssp/default/includes/footer.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11

22
<?php
3+
$themeConfig = SimpleSAML_Configuration::getConfig('module_themevanilla.php');
4+
$enable_cookies_banner = $themeConfig->getValue('enable_cookies_banner');
5+
36
if(!empty($this->data['htmlinject']['htmlContentPost'])) {
47
foreach($this->data['htmlinject']['htmlContentPost'] AS $c) {
58
echo $c;
@@ -9,7 +12,7 @@
912
</div><!-- /container -->
1013
</div><!-- /ssp-container -->
1114

12-
<?php if(strpos($this->t('{themevanilla:discopower:cookies_text}'), 'not translated') === FALSE || strpos($this->t('{themevanilla:discopower:cookies_accept_btn_text}'), 'not translated') === FALSE) { ?>
15+
<?php if ($enable_cookies_banner) { ?>
1316
<!-- cookies popup -->
1417
<div id="cookies">
1518
<div id="cookies-wrapper">

themes/ssp/discopower/disco-tpl.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
$this->data['jquery'] = array('core' => TRUE, 'ui' => TRUE, 'css' => TRUE);
3131

3232

33-
$this->data['head'] .= '<script type="text/javascript" src="' . SimpleSAML_Module::getModuleUrl('discopower/js/jquery.livesearch.js') . '"></script>';
33+
$this->data['head'] = '<script type="text/javascript" src="' . SimpleSAML_Module::getModuleUrl('discopower/js/jquery.livesearch.js') . '"></script>';
3434
$this->data['head'] .= '<script type="text/javascript" src="' . SimpleSAML_Module::getModuleUrl('discopower/js/' . $this->data['score'] . '.js') . '"></script>';
3535

3636
$this->data['head'] .= '<script type="text/javascript">
@@ -65,7 +65,9 @@ function showEntry($t, $metadata, $favourite = FALSE, $withIcon = FALSE) {
6565

6666

6767
if($withIcon) {
68-
$label = $metadata['login_button']['label'];
68+
if(isset($metadata['login_button']['label']) && !isempty($metadata['login_button']['label'])) {
69+
$label = $metadata['login_button']['label'];
70+
}
6971
$filename = $metadata['login_button']['icon_filename'];
7072
$css_classname = $metadata['login_button']['css_classname'];
7173
$css_button_type = '';
@@ -80,7 +82,9 @@ function showEntry($t, $metadata, $favourite = FALSE, $withIcon = FALSE) {
8082

8183
$html = '<a class="metaentry ssp-btn ' . $css_button_type . ' ' . $css_classname . '" href="' . $basequerystring . urlencode($metadata['entityid']) . '">';
8284
$html .= '<img alt="Identity Provider" class="entryicon" src="' . SimpleSAML_Module::getModuleURL('themevanilla/resources/images/' . $filename ) . '" />';
83-
$html .= '<span>' . $label . '</span></a>';
85+
if (isset($label)) {
86+
$html .= '<span>' . $label . '</span></a>';
87+
}
8488
}
8589
else {
8690
$html = '<a class="metaentry " href="' . $basequerystring . urlencode($metadata['entityid']) . '">';

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
simplesamlphp-module-themevanilla
2-
version 2.1.0
2+
version 2.2.0

www/resources/images/epos.png

4.82 KB
Loading

www/resources/images/google.svg

Lines changed: 1 addition & 5 deletions
Loading

www/resources/images/openaire.png

10.5 KB
Loading
3.76 KB
Loading

0 commit comments

Comments
 (0)