Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit ac080b7

Browse files
committed
Fixed showing entry on wayf with tag 'preferred'
1 parent 93d8f45 commit ac080b7

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
All notable changes to this project will be documented in this file.
33

44
## [Unreleased]
5+
[Fixed]
6+
- Fixed showing entry on wayf with tag 'preferred'
57

68
## [v3.0.0]
79
[Added]

themes/perun/perun/disco-tpl.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,9 @@ function searchScript()
251251
function showEntry($t, $metadata, $favourite = false)
252252
{
253253

254-
if (isset($metadata['tags']) && in_array('social', $metadata['tags'])) {
255-
return showEntrySocial($t, $metadata);
254+
if (isset($metadata['tags']) &&
255+
(in_array('social', $metadata['tags']) || in_array('preferred', $metadata['tags']))) {
256+
return showTaggedEntry($t, $metadata);
256257
}
257258

258259
$extra = ($favourite ? ' favourite' : '');
@@ -273,15 +274,15 @@ function showEntry($t, $metadata, $favourite = false)
273274
* @param array $metadata
274275
* @return string html
275276
*/
276-
function showEntrySocial($t, $metadata)
277+
function showTaggedEntry($t, $metadata)
277278
{
278279

279280
$bck = 'white';
280281
if (!empty($metadata['color'])) {
281282
$bck = $metadata['color'];
282283
}
283284

284-
$html = '<a class="btn btn-block social" href="' . $t->getContinueUrl($metadata['entityid']) .
285+
$html = '<a class="btn btn-block tagged" href="' . $t->getContinueUrl($metadata['entityid']) .
285286
'" style="background: ' . $bck . '">';
286287

287288
$html .= '<img src="' . $metadata['icon'] . '">';

www/res/css/disco.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ a.metaentryrow .idp-logo {
2323
padding: 3px;
2424
}
2525

26-
a.social {
26+
a.tagged {
2727
padding: 10px;
2828
text-align: left;
2929
color: white;
3030
border: 1px solid rgba(0, 0, 0, 0.2);
3131
}
3232

33-
a.social img {
33+
a.tagged img {
3434
display: inline-block;
3535
height: 40px;
3636
max-height: 40px;
@@ -41,14 +41,14 @@ a.social img {
4141
border-right: 1px solid rgba(0, 0, 0, 0.2);
4242
}
4343

44-
a.social:hover, a.social:focus {
44+
a.tagged:hover, a.tagged:focus {
4545
color: white;
4646
background: rgba(0, 0, 0, 0.2);
4747
border: 1px solid rgba(0, 0, 0, 0.3);
4848
box-shadow: 0px 0px 10px 30px rgba(0, 0, 0, 0.1) inset;
4949
}
5050

51-
a.social:hover img {
51+
a.tagged:hover img {
5252
border-right: 1px solid rgba(0, 0, 0, 0.3);
5353
}
5454

0 commit comments

Comments
 (0)