Skip to content

Commit

Permalink
#788 Fixed updating of filters and passing landing page filters. Adde…
Browse files Browse the repository at this point in the history
…d back hiding systems for filters. Added in Sort By Hide and Limit Hide.
  • Loading branch information
bcordis committed Oct 4, 2018
1 parent 4b8bb44 commit ada454f
Show file tree
Hide file tree
Showing 8 changed files with 121 additions and 71 deletions.
4 changes: 4 additions & 0 deletions com_biblestudy/admin/language/en-GB/en-GB.com_biblestudy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1525,6 +1525,10 @@ JBS_TPL_LISTITEMS_SHOW_SERIES_SEARCH="Show/Hide Series search"
JBS_TPL_LISTITEMS_SHOW_SERIES_SEARCH_DESC="Shows or hides the drop down box for series"
JBS_TPL_LISTITEMS_SHOW_TEACHER_SEARCH="Show/Hide Teacher search"
JBS_TPL_LISTITEMS_SHOW_TEACHER_SEARCH_DESC="Shows or hides the drop down box for teachers"
JBS_TPL_LISTITEMS_SHOW_SORTBY_SEARCH="Show/Hide Sort By search"
JBS_TPL_LISTITEMS_SHOW_SORTBY_SEARCH_DESC="Shows or hides the drop down box for Sort By"
JBS_TPL_LISTITEMS_SHOW_LIMIT_SEARCH="Show/Hide Limit search"
JBS_TPL_LISTITEMS_SHOW_LIMIT_SEARCH_DESC="Shows or hides the drop down box for Limit"
JBS_TPL_LISTITEMS_SHOW_TOP="Show at top"
JBS_TPL_LISTITEMS_SHOW_TOPIC_SEARCH="Show/Hide Topic search"
JBS_TPL_LISTITEMS_SHOW_TOPIC_SEARCH_DESC="Shows or hides the drop down topical list"
Expand Down
43 changes: 17 additions & 26 deletions com_biblestudy/admin/models/forms/template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,8 @@
<field name="show_book_search" type="list" default="1"
label="JBS_TPL_LISTITEMS_SHOW_BOOK_SEARCH" description="JBS_TPL_LISTITEMS_SHOW_BOOK_SEARCH_DESC">
<option value="0">JBS_CMN_HIDE</option>
<option value="1">JBS_TPL_SHOW_UNLESS_FILTERED</option>
<option value="2">JBS_TPL_SHOW_ALWAYS</option>
<option value="1">JBS_TPL_SHOW_ALWAYS</option>
</field>
<field name="ddbooks" type="spanoptions" default="1" label="JBS_TPL_ORDER_BOOK" description="JBS_TPL_ORDER_DESC"/>

<field name="booklist" type="list" default="0"
label="JBS_TPL_LISTITEMS_BOOKLIST" description="JBS_TPL_LISTITEMS_BOOKLIST_DESC">
Expand All @@ -349,77 +347,70 @@
<option value="0">JBS_CMN_DONT_USE</option>
<option value="1">JBS_TPL_LISTITEMS_USE_GO_BUTTON</option>
</field>
<field name="ddgobutton" type="spanoptions" default="2" label="JBS_TPL_ORDER_GO" description="JBS_TPL_ORDER_DESC"/>

<field name="show_teacher_search" type="list" default="1"
label="JBS_TPL_LISTITEMS_SHOW_TEACHER_SEARCH"
description="JBS_TPL_LISTITEMS_SHOW_TEACHER_SEARCH_DESC">
<option value="0">JBS_CMN_HIDE</option>
<option value="1">JBS_TPL_SHOW_UNLESS_FILTERED</option>
<option value="2">JBS_TPL_SHOW_ALWAYS</option>
<option value="1">JBS_TPL_SHOW_ALWAYS</option>
</field>

<field name="show_fullordering_search" type="list" default="1"
label="JBS_TPL_LISTITEMS_SHOW_SORTBY_SEARCH"
description="JBS_TPL_LISTITEMS_SHOW_SORTBY_SEARCH_DESC">
<option value="0">JBS_CMN_HIDE</option>
<option value="1">JBS_TPL_SHOW_ALWAYS</option>
</field>
<field name="ddteachers" type="spanoptions" default="3" label="JBS_TPL_ORDER_TEACHER" description="JBS_TPL_ORDER_DESC"/>

<field name="show_series_search" type="list" default="1"
label="JBS_TPL_LISTITEMS_SHOW_SERIES_SEARCH" description="JBS_TPL_LISTITEMS_SHOW_SERIES_SEARCH_DESC">
<option value="0">JBS_CMN_HIDE</option>
<option value="1">JBS_TPL_SHOW_UNLESS_FILTERED</option>
<option value="2">JBS_TPL_SHOW_ALWAYS</option>
<option value="1">JBS_TPL_SHOW_ALWAYS</option>
</field>
<field name="ddseries" type="spanoptions" default="4" label="JBS_TPL_ORDER_SERIES" description="JBS_TPL_ORDER_DESC"/>

<field name="show_type_search" type="list" default="1"
label="JBS_TPL_LISTITEMS_SHOW_TYPE_SEARCH" description="JBS_TPL_LISTITEMS_SHOW_TYPE_SEARCH_DESC">
<option value="0">JBS_CMN_HIDE</option>
<option value="1">JBS_TPL_SHOW_UNLESS_FILTERED</option>
<option value="2">JBS_TPL_SHOW_ALWAYS</option>
<option value="1">JBS_TPL_SHOW_ALWAYS</option>
</field>
<field name="ddmessagetype" type="spanoptions" default="5" label="JBS_TPL_ORDER_MESSAGETYPE" description="JBS_TPL_ORDER_DESC"/>

<field name="show_year_search" type="list" default="1"
label="JBS_TPL_LISTITEMS_SHOW_YEAR_SEARCH" description="JBS_TPL_LISTITEMS_SHOW_YEAR_SEARCH_DESC">
<option value="0">JBS_CMN_HIDE</option>
<option value="1">JBS_CMN_SHOW</option>
</field>
<field name="ddyears" type="spanoptions" default="6" label="JBS_TPL_ORDER_YEARS" description="JBS_TPL_ORDER_DESC"/>

<field name="show_order_search" type="list" default="1"
label="JBS_TPL_LISTITEMS_SHOW_ORDER_SEARCH" description="JBS_TPL_LISTITEMS_SHOW_ORDER_SEARCH_DESC">
<option value="0">JBS_CMN_HIDE</option>
<option value="1">JBS_CMN_SHOW</option>
</field>
<field name="ddorder" type="spanoptions" default="7" label="JBS_TPL_ORDER_ORDER" description="JBS_TPL_ORDER_DESC"/>

<field name="show_topic_search" type="list" default="1"
label="JBS_TPL_LISTITEMS_SHOW_TOPIC_SEARCH" description="JBS_TPL_LISTITEMS_SHOW_TOPIC_SEARCH_DESC">
<option value="0">JBS_CMN_HIDE</option>
<option value="1">JBS_TPL_SHOW_UNLESS_FILTERED</option>
<option value="2">JBS_TPL_SHOW_ALWAYS</option>
<option value="1">JBS_TPL_SHOW_ALWAYS</option>
</field>
<field name="ddtopics" type="spanoptions" default="8" label="JBS_TPL_ORDER_TOPICS" description="JBS_TPL_ORDER_DESC"/>

<field name="show_locations_search" type="list" default="1"
label="JBS_TPL_LISTITEMS_SHOW_LOCATIONS_SEARCH"
description="JBS_TPL_LISTITEMS_SHOW_LOCATIONS_SEARCH_DESC">
<option value="0">JBS_CMN_HIDE</option>
<option value="1">JBS_TPL_SHOW_UNLESS_FILTERED</option>
<option value="2">JBS_TPL_SHOW_ALWAYS</option>
<option value="1">JBS_TPL_SHOW_ALWAYS</option>
</field>
<field name="ddlocations" type="spanoptions" default="9" label="JBS_TPL_ORDER_LOCATIONS" description="JBS_TPL_ORDER_DESC"/>

<field name="show_popular" type="list" default="1"
label="JBS_TPL_LISTITEMS_SHOW_POPULAR" description="JBS_TPL_LISTITEMS_SHOW_POPULAR_DESC">
<field name="show_limit_search" type="list" default="1"
label="JBS_TPL_LISTITEMS_SHOW_LIMIT_SEARCH"
description="JBS_TPL_LISTITEMS_SHOW_LIMIT_SEARCH_DESC">
<option value="0">JBS_CMN_HIDE</option>
<option value="1">JBS_CMN_SHOW</option>
<option value="1">JBS_TPL_SHOW_ALWAYS</option>
</field>
<field name="ddpopular" type="spanoptions" default="10" label="JBS_TPL_ORDER_POPULAR" description="JBS_TPL_ORDER_DESC"/>

<field name="listlanguage" type="list" size="1" label="JBS_CMN_USE_LANGUAGE_LIST"
description="JBS_CMN_USE_LANGUAGE_LIST_DESC">
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field name="ddlanguage" type="spanoptions" default="11" label="JBS_TPL_ORDER_LANGUAGE" description="JBS_TPL_ORDER_DESC"/>

<field name="show_pagination" type="list" default="1"
label="JBS_TPL_LISTITEMS_SHOW_PAGINATION" description="JBS_TPL_LISTITEMS_SHOW_PAGINATION_DESC">
Expand Down
67 changes: 33 additions & 34 deletions com_biblestudy/site/helpers/landing.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ public function getLocationsLandingPage($params, $id = 0)
}

$location .= '<div class="span4">';
$location .= '<a href="index.php?option=com_biblestudy&amp;sendingview=landing&amp;view=sermons&amp;filter_location_landing='
. $b->id . '&amp;filter_teacher=0&amp;filter_series=0&amp;filter_topic=0&amp;filter_book=0&amp;filter_year=0&amp;filter_messagetype=0&amp;t='
$location .= '<a href="index.php?option=com_biblestudy&amp;view=sermons&amp;filter_location=' . $b->id . '&amp;sendingview=landing' .
'&amp;filter_teacher=0&amp;filter_series=0&amp;filter_topic=0&amp;filter_book=0&amp;filter_year=0&amp;filter_messagetype=0&amp;t='
. $template . '">';

$location .= $b->location_text;
Expand Down Expand Up @@ -174,7 +174,7 @@ public function getLocationsLandingPage($params, $id = 0)
{
$location .= '<div class="landingrow">';
$location .= '<div class="landingcell">
<a class="landinglink" href="index.php?option=com_biblestudy&amp;sendingview=landing&amp;view=sermons&amp;filter_location_landing='
<a class="landinglink" href="index.php?option=com_biblestudy&amp;sendingview=landing&amp;view=sermons&amp;filter_location='
. $b->id . '&amp;filter_teacher=0&amp;filter_series=0&amp;filter_topic=0&amp;filter_book=0&amp;filter_year=0&amp;filter_messagetype=0&amp;t='
. $template . '">';
$location .= $b->location_text;
Expand All @@ -192,7 +192,7 @@ public function getLocationsLandingPage($params, $id = 0)
{
$location .= '<div class="landingrow">';
$location .= '<div class="landingcell">
<a class="landinglink" href="index.php?option=com_biblestudy&amp;sendingview=landing&amp;view=sermons&amp;filter_location_landing='
<a class="landinglink" href="index.php?option=com_biblestudy&amp;sendingview=landing&amp;view=sermons&amp;filter_location='
. $b->id . '&amp;filter_teacher=0&amp;filter_series=0&amp;filter_topic=0&amp;filter_book=0&amp;filter_year=0&amp;filter_messagetype=0&amp;t='
. $template . '">';
$location .= $b->location_text;
Expand Down Expand Up @@ -327,8 +327,8 @@ public function getTeacherLandingPage($params, $id = 0)
if ($params->get('linkto') == 0)
{
$teacher .= '<div class="span4">';
$teacher .= '<a href="' . JRoute::_('index.php?option=com_biblestudy&amp;sendingview=landing&amp;view=sermons&amp;t=' . $template)
. '&amp;filter_teacher_landing=' . $b->id
$teacher .= '<a href="' . JRoute::_('index.php?option=com_biblestudy&amp;view=sermons&amp;t=' . $template)
. '&amp;sendingview=landing&amp;filter_teacher=' . $b->id
. $langlink . '&amp;filter_book=0&amp;filter_series=0&amp;filter_topic=0&amp;filter_location=0&amp;filter_year=0&amp;filter_messagetype=0">';
}
else
Expand Down Expand Up @@ -371,8 +371,8 @@ public function getTeacherLandingPage($params, $id = 0)
if ($params->get('linkto') == 0)
{
$teacher .= '<div class="span4"> <a '
. JRoute::_('index.php?option=com_biblestudy&amp;sendingview=landing&amp;view=sermons&amp;t=' . $template)
. '&amp;filter_teacher_landing=' . $b->id
. JRoute::_('index.php?option=com_biblestudy&amp;view=sermons&amp;t=' . $template)
. '&amp;sendingview=landing&amp;filter_teacher=' . $b->id
. '&amp;filter_book=0&amp;filter_series=0&amp;filter_topic=0&amp;filter_location=0&amp;filter_year=0&amp;filter_messagetype=0">';
}
else
Expand All @@ -395,14 +395,14 @@ public function getTeacherLandingPage($params, $id = 0)
if ($params->get('linkto') == 0)
{
$teacher .= '<div class="span4"><a href="'
. JRoute::_('index.php?option=com_biblestudy&amp;sendingview=landing&amp;view=sermons&amp;t=' . $template)
. '&amp;filter_teacher_landing=' . $b->id
. JRoute::_('index.php?option=com_biblestudy&amp;view=sermons&amp;t=' . $template)
. '&amp;sendingview=landing&amp;filter_teacher=' . $b->id
. '&amp;filter_book=0&amp;filter_series=0&amp;filter_topic=0&amp;filter_location=0&amp;filter_year=0&amp;filter_messagetype=0">';
}
else
{
$teacher .= '<div class="span4"><a href="'
. JRoute::_('index.php?option=com_biblestudy&amp;sendingview=landing&amp;view=teacher_landing&amp;id=' .
. JRoute::_('index.php?option=com_biblestudy&amp;sendingview=landing&amp;view=teacher&amp;id=' .
$b->id . '&amp;t=' . $template
) . '">';
}
Expand Down Expand Up @@ -535,8 +535,8 @@ public function getSeriesLandingPage($params, $id = 0)
if ($params->get('series_linkto') == '0')
{
$series .= '<div class="span4">';
$series .= '<a href="index.php?option=com_biblestudy&amp;sendingview=landing&amp;view=sermons&amp;filter_series_landing=' . $b->id
. '&amp;filter_book=0&amp;filter_teacher=0'
$series .= '<a href="index.php?option=com_biblestudy&amp;view=sermons&amp;filter_series=' . $b->id
. '&amp;sendingview=landing&amp;filter_book=0&amp;filter_teacher=0'
. '&amp;filter_topic=0&amp;filter_location=0&amp;filter_year=0&amp;filter_messagetype=0&amp;t='
. $template . '">';
}
Expand Down Expand Up @@ -588,8 +588,8 @@ public function getSeriesLandingPage($params, $id = 0)
if ($params->get('series_linkto') == '0')
{
$series .= '<div class="landingcell">
<a href="index.php?option=com_biblestudy&amp;sendingview=landing&amp;view=sermons&amp;filter_series_landing='
. $b->id . '&amp;filter_book=0&amp;filter_teacher=0'
<a href="index.php?option=com_biblestudy&amp;view=sermons&amp;filter_series='
. $b->id . '&amp;sendingview=landing&amp;filter_book=0&amp;filter_teacher=0'
. '&amp;filter_topic=0&amp;filter_location=0&amp;filter_year=0&amp;filter_messagetype=0&amp;t=' . $template . '">';
}
else
Expand Down Expand Up @@ -617,8 +617,8 @@ public function getSeriesLandingPage($params, $id = 0)
if ($params->get('series_linkto') == '0')
{
$series .= '<div class="landingcell">
<a href="index.php?option=com_biblestudy&amp;sendingview=landing&amp;view=sermons&amp;filter_series_landing='
. $b->id . '&amp;filter_book=0&amp;filter_teacher=0'
<a href="index.php?option=com_biblestudy&amp;view=sermons&amp;filter_series='
. $b->id . '&amp;sendingview=landing&amp;filter_book=0&amp;filter_teacher=0'
. '&amp;filter_topic=0&amp;filter_location=0&amp;filter_year=0&amp;filter_messagetype=0&amp;t=' . $template . '">';
}
else
Expand Down Expand Up @@ -747,8 +747,8 @@ public function getYearsLandingPage($params, $id = 0)
}

$year .= '<div class="span2">';
$year .= '<a href="index.php?option=com_biblestudy&amp;sendingview=landing&amp;view=sermons&amp;filter_year_landing='
. $b->theYear . '&amp;filter_teacher=0&amp;filter_series=0&amp;filter_topic=0&amp;filter_location=0&amp;'
$year .= '<a href="index.php?option=com_biblestudy&amp;view=sermons&amp;filter_year='
. $b->theYear . '&amp;sendingview=landing&amp;filter_teacher=0&amp;filter_series=0&amp;filter_topic=0&amp;filter_location=0&amp;'
. 'filter_book=0&amp;filter_messagetype=0&amp;t='
. $template . '">';

Expand Down Expand Up @@ -887,8 +887,8 @@ public function getTopicsLandingPage($params, $id = 0)
}

$topic .= '<div class="span2">';
$topic .= '<a href="index.php?option=com_biblestudy&amp;sendingview=landing&amp;view=sermons&amp;filter_topic_landing=' .
$b->id . '&amp;filter_teacher=0'
$topic .= '<a href="index.php?option=com_biblestudy&amp;view=sermons&amp;filter_topic=' .
$b->id . '&amp;sendingview=landing&amp;filter_teacher=0'
. '&amp;filter_series=0&amp;filter_location=0&amp;filter_book=0&amp;filter_year=0&amp;filter_messagetype=0&amp;t=' . $template . '">';
$trans = new JBSMTranslated;
$topic .= $trans->getTopicItemTranslated($b);
Expand Down Expand Up @@ -1036,10 +1036,9 @@ public function getMessageTypesLandingPage($params, $id = 0)
}

$messagetype .= '<div class="span2">';
$messagetype .= '<a href="index.php?option=com_biblestudy&amp;sendingview=landing&amp;view=sermons&amp;filter_messagetype_landing=' .
$b->id
. '&amp;filter_book=0&amp;filter_teacher=0&amp;filter_series=0&amp;filter_topic=0&amp;filter_location=0&amp;filter_year=0&amp;t='
. $template . '">';
$messagetype .= '<a href="index.php?option=com_biblestudy&amp;view=sermons&amp;filter_messagetype=' .
$b->id . '&amp;sendingview=landing&amp;filter_book=0&amp;filter_teacher=0&amp;filter_series=0' .
'&amp;filter_topic=0&amp;filter_location=0&amp;filter_year=0&amp;t=' . $template . '">';

$messagetype .= $b->message_type;

Expand Down Expand Up @@ -1077,9 +1076,9 @@ public function getMessageTypesLandingPage($params, $id = 0)
{
$messagetype .= '<div class="landingrow">';
$messagetype .= '<div class="landingcell">
<a class="landinglink" href="index.php?option=com_biblestudy&amp;sendingview=landing&amp;view=sermons&amp;filter_messagetype_landing='
. $b->id . '&amp;filter_book=0&amp;filter_teacher=0&amp;filter_series=0&amp;filter_topic=0&amp;filter_location=0&amp;filter_year=0&amp;t='
. $template . '">';
<a class="landinglink" href="index.php?option=com_biblestudy&amp;view=sermons&amp;filter_messagetype='
. $b->id . '&amp;sendingview=landing&amp;filter_book=0&amp;filter_teacher=0&amp;filter_series=0' .
'&amp;filter_topic=0&amp;filter_location=0&amp;filter_year=0&amp;t=' . $template . '">';
$messagetype .= $b->message_type;
$messagetype .= '</a></div>';
$messagetype .= '</div>';
Expand All @@ -1095,9 +1094,9 @@ public function getMessageTypesLandingPage($params, $id = 0)
{
$messagetype .= '<div class="landingrow">';
$messagetype .= '<div class="landingcell">
<a class="landinglink" href="index.php?option=com_biblestudy&amp;sendingview=landing&amp;view=sermons&amp;filter_messagetype_landing=' . $b->id
. '&amp;filter_book=0&amp;filter_teacher=0&amp;filter_series=0&amp;filter_topic=0&amp;filter_location=0&amp;filter_year=0&amp;t='
. $template . '">';
<a class="landinglink" href="index.php?option=com_biblestudy&amp;view=sermons&amp;filter_messagetype=' . $b->id
. '&amp;sendingview=landing&amp;filter_book=0&amp;filter_teacher=0&amp;filter_series=0&amp;filter_topic=0' .
'&amp;filter_location=0&amp;filter_year=0&amp;t=' . $template . '">';
$messagetype .= $b->message_type;
$messagetype .= '</a></div>';
$messagetype .= '</div>';
Expand Down Expand Up @@ -1226,9 +1225,9 @@ public function getBooksLandingPage($params, $id = 0)
}

$book .= '<div class="span2">';
$book .= '<a href="index.php?option=com_biblestudy&amp;sendingview=landing&amp;view=sermons&amp;filter_book_landing=' . $b->booknumber
. '&amp;filter_teacher=0&amp;filter_series=0&amp;filter_topic=0&amp;filter_location=0&amp;filter_year=0&amp;filter_messagetype=0&amp;t='
. $template . '">';
$book .= '<a href="index.php?option=com_biblestudy&amp;sendingview=landing&amp;view=sermons&amp;filter_book=' . $b->booknumber
. '&amp;sendingview=landing&amp;filter_teacher=0&amp;filter_series=0&amp;filter_topic=0&amp;filter_location=0' .
'&amp;filter_year=0&amp;filter_messagetype=0&amp;t=' . $template . '">';

$book .= JText::sprintf($b->bookname);

Expand Down
Loading

0 comments on commit ada454f

Please sign in to comment.