Skip to content

Commit

Permalink
Bug fixes (joomla#21)
Browse files Browse the repository at this point in the history
* Fixed depreciation issue on line 73

* Fixed permissions not being in its own tab in tour

* Fixed permissions not being in its own tab in tour

* Fixed permissions not being in its own tab in steps

* Added keys

* Added column for step type. Still needs to be ordered by type

* Added column for step type. Still needs to be ordered by type

* Changed language keys from TOUR to STEP

* Changed language keys from TOUR to STEP

* Changed language keys from TOUR to STEP

* Changed language keys from TOUR to STEP

* Update default.php

added spaces, re-introduced closing brace

* Update default.php

put endif back on its own line

* Update default.php

whitespace issues...

* Fixed depreciation issue

* Fixed depreciation issue

* Added sort by Type option in Steps column

* Added sort by Type language keys

* Added necessary code in List for sorting by type

* Added necessary code in List for sorting by type

* Added necessary code in List for sorting by type

* Added necessary code in List for sorting by type

---------

Co-authored-by: Olivier Buisard <[email protected]>
  • Loading branch information
aze088 and obuisard authored Feb 3, 2023
1 parent 9bea92e commit daf1025
Show file tree
Hide file tree
Showing 8 changed files with 216 additions and 193 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
type="status"
label="JOPTION_SELECT_PUBLISHED"
onchange="this.form.submit();"
>
>
<option value="">JOPTION_SELECT_PUBLISHED</option>
</field>
</fields>
Expand All @@ -26,7 +26,7 @@
onchange="this.form.submit();"
default="a.title DESC"
validate="options"
>
>
<option value="">JGLOBAL_SORT_BY</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
Expand All @@ -36,6 +36,8 @@
<option value="a.description DESC">JDESCRIPTION_DESC</option>
<option value="a.state ASC">JSTATUS_ASC</option>
<option value="a.state DESC">JSTATUS_DESC</option>
<option value="a.type ASC">JTYPE_ASC</option>
<option value="a.type DESC">JTYPE_DESC</option>
<option value="a.ordering ASC">JGRID_HEADING_ORDERING_ASC</option>
<option value="a.ordering DESC">JGRID_HEADING_ORDERING_DESC</option>
</field>
Expand All @@ -48,4 +50,4 @@
onchange="this.form.submit();"
/>
</fields>
</form>
</form>
24 changes: 12 additions & 12 deletions administrator/components/com_guidedtours/forms/step.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
label="COM_GUIDEDTOURS_POSITION_LABEL"
description="COM_GUIDEDTOURS_POSITION_DESC"
validate="options"
>
>
<option value="bottom">COM_GUIDEDTOURS_FIELD_OPTION_BOTTOM</option>
<option value="top">COM_GUIDEDTOURS_FIELD_OPTION_TOP</option>
<option value="right">COM_GUIDEDTOURS_FIELD_OPTION_RIGHT</option>
<option value="left">COM_GUIDEDTOURS_FIELD_OPTION_LEFT</option>
<option value="">COM_GUIDEDTOURS_FIELD_OPTION_CENTER</option>
</field>>
</field>

<field
name="target"
Expand Down Expand Up @@ -71,7 +71,7 @@
default="1"
class="form-select-color-state"
validate="options"
>
>
<option value="1">JPUBLISHED</option>
<option value="0">JUNPUBLISHED</option>
<option value="2">JARCHIVED</option>
Expand All @@ -85,10 +85,10 @@
default="0"
description="COM_GUIDEDTOURS_TYPE_DESC"
validate="options"
>
>
<option value="0">COM_GUIDEDTOURS_FIELD_VALUE_NEXT_STEP</option>
<option value="1">COM_GUIDEDTOURS_FIELD_VALUE_REDIRECT</option>
<option value="2">COM_GUIDEDTOURS_FIELD_VALUE_INTERACTIVE_TOUR</option>
<option value="2">COM_GUIDEDTOURS_FIELD_VALUE_INTERACTIVE_STEP</option>
</field>

<field
Expand All @@ -103,15 +103,15 @@
<field
name="interactive_type"
type="list"
label="COM_GUIDEDTOURS_TYPE_INTERACTIVE_TOUR_LABEL"
description="COM_GUIDEDTOURS_INTERACTIVE_TOUR_DESC"
label="COM_GUIDEDTOURS_TYPE_INTERACTIVE_STEP_LABEL"
description="COM_GUIDEDTOURS_INTERACTIVE_STEP_DESC"
showon="type:2"
filter="string"
validate="options"
>
<option value="1">COM_GUIDEDTOURS_TYPE_INTERACTIVE_TOUR_BUTTON_LABEL</option>
<option value="2">COM_GUIDEDTOURS_TYPE_INTERACTIVE_TOUR_TEXT_FIELD_LABEL</option>
<option value="3">COM_GUIDEDTOURS_TYPE_INTERACTIVE_TOUR_OTHERS_LABEL</option>
>
<option value="1">COM_GUIDEDTOURS_TYPE_INTERACTIVE_STEP_BUTTON_LABEL</option>
<option value="2">COM_GUIDEDTOURS_TYPE_INTERACTIVE_STEP_TEXT_FIELD_LABEL</option>
<option value="3">COM_GUIDEDTOURS_TYPE_INTERACTIVE_STEP_OTHERS_LABEL</option>
</field>

<field
Expand Down Expand Up @@ -161,7 +161,7 @@
name="language"
type="contentlanguage"
label="JFIELD_LANGUAGE_LABEL"
>
>
<option value="*">JALL</option>
</field>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public function __construct($config = [])
'id', 'a.id',
'tour_id', 'a.tour_id',
'title', 'a.title',
'type', 'a.type',
'description', 'a.description',
'published', 'a.published',
'ordering', 'a.ordering',
Expand Down Expand Up @@ -208,7 +209,7 @@ protected function getListQuery()
$search = '%' . str_replace(' ', '%', trim($search)) . '%';
$query->where(
'(' . $db->quoteName('a.title') . ' LIKE :search1 OR ' . $db->quoteName('a.id') . ' LIKE :search2'
. ' OR ' . $db->quoteName('a.description') . ' LIKE :search3)'
. ' OR ' . $db->quoteName('a.description') . ' LIKE :search3)'
)
->bind([':search1', ':search2', ':search3'], $search);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ protected function populateState($ordering = 'a.ordering', $direction = 'asc')
$extension = $app->getUserStateFromRequest($this->context . '.filter.extension', 'extension', null, 'cmd');

$this->setState('filter.extension', $extension);
$parts = explode('.', $extension);

// Extract the component name
$this->setState('filter.component', $parts[0]);

// Extract the optional section name

Expand Down Expand Up @@ -175,7 +171,7 @@ public function getListQuery()
$search = '%' . str_replace(' ', '%', trim($search)) . '%';
$query->where(
'(' . $db->quoteName('a.title') . ' LIKE :search1 OR ' . $db->quoteName('a.id') . ' LIKE :search2'
. ' OR ' . $db->quoteName('a.description') . ' LIKE :search3)'
. ' OR ' . $db->quoteName('a.description') . ' LIKE :search3)'
)
->bind([':search1', ':search2', ':search3'], $search);
}
Expand Down
31 changes: 16 additions & 15 deletions administrator/components/com_guidedtours/tmpl/step/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
?>

<form action="<?php echo Route::_('index.php?option=com_guidedtours&view=step&layout=edit&id=' .
(int) $this->item->id); ?>" method="post" name="adminForm" id="guidedtour-dates-form" class="form-validate">
(int) $this->item->id); ?>" method="post" name="adminForm" id="guidedtour-dates-form" class="form-validate">

<?php echo LayoutHelper::render('joomla.edit.title_alias', $this); ?>
<div>
Expand Down Expand Up @@ -71,20 +71,21 @@
</div>
</fieldset>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'permissions', Text::_('Permissions')); ?>
<div class="row">
<div class="col-12 col-lg">
<fieldset id="fieldset-rules" class="options-form">
<legend><?php echo Text::_('Permissions'); ?></legend>
<?php echo $this->form->getInput('rules'); ?>
</fieldset>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
</div>
</div>
<?php echo HTMLHelper::_('uitab.endTab'); ?>

<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'permissions', Text::_('COM_GUIDEDTOURS_RULES_TAB')); ?>
<div class="row">
<fieldset id="fieldset-rules" class="options-form">
<legend><?php echo Text::_('COM_GUIDEDTOURS_RULES_TAB'); ?></legend>
<?php echo $this->form->getInput('rules'); ?>
</fieldset>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.endTabSet'); ?>
</div>
<input type="hidden" name="task" value="">
<input type="hidden" name="tour_id" value="<?php echo $tour_id; ?>">
<?php echo HTMLHelper::_('form.token'); ?>

</div>
<input type="hidden" name="task" value="">
<input type="hidden" name="tour_id" value="<?php echo $tour_id; ?>">
<?php echo HTMLHelper::_('form.token'); ?>
</form>
Loading

0 comments on commit daf1025

Please sign in to comment.