Skip to content

Commit

Permalink
fix(ux): external links
Browse files Browse the repository at this point in the history
  • Loading branch information
agilare committed May 14, 2023
1 parent b9cee7e commit 8ee3982
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 14 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [3.4.6] Unreleased

### Added

- events : api sending night "fêtes" events of a day (Noctambus)

### Changed

- [ ] events form
Expand All @@ -26,11 +30,12 @@
- users - password reset : in db table rm unique of idPersonne to avoid crash
- users - edit : affiliation text wasn't saved, display "avec affiliation" field only if pertinent
- add ini_set session.gc_probability to enable auto clean of old session in Debian
- UX : added missing icon ext links
- [ ] in small screens events lists right overflow

### Added

- [ ] Doc link in menu 1 for admin users
- Doc link in menu 1 for admin users
- tests : added assertions, for most important cases in Selenium suites

### Changed
Expand Down
5 changes: 5 additions & 0 deletions admin/_menuAdmin.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,10 @@
</li>
<?php } ?>
</ul>
<ul style="list-style-type:none">
<li>
<a href="https://tools.ladecadanse.ch/doc/Administration/index.html" class="url lien_ext" target="_blank">Documentation</a>
</li>
</ul>
</div>
<!-- Fin gestion -->
10 changes: 4 additions & 6 deletions evenement.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,8 @@ function initMap() {
}
if (!empty($listeLieu['URL']))
{?>
<li><a class="url" href="<?php


if (!preg_match("/^https?:\/\//", $listeLieu['URL']))
<li><a class="url lien_ext" href="<?php
if (!preg_match("/^https?:\/\//", $listeLieu['URL']))
{
echo 'http://'.$listeLieu['URL'];
}
Expand All @@ -363,8 +361,8 @@ function initMap() {
}
?>
<?php if ($even->getValue('idLieu') == 13) { // exception pour le Rez ?>
<a href="http://kalvingrad.com" target="_blank">kalvingrad.com</a><br>
<a href="http://www.ptrnet.ch" target="_blank">ptrnet.ch</a>
<a href="http://kalvingrad.com" class="url lien_ext" target="_blank">kalvingrad.com</a><br>
<a href="http://www.ptrnet.ch" class="url lien_ext" target="_blank">ptrnet.ch</a>
<?php } ?>
</ul>
</div>
Expand Down
9 changes: 7 additions & 2 deletions lieu.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,13 @@ function initMap() {
<span class="value-title" title="<?php echo $lieu->getValue('lng'); ?>"></span>
</span>
<li><?php echo Text::wikiToHtml($lieu->getValue('horaire_general')); ?></li>
<li class="sitelieu"><a class="url" href="<?php echo $URL; ?>" title="Voir le site web du lieu" onclick="window.open(this.href,'_blank');return false;"><?php echo $lieu->getValue('URL'); ?></a> <?php if ($lieu->getId() == 13) { // exception pour le Rez ?><a href="http://kalvingrad.com" onclick="window.open(this.href,'_blank');return false;">kalvingrad.com</a><br><a href="http://www.ptrnet.ch" onclick="window.open(this.href,'_blank');return false;">ptrnet.ch</a><?php } ?></li>
<?php echo $organisateurs; ?>
<li class="sitelieu">
<?php if (!empty($URL)) { ?>
<a class="url lien_ext" href="<?php echo $URL; ?>" title="Voir le site web du lieu" target="_blank"><?php echo $lieu->getValue('URL'); ?></a>
<?php } ?>
<?php if ($lieu->getId() == 13) { // exception pour le Rez ?><a href="http://kalvingrad.com" class="url lien_ext" target="_blank">kalvingrad.com</a><br><a href="http://www.ptrnet.ch" class="url lien_ext" target="_blank">ptrnet.ch</a><?php } ?>
</li>
<?php echo $organisateurs; ?>
</ul>
<div id="plan" style="display:none"><div id="map"></div></div>
</div><!-- Fin pratique -->
Expand Down
13 changes: 8 additions & 5 deletions organisateur.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,13 @@

<!-- Deb pratique -->
<div id="pratique">
<ul>
<li class="siteLieu"><a class="url" href="<?php echo $URL; ?>" onclick="window.open(this.href,'_blank');return false;">
<?php echo $organisateur->getValue('URL'); ?></a></li>
<?php echo $lieux; ?>
<ul>
<?php if (!empty($URL)) { ?>
<li class="siteLieu"><a href="<?php echo $URL; ?>" class="url lien_ext" target="_blank">
<?php echo $organisateur->getValue('URL'); ?></a>
</li>
<?php } ?>
<?php echo $lieux; ?>
<?php echo $membres; ?>
</ul>

Expand Down Expand Up @@ -473,7 +476,7 @@
if (!preg_match("/^(https?:\/\/)/i", $organisateur->getValue('URL'))) {
$URLcomplete = "http://" . $organisateur->getValue('URL');
}
echo "<p>Pour des informations complémentaires : <a href=\"" . $URLcomplete . "\" title=\"Aller sur le site web\" onclick=\"window.open(this.href,'_blank');return false;\">" . $organisateur->getValue('URL') . "</a></p>\n";
echo "<p>Pour des informations complémentaires : <a href=\"" . $URLcomplete . "\" class=\"lien_ext\" target=\"_blank\">" . $organisateur->getValue('URL') . "</a></p>\n";
}

echo '</div>';
Expand Down

0 comments on commit 8ee3982

Please sign in to comment.