Skip to content

Commit

Permalink
Merge pull request #107 from bmlt-enabled/2.1
Browse files Browse the repository at this point in the history
2.1
  • Loading branch information
otrok7 authored Aug 26, 2019
2 parents 1c077f4 + b6ca987 commit f2bd707
Show file tree
Hide file tree
Showing 22 changed files with 443 additions and 606 deletions.
801 changes: 243 additions & 558 deletions bmlt-meeting-list.php

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
{
"type": "git",
"url": "https://github.com/mpdf/mpdf"
},
{
"type": "git",
"url": "https://github.com/myclabs/DeepCopy"
}
],
"require": {
Expand Down
23 changes: 11 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion includes/booklet_settings.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion includes/four_column_settings.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion includes/three_column_settings.json

Large diffs are not rendered by default.

18 changes: 16 additions & 2 deletions js/bmlt_meeting_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,14 @@ var $ml = jQuery.noConflict
$ml('.neighborhood_by_suffix').show();
$ml('.city_by_suffix').show();
}
if (meeting_sort_val == 'weekday_area'
|| meeting_sort_val == 'weekday_city'
|| meeting_sort_val == 'weekday_county'
|| meeting_sort_val == 'state') {
$ml('.show_subheader').show();
} else {
$ml('.show_subheader').hide();
}
$ml("#suppress_heading").click(function() {
var val = $ml("#suppress_heading:checked").val();
if (val == 1) {
Expand Down Expand Up @@ -432,6 +440,14 @@ var $ml = jQuery.noConflict
$ml('.neighborhood_by_suffix').show();
$ml('.city_by_suffix').show();
}
if (meeting_sort_val == 'weekday_area'
|| meeting_sort_val == 'weekday_city'
|| meeting_sort_val == 'weekday_county'
|| meeting_sort_val == 'state') {
$ml('.show_subheader').show();
} else {
$ml('.show_subheader').hide();
}
});
var time_clock_val = $ml('input[name=time_clock]:checked').val();
if (time_clock_val == '24') {
Expand Down Expand Up @@ -558,8 +574,6 @@ var $ml = jQuery.noConflict
$ml("#meeting-list-tabs ul li:eq(6)").show();
$ml('#meeting-list-tabs').tabs('disable', 5);
$ml('#meeting-list-tabs').tabs('enable', 6);
$ml('input[name=page_height]').val(['']);
$ml('#pageheightdiv').hide();
$ml('#columngapdiv').hide();
$ml('#columnseparatordiv').hide();
$ml("#half-fold").css({
Expand Down
9 changes: 9 additions & 0 deletions lang/translate_de.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
$translate = array (
"LANG_NAME" => "German",
"LOCALE" => "de_DE",
"WEEKDAYS" => array( 'ERROR', 'Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag' ),
"WKDYS" => array( 'ERR', 'So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa' ),
"PAGE" => "Seite",
"CONT" => "weiter"
);
9 changes: 9 additions & 0 deletions lang/translate_dk.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
$translate = array (
"LANG_NAME" => "Danish",
"LOCALE" => "da_DK",
"WEEKDAYS" => array( 'ERROR', "S&#248;ndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "L&#248;rdag" ),
"WKDYS" => array( 'ERR', "S&#248;ndag", "Ma", "Ti", "On", "To", "Fr", "L&#248;" ),
"PAGE" => "Side",
"CONT" => "forts"
);
9 changes: 9 additions & 0 deletions lang/translate_en.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
$translate = array (
"LANG_NAME" => "English",
"LOCALE" => "en_US",
"WEEKDAYS" => array( 'ERROR', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ),
"WKDYS" => array( 'ERR', 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ),
"PAGE" => "Page",
"CONT" => "cont"
);
8 changes: 8 additions & 0 deletions lang/translate_en_es.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
$translate = array (
"LANG_NAME" => "English/Spanish",
"WEEKDAYS" => array( 'ERROR', "Sunday / Domingo", "Monday / Lunes", "Tuesday / Martes", "Wednesday / Mi&eacute;rcoles", "Thursday / Jueves", "Friday / Viernes", "Saturday / S&aacute;bado" ),
"WKDYS" => array( 'ERR', 'Sun / Dom', 'Mon / Lun', 'Tue / Mar', 'Wed / Mi&eacute;', 'Thu / Jue', 'Fri / Vie', 'Sat / S&aacute;b' ),
"PAGE" => "Page",
"CONT" => "cont"
);
8 changes: 8 additions & 0 deletions lang/translate_en_po.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
$translate = array (
"LANG_NAME" => "English/Portugese",
"WEEKDAYS" => array( 'ERROR', "Sunday / Domingo", "Monday / Lunes / Segunda-feira", "Tuesday / Martes / Terça-feira", "Wednesday / Mi&eacute;rcoles / Quarta-feira", "Thursday / Jueves / Quinta-feira", "Friday / Viernes / Sexta-feira", "Saturday / S&aacute;bado" ),
"WKDYS" => array( 'ERR', 'Sun / Dom', 'Mon / Lun / Seg', 'Tue / Mar / Ter', 'Wed / Mi&eacute; / Qua', 'Thu / Jue / Qui', 'Fri / Vie / Sex', 'Sat / S&aacute;b' ),
"PAGE" => "Page",
"CONT" => "cont"
);
9 changes: 9 additions & 0 deletions lang/translate_es.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
$translate = array (
"LANG_NAME" => "Spanish",
"LOCALE" => "es_ES",
"WEEKDAYS" => array( 'ERROR', "Domingo", "Lunes", "Martes", "Mi&eacute;rcoles", "Jueves", "Viernes", "S&aacute;bado" ),
"WKDYS" => array( 'ERR', 'Dom', 'Lun', 'Mar', 'Mi&eacute;', 'Jue', 'Vie', 'S&aacute;b' ),
"PAGE" => "P&aacute;gina",
"CONT" => "cont"
);
16 changes: 16 additions & 0 deletions lang/translate_fa.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php
$translate = array (
"LANG_NAME" => "Farsi",
"LOCALE" => "fa_IR",
"WEEKDAYS" => array( 'ERROR',
mb_convert_encoding ('یَکشَنبه', 'HTML-ENTITIES'),
mb_convert_encoding ('دوشَنبه', 'HTML-ENTITIES'),
mb_convert_encoding ('سه‌شنبه', 'HTML-ENTITIES'),
mb_convert_encoding ('چهار شنبه', 'HTML-ENTITIES'),
mb_convert_encoding ('پَنج شَنبه', 'HTML-ENTITIES'),
mb_convert_encoding ('جُمعه', 'HTML-ENTITIES'),
mb_convert_encoding ('شَنبه', 'HTML-ENTITIES')),
"WKDYS" => array( 'ERR', 'So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa' ),
"PAGE" => "Seite",
"CONT" => "Weiter"
);
9 changes: 9 additions & 0 deletions lang/translate_fr.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
$translate = array (
"LANG_NAME" => "French",
"LOCALE" => "fr_FR",
"WEEKDAYS" => array( 'ERROR', "Dimanche", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi" ),
"WKDYS" => array( 'ERR', 'Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam' ),
"PAGE" => "Page",
"CONT" => "suite"
);
8 changes: 8 additions & 0 deletions lang/translate_fr_en.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
$translate = array (
"LANG_NAME" => "French/English",
"WEEKDAYS" => array( 'ERROR', "Dimanche / Sunday", "Lundi / Monday", "Mardi / Tuesday", "Mercredi / Wednesday", "Jeudi / Thursday", "Vendredi / Friday", "Samedi / Saturday" ),
"WKDYS" => array( 'ERR', 'Dim / Sun', 'Lun / Mon', 'Mar / Tues', 'Mer / Wed', 'Jeu / Thu', 'Ven / Fri', 'Sam / Sat' ),
"PAGE" => "Page",
"CONT" => "suite"
);
9 changes: 9 additions & 0 deletions lang/translate_it.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
$translate = array (
"LANG_NAME" => "Italian",
"LOCALE" => "it_IT",
"WEEKDAYS" => array( 'ERROR', "Domenica", "Luned&igrave;", "Marted&igrave;", "Mercoled&igrave;", "Gioved&igrave;", "Venerd&igrave;", "Sabato" ),
"WKDYS" => array( 'ERR', "Do", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab" ),
"PAGE" => "Pagina",
"CONT" => "continua"
);
9 changes: 9 additions & 0 deletions lang/translate_po.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
$translate = array (
"LANG_NAME" => "Portugese",
"LOCALE" => "pt_PT",
"WEEKDAYS" => array( 'ERROR', "Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "S&aacute;bado" ),
"WKDYS" => array( 'ERR', 'Dom', 'Seq', 'Ter', 'Qua', 'Qui', 'Sex', 'S&aacute;b' ),
"PAGE" => "Seite",
"CONT" => "Weiter"
);
9 changes: 9 additions & 0 deletions lang/translate_se.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php
$translate = array (
"LANG_NAME" => "Swedish",
"LOCALE" => "sv_SE",
"WEEKDAYS" => array( 'ERROR', "S&#246;ndag", "M&#229;ndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "L&#246;rdag" ),
"WKDYS" => array( 'ERR', "S&#246;n", "M&#229;n", "Tis", "Ons", "Tors", "Fre", "L&#246;r" ),
"PAGE" => "Side",
"CONT" => "forts"
);
13 changes: 13 additions & 0 deletions partials/_layout_setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,19 @@
</select>
</td>
</tr>
<tr>
<input class="mlg" name="colorspace" value="0" type="hidden">
<td style="padding-right: 10px;">
<label for="colorspace">Color space: </label>
<select id="colorspace" name="colorspace">
<option value="0"<?php echo $this->options['colorspace'] == '0' ? "selected=\"selected\"" : ""?>>Unrestricted</option>
<option value="1"<?php echo $this->options['colorspace'] == '1' ? "selected=\"selected\"" : ""?>>Greyscale</option>
<option value="2"<?php echo $this->options['colorspace'] == '2' ? "selected=\"selected\"" : ""?>>RGB</option>
<option value="3"<?php echo $this->options['colorspace'] == '3' ? "selected=\"selected\"" : ""?>>CMYK</option>
</select>
</td>

</tr>
</table>
</p>
</div>
Expand Down
62 changes: 31 additions & 31 deletions partials/_meetings_setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
<input name="header_bold" value="0" type="hidden">
<td><label for="header_bold">Bold: </label><input type="checkbox" name="header_bold" value="1" <?php echo ($this->options['header_bold'] == '1' ? 'checked' : '') ?>></td>
<td style="padding-right: 10px;">
<input name="sub_header_shown" value="0" type="hidden">
<td><label for="sub_header_shown">Display Sub Heading: </label><input type="checkbox" name="sub_header_shown" value="1" <?php echo ($this->options['sub_header_shown'] == '1' ? 'checked' : '') ?>></td>
<input name="cont_header_shown" value="0" type="hidden">
<td><label for="cont_header_shown">Display (Cont) Header: </label><input type="checkbox" name="cont_header_shown" value="1" <?php echo ($this->options['cont_header_shown'] == '1' ? 'checked' : '') ?>></td>
</tr></table></div>
<p>
<div class="group_by" style="margin-right: 10px; display: inline;">
Expand Down Expand Up @@ -99,30 +99,21 @@

</p>
</div>
<?php
$languages = [
"en" => "English",
"fr" => "French",
"po" => "Portuguese",
"both" => "English/Spanish",
"both_po" => "English/Spanish/Portuguese",
"fr_en" => "French/English",
"se" => "Swedish",
"dk" => "Danish",
"de" => "German",
"fa" => "Farsi",
"it" => "Italian"
];
?>
<div class="show_subheader">
<p>
<input name="sub_header_shown" value="0" type="hidden">
<label for="sub_header_shown">Display Sub Heading: </label><input type="checkbox" name="sub_header_shown" value="1" <?php echo ($this->options['sub_header_shown'] == '1' ? 'checked' : '') ?>>
</p>
</div>
<div class="weekday_language_div">
<label for="weekday_language">Weekday Language: </label>
<select name="weekday_language">
<?php
foreach ($languages as $key => $value) {
foreach ($this->translate as $key => $value) {
if ($this->options['weekday_language'] == $key || $this->options['weekday_language'] == '' ) {
echo "<option value=\"$key\" selected=\"selected\">$value</option>";
echo "<option value=\"$key\" selected=\"selected\">".$value['LANG_NAME']."</option>";
} else {
echo "<option value=\"$key\">$value</option>";
echo "<option value=\"$key\">".$value['LANG_NAME']."</option>";
}
}
?>
Expand Down Expand Up @@ -174,15 +165,6 @@
<p>
Default Font Size: <input min="4" max="18" step=".1" size="3" maxlength="3" type="number" class="bmlt-input-field" style="display:inline;" id="content_font_size" name="content_font_size" value="<?php echo $this->options['content_font_size'] ;?>" />&nbsp;&nbsp;
Line Height: <input min="1" max="3" step=".1" size="3" maxlength="3" type="number" class="bmlt-input-field" style="display:inline;" id="content_line_height" type="text" maxlength="3" size="3" name="content_line_height" value="<?php echo $this->options['content_line_height'] ;?>" />&nbsp;&nbsp
<?php $title = '
<p>Page Height Adjust will add or remove space at the bottom of the meeting list.</p>
<p>1. Decrease value if a Group Header is missing at the top of the meeting list (-5, -10, etc).</p>
<p>2. increase value when using a small meeting font to fit more meetings (+5, +10, etc).</p>
';
?>
Page Height Adjust: <input min="-50" max="50" step="1" size="4" maxlength="4" type="number" class="bmlt-input-field" style="display:inline;" name="page_height_fix" value="<?php echo $this->options['page_height_fix'] ;?>" /><span title='<?php echo $title; ?>' class="top-middle-tooltip"></span>
</p>
<div><i>Decrease Page Height Adjust if <strong>MEETING GROUP HEADER</strong> is missing.</i></div>
<div><i>Avoid using tables which will greatly slow down the generation time. Use CSS instead to get table-like effects if need be.</i></div>
<div style="margin-top:0px; margin-bottom:20px; max-width:100%; width:100%;">
<?php
Expand Down Expand Up @@ -316,8 +298,8 @@
This section allows the definition of an additional meeting list, containing meetings that should not be included in the main
list. This is typically service meetings, but it can be any group of meetings identified by a format.
</p><p>
<label for="asm_format">Format of meetings in the additional list: </label>
<select id="adm_format" name="asm_format_key">
<label for="asm_format_key">Format of meetings in the additional list: </label>
<select id="asm_format_key" name="asm_format_key">
<?php if ($this_connected) { ?>
<option value="">Not Used</option>
<?php $countmax = count ( $used_formats ); ?>
Expand All @@ -339,6 +321,24 @@
<option value="time">By Day and Time</option>
</select>
</p><p>
<label for="asm_language">Select language for the additional list</label>
<select id="asm_language" name="asm_language">
<?php
if ($this->options['asm_language'] == '' ) {
echo "<option value=\"\" selected=\"selected\">Same as main list</option>";
} else {
echo "<option value=\"\">Same as main list</option>";
}
foreach ($this->translate as $key => $value) {
if ($this->options['asm_language'] == $key ) {
echo "<option value=\"$key\" selected=\"selected\">".$value['LANG_NAME']."</option>";
} else {
echo "<option value=\"$key\">".$value['LANG_NAME']."</option>";
}
}
?>
</select>
</p><p>
The additional list may include fields that might be used for say "service meetings". To access these fields
you must login with an service body administrator account.
<br>
Expand Down
10 changes: 10 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ Follow all these steps, keep in mind that once you start using bread, it's not g

== Changelog ==

= 2.1.0 =
* Bread now automatically calculates how many meetings fit in a column or on a page.
This eliminates the need to guess an appropriate value for Page-Height-adjustment
and also makes a more efficient use of the space.
* Support for languages has been refactored to make adding new languages easier.
Simply add a file in the appropriate directory.
* Shortcodes in the meeting template can be set off with square brackets ({}).
* Additional List can be in a different language from the main list.
* User can restrict the colorspace to Greyscale, RGB or CMYK.

= 2.0.0 =
* Support for multiple configurations.
* Access to configure is now controlled with a custom capability called `manage_bread`. This is automatically added to the `Administrator` role.
Expand Down

0 comments on commit f2bd707

Please sign in to comment.