Skip to content

Commit

Permalink
Merge branch 'release/1.2.14'
Browse files Browse the repository at this point in the history
  • Loading branch information
jdelasoie committed Oct 26, 2018
2 parents 598f521 + 21bc602 commit b6e6a76
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 79 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@

# CHANGELOG

*1.2.14* (2018-10-26)
- Styleguide 1.3.3 with temporary fixes
- Language switcher fix
- Javascript crashing fix
- Fix People list not in a container

*1.2.13* (2018-10-25)
- Styleguide 1.3.1
- Styleguide 1.3.3
- Add a search to the 404 page (#119)
- Add a way to render people in list (#126)
- Fix toggle id to beunique (#121)
- Fix toggle id to be unique (#121)
- Add some translations (#118)
- Fix richtext render for epfl-card and epfl-contact (#123)

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.13
1.2.14
2 changes: 1 addition & 1 deletion assets/css/base.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/app.bundle.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions shortcodes/epfl_contact/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
$gray_wrapper = $data['gray_wrapper'];
?>

<div class="container-full <?php echo ($gray_wrapper) ? 'bg-gray-100 py-2 my-5' : 'my-3'; ?>">
<div class="container <?php echo ($gray_wrapper) ? 'bg-gray-100 py-2 my-5' : 'my-3'; ?>">
<?php if ($gray_wrapper): ?>
<div class="bg-white p-4 p-md-5">
<?php endif; ?>
Expand All @@ -15,7 +15,7 @@
<?php for ($i=1; $i < 5; $i++): ?>
<?php if ($data['timetable'.$i]): ?>
<div class="card card-body card-sm mb-2 flex-row flex-wrap justify-content-between justify-content-sm-start">
<div class="mr-3 w-sm-50"><?php echo $data['timetable'.$i] ?: '' ?></div>
<div class="mr-3 w-sm-50"><?php echo $data['timetable'.$i] ?></div>
</div>
<?php
endif;
Expand Down
141 changes: 70 additions & 71 deletions shortcodes/epfl_people/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,80 +4,79 @@
# $nb_column can be 1, 3 or 'list'
$nb_column = get_query_var('epfl_people_nb_columns');
?>

<?php if ($nb_column === 'list'): ?>
<div class="contact-list">
<?php
foreach($persons as $index => $person):
$photo_url = epfl_people_get_photo($person);
$phones = epfl_people_get_phones($person);
$functions = epfl_people_get_functions($person);
$rooms = epfl_people_get_rooms($person);
$room_url = epfl_people_get_room_url($rooms[0]);
$people_url = epfl_people_get_people_url($person);
?>
<div class="contact-list-row" itemscope itemtype="http://schema.org/Person">
<div class="contact-list-avatar" itemprop="image">
<?php if ($photo_url): ?>
<picture>
<img src="<?php echo esc_url($photo_url) ?>" style="width:1.9rem;" class="img-fluid rounded-circle" alt="<?php echo esc_attr($person->prenom) ?> <?php echo esc_attr($person->nom) ?>">
</picture>
<?php endif; ?>
</div>
<a href="<?php echo esc_url($people_url) ?>" class="contact-list-item" itemprop="name"><?php echo esc_attr($person->prenom) ?> <?php echo esc_attr($person->nom) ?></a>
<p class="contact-list-item m-0 text-muted" itemprop="jobTitle"><?php echo esc_html($functions[0]) ?></p>
<a class="contact-list-item text-muted" href="mailto:<?php echo esc_attr($person->email) ?>" itemprop="email"><?php echo esc_attr($person->email) ?></a>
<a class="contact-list-item text-muted" href="tel:<?php echo esc_html($phones[0]) ?>" itemprop="telephone"><?php if ($phones[0]): ?>+41 21 69 <b><?php echo esc_html($phones[0]) ?></b><?php endif ?></a>
<a class="contact-list-item text-muted" href="<?php echo esc_url($room_url) ?>" itemprop="workLocation"><?php echo esc_html($rooms[0]) ?></a>
</div>
<?php endforeach; ?>
</div>
<?php else: ?>
<?php if ($nb_column === '3'): ?>
<div class="container">
<div class="card-deck">
<?php endif; ?>
<?php
foreach($persons as $index => $person):
$photo_url = epfl_people_get_photo($person);
$phones = epfl_people_get_phones($person);
$functions = epfl_people_get_functions($person);
$rooms = epfl_people_get_rooms($person);
$room_url = epfl_people_get_room_url($rooms[0]);
$people_url = epfl_people_get_people_url($person);
?>
<div class="card">
<div class="card-body">
<div class="my-3 align-items-center">
<?php if ($photo_url): ?>
<img style="width:100px;" class="img-fluid rounded-circle mr-4" src="<?php echo esc_url($photo_url) ?>" alt="<?php echo esc_attr($person->prenom) ?> <?php echo esc_attr($person->nom) ?>">
<div class="container my-3">
<?php if ($nb_column === 'list'): ?>
<div class="contact-list">
<?php
foreach($persons as $index => $person):
$photo_url = epfl_people_get_photo($person);
$phones = epfl_people_get_phones($person);
$functions = epfl_people_get_functions($person);
$rooms = epfl_people_get_rooms($person);
$room_url = epfl_people_get_room_url($rooms[0]);
$people_url = epfl_people_get_people_url($person);
?>
<div class="contact-list-row" itemscope itemtype="http://schema.org/Person">
<div class="contact-list-avatar" itemprop="image">
<?php if ($photo_url): ?>
<picture>
<img src="<?php echo esc_url($photo_url) ?>" style="width:1.9rem;" class="img-fluid rounded-circle" alt="<?php echo esc_attr($person->prenom) ?> <?php echo esc_attr($person->nom) ?>">
</picture>
<?php endif; ?>
<div class="w-100 mt-2 mt-md-0">
<?php if ($person->email): ?>
<a class="btn btn-block btn-primary mb-2" href="mailto:<?php echo esc_attr($person->email) ?>"><?php echo esc_html($person->email) ?></a>
<?php endif ?>
<?php if ($phones[0]): ?>
<a class="btn btn-block btn-secondary" href="tel:<?php echo esc_html($phones[0]) ?>"><?php echo esc_html($phones[0]) ?></a>
<?php endif ?>
</div>
</div>
<h3><a class="link-pretty" href="<?php echo esc_url($people_url) ?>"><?php echo esc_html($person->prenom) ?> <?php echo esc_html($person->nom) ?></a></h3>
<dl class="definition-list definition-list-grid mb-0">
<dt>Fonction</dt>
<dd><?php echo esc_html($functions[0]) ?></dd>
<dt>Bureau</dt>
<dd><a class="link-pretty" href="<?php echo esc_url($room_url) ?>"><?php echo esc_html($rooms[0]) ?></a></dd>
</dl>
</div>
<a href="<?php echo esc_url($people_url) ?>" class="contact-list-item" itemprop="name"><?php echo esc_attr($person->prenom) ?> <?php echo esc_attr($person->nom) ?></a>
<p class="contact-list-item m-0 text-muted" itemprop="jobTitle"><?php echo esc_html($functions[0]) ?></p>
<a class="contact-list-item text-muted" href="mailto:<?php echo esc_attr($person->email) ?>" itemprop="email"><?php echo esc_attr($person->email) ?></a>
<a class="contact-list-item text-muted" href="tel:<?php echo esc_html($phones[0]) ?>" itemprop="telephone"><?php if ($phones[0]): ?>+41 21 69 <b><?php echo esc_html($phones[0]) ?></b><?php endif ?></a>
<a class="contact-list-item text-muted" href="<?php echo esc_url($room_url) ?>" itemprop="workLocation"><?php echo esc_html($rooms[0]) ?></a>
</div>
<?php if($index % $nb_column == 0): ?></div"><?php endif; ?>
<?php endforeach; ?>
<?php for($i=$index+1; $i % $nb_column != 0; $i++): ?>
<div class="">
</div>
<?php endfor; ?>
<?php if ($nb_column === '3'): ?>
</div>
<?php else: ?>
<?php if ($nb_column === '3'): ?>
<div class="card-deck">
<?php endif; ?>
<?php
foreach($persons as $index => $person):
$photo_url = epfl_people_get_photo($person);
$phones = epfl_people_get_phones($person);
$functions = epfl_people_get_functions($person);
$rooms = epfl_people_get_rooms($person);
$room_url = epfl_people_get_room_url($rooms[0]);
$people_url = epfl_people_get_people_url($person);
?>
<div class="card">
<div class="card-body">
<div class="my-3 align-items-center">
<?php if ($photo_url): ?>
<img style="width:100px;" class="img-fluid rounded-circle mr-4 mb-1" src="<?php echo esc_url($photo_url) ?>" alt="<?php echo esc_attr($person->prenom) ?> <?php echo esc_attr($person->nom) ?>">
<?php endif; ?>
<div class="w-100 mt-2 mt-md-0">
<?php if ($person->email): ?>
<a class="btn btn-block btn-primary mb-2" href="mailto:<?php echo esc_attr($person->email) ?>"><?php echo esc_html($person->email) ?></a>
<?php endif ?>
<?php if ($phones[0]): ?>
<a class="btn btn-block btn-secondary" href="tel:<?php echo esc_html($phones[0]) ?>"><?php echo esc_html($phones[0]) ?></a>
<?php endif ?>
</div>
</div>
<h3><a class="link-pretty" href="<?php echo esc_url($people_url) ?>"><?php echo esc_html($person->prenom) ?> <?php echo esc_html($person->nom) ?></a></h3>
<dl class="definition-list definition-list-grid mb-0">
<dt>Fonction</dt>
<dd><?php echo esc_html($functions[0]) ?></dd>
<dt>Bureau</dt>
<dd><a class="link-pretty" href="<?php echo esc_url($room_url) ?>"><?php echo esc_html($rooms[0]) ?></a></dd>
</dl>
</div>
</div>
<?php if($index % $nb_column == 0): ?></div"><?php endif; ?>
<?php endforeach; ?>
<?php for($i=$index+1; $i % $nb_column != 0; $i++): ?>
<div class="">
</div>
<?php endfor; ?>
<?php if ($nb_column === '3'): ?>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
<?php endif; ?>
<?php endif; ?>
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Theme URI:
Author: Antistatique.net
Author URI: http://antistatique.net/
Description: Description
Version: 1.2.13
Version: 1.2.14
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: epfl
Expand Down

0 comments on commit b6e6a76

Please sign in to comment.