Skip to content

Commit

Permalink
cam21712 - ajouter la section en français (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
syw1-art authored Oct 10, 2024
1 parent 4df35da commit dfae0d7
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 12 deletions.
6 changes: 3 additions & 3 deletions Koha/Plugin/Carrousel.pm
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ BEGIN {
$module->import;
}

our $VERSION = "4.3.1";
our $VERSION = "4.3.2";
our $metadata = {
name => 'Carrousel 4.3.1',
name => 'Carrousel 4.3.2',
author => 'Mehdi Hamidi, Maryse Simard, Brandon Jimenez, Alexis Ripetti, Salman Ali, Hinemoea Viault, Hammat Wele, Salah Eddine Ghedda, Matthias Le Gac, Alexandre Noël, Shi Yao Wang',
description => 'Generates a carrousel from available data sources (lists, reports or collections).',
date_authored => '2016-05-27',
date_updated => '2024-10-04',
date_updated => '2024-10-10',
minimum_version => '18.05',
maximum_version => undef,
version => $VERSION,
Expand Down
1 change: 1 addition & 0 deletions Koha/Plugin/Carrousel/configure.tt
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ function addLine (module, id, name) {
+ " <option value=\"[% branch.branchcode %]\">[% branch.branchname %]</option>"
[% END %]
+ " </select>"
+ " </td>"
[% END %]
+ " <td class=\"center\">"
+ " <input type=\"checkbox\" name=\"autorotate-" + module + "-" + id + "\" value=\"" + id + "\" />"
Expand Down
28 changes: 27 additions & 1 deletion Koha/Plugin/Carrousel/configure_fr-CA.tt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
<th>Nom</th>
<th>Titre</th>
<th>Type</th>
[% IF !Koha.Preference('IndependentBranches') %]
<th>Bibliothèque</th>
[% END %]
<th>Auto rotation</th>
<th>Ordre</th>
<th>URL externe</th>
Expand Down Expand Up @@ -87,6 +90,16 @@
<input id="scrolling-title" type="radio" name="type-[% carrousel.module %]-[% carrousel.id %]" value="scrolling-title" [% IF carrousel.type == "scrolling-title" %]checked="checked"[% END %] />
</div>
</td>
[% IF !Koha.Preference('IndependentBranches') %]
<td>
<select name="library-[% carrousel.module %]-[% carrousel.id %]">
<option value="">Toutes les bibliothèques</option>
[% FOREACH branch IN branches %]
<option value="[% branch.branchcode %]" [% IF branch.branchcode == carrousel.branchcode %]selected[% END %]>[% branch.branchname %]</option>
[% END %]
</select>
</td>
[% END %]
<td class="center">
<input type="checkbox" name="autorotate-[% carrousel.module %]-[% carrousel.id %]" value="[% carrousel.id %]" [% IF carrousel.autorotate %]checked="checked"[% END %] />
</td>
Expand Down Expand Up @@ -387,8 +400,11 @@ $("#doc3 form").submit(function (){
title : carrousel.find("[name^='title']").val(),
suffix : carrousel.find("[name^='suffix']").val(),
type : carrousel.find("[name^='type']:checked").val(),
[% IF !Koha.Preference('IndependentBranches') %]
branchcode : carrousel.find("[name^='library']").val(),
[% END %]
autorotate : carrousel.find("[name^='autorotate']").prop('checked') ? 1 : 0,
external : carrousel.find("[name^='external']").prop('checked') ? 1 : 0
external : carrousel.find("[name^='external']").prop('checked') ? 1 : 0
};
enablings.push(data);
});
Expand Down Expand Up @@ -462,6 +478,16 @@ function addLine (module, id, name) {
+ " <input id=\"scrolling-title\" type=\"radio\" name=\"type-" + module + "-" + id + "\" value=\"scrolling-title\" />"
+ " </div>"
+ " </td>"
[% IF !Koha.Preference('IndependentBranches') %]
+ " <td>"
+ " <select name=\"library-" + module + "-" + id + "\">"
+ " <option value=\"\">Toutes les bibliothèques</option>"
[% FOREACH branch IN branches %]
+ " <option value=\"[% branch.branchcode %]\">[% branch.branchname %]</option>"
[% END %]
+ " </select>"
+ " </td>"
[% END %]
+ " <td class=\"center\">"
+ " <input type=\"checkbox\" name=\"autorotate-" + module + "-" + id + "\" value=\"" + id + "\" />"
+ " </td>"
Expand Down
26 changes: 26 additions & 0 deletions Koha/Plugin/Carrousel/configure_fr.tt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
<th>Nom</th>
<th>Titre</th>
<th>Type</th>
[% IF !Koha.Preference('IndependentBranches') %]
<th>Bibliothèque</th>
[% END %]
<th>Auto rotation</th>
<th>Ordre</th>
<th>URL externe</th>
Expand Down Expand Up @@ -87,6 +90,16 @@
<input id="scrolling-title" type="radio" name="type-[% carrousel.module %]-[% carrousel.id %]" value="scrolling-title" [% IF carrousel.type == "scrolling-title" %]checked="checked"[% END %] />
</div>
</td>
[% IF !Koha.Preference('IndependentBranches') %]
<td>
<select name="library-[% carrousel.module %]-[% carrousel.id %]">
<option value="">Toutes les bibliothèques</option>
[% FOREACH branch IN branches %]
<option value="[% branch.branchcode %]" [% IF branch.branchcode == carrousel.branchcode %]selected[% END %]>[% branch.branchname %]</option>
[% END %]
</select>
</td>
[% END %]
<td class="center">
<input type="checkbox" name="autorotate-[% carrousel.module %]-[% carrousel.id %]" value="[% carrousel.id %]" [% IF carrousel.autorotate %]checked="checked"[% END %] />
</td>
Expand Down Expand Up @@ -387,6 +400,9 @@ $("#doc3 form").submit(function (){
title : carrousel.find("[name^='title']").val(),
suffix : carrousel.find("[name^='suffix']").val(),
type : carrousel.find("[name^='type']:checked").val(),
[% IF !Koha.Preference('IndependentBranches') %]
branchcode : carrousel.find("[name^='library']").val(),
[% END %]
autorotate : carrousel.find("[name^='autorotate']").prop('checked') ? 1 : 0,
external : carrousel.find("[name^='external']").prop('checked') ? 1 : 0
};
Expand Down Expand Up @@ -462,6 +478,16 @@ function addLine (module, id, name) {
+ " <input id=\"scrolling-title\" type=\"radio\" name=\"type-" + module + "-" + id + "\" value=\"scrolling-title\" />"
+ " </div>"
+ " </td>"
[% IF !Koha.Preference('IndependentBranches') %]
+ " <td>"
+ " <select name=\"library-" + module + "-" + id + "\">"
+ " <option value=\"\">Toutes les bibliothèques</option>"
[% FOREACH branch IN branches %]
+ " <option value=\"[% branch.branchcode %]\">[% branch.branchname %]</option>"
[% END %]
+ " </select>"
+ " </td>"
[% END %]
+ " <td class=\"center\">"
+ " <input type=\"checkbox\" name=\"autorotate-" + module + "-" + id + "\" value=\"" + id + "\" />"
+ " </td>"
Expand Down
14 changes: 6 additions & 8 deletions Koha/Plugin/Carrousel/opac-carrousel.tt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<a href="[% item.externalUrl %][% carrousel.suffix %]" title="[% item.title %]"><img class="cloudcarousel" src="[% item.url %]" alt="[% item.title %]" >[% IF carrousel.type == "scrolling-title" %]<h3>[% item.title %]</h3>[% END %]</a>
[% ELSE %]
<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% item.biblionumber %][% carrousel.suffix %]" title="[% item.title %]"><img class="cloudcarousel" src="[% item.url %]" alt="[% item.title %]" >[% IF carrousel.type == "scrolling-title" %]<h3>[% item.title %]</h3>[% END %]</a>
[% END %]
[% END %]
[% END %]
</div>
</div>
Expand Down Expand Up @@ -89,7 +89,7 @@
}

/*De bootstrap pour le carrousel*/

.carousel {
position: relative;
margin-bottom: 20px;
Expand Down Expand Up @@ -170,7 +170,6 @@
padding-right: 5px;
/*opacity: 0.5;*/
filter: alpha(opacity=50);

}

.carousel-control.right {
Expand Down Expand Up @@ -233,7 +232,7 @@
.carousel-caption p {
margin-bottom: 0;
}

/*De bootstrap pour le carrousel FIN*/


Expand Down Expand Up @@ -301,7 +300,7 @@
background-color: #d5e1df;
}

#inlibro-carrousel .special-title{
#inlibro-carrousel .special-title{
text-align: center;
margin: 0;
margin-top: 10px;
Expand Down Expand Up @@ -487,7 +486,7 @@ function Left (button){
}, scrolling_duration, function() {
$(container).css("left", "0");
$(container).append($(container).find("a").first());
});
});
};
function Right (button){
let container = document.getElementById(button.className).getElementsByClassName("images")[0];
Expand All @@ -507,10 +506,9 @@ window.addEventListener('load', function() {
$('.carrousel .cloudcarousel').each( function() {

if( $(this).length > 0 ){

if( (this.complete != null) && (!this.complete) || this.naturalHeight == 0 ){
$(this).parent().remove();
}
}
}
});

Expand Down

0 comments on commit dfae0d7

Please sign in to comment.