×
Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
Administation Panel - Filter Option & Edit Entry
Xze Rod
New Member
Posts: 7
pred 8 rokmi 6 mesiacmi #1327
od Xze Rod
Administation Panel - Filter Option & Edit Entry bolo vytvorené Xze Rod
Hi everybody,
long time ago, i used this fantastic site to create a component on my own and it works fine.
Now i want to update my component because i got some notice and ideas for better working with. Every change i made works just fine and i use the new component on my homepage but there are two things, i really don't know how i set them on last time.
1. Filter Options in my Administration Panel.
On my old component, i get on the left site some options to filter the datatable with special entries in columns. I don't know, where to set (maybe just one click?) this option because in my actual component, this filteroptions aren't shown.
2. Edit List - Entry by Clicking on the 1. Column Link
In my old Component, my first column (the ID) was linked so when i clicked on it, i got the Update-Screen. Now, i have to check a box, scroll up and click on edit. Same problem here i don't know, what i missed in my settings.
could you please help me?
long time ago, i used this fantastic site to create a component on my own and it works fine.
Now i want to update my component because i got some notice and ideas for better working with. Every change i made works just fine and i use the new component on my homepage but there are two things, i really don't know how i set them on last time.
1. Filter Options in my Administration Panel.
On my old component, i get on the left site some options to filter the datatable with special entries in columns. I don't know, where to set (maybe just one click?) this option because in my actual component, this filteroptions aren't shown.
2. Edit List - Entry by Clicking on the 1. Column Link
In my old Component, my first column (the ID) was linked so when i clicked on it, i got the Update-Screen. Now, i have to check a box, scroll up and click on edit. Same problem here i don't know, what i missed in my settings.
could you please help me?
Prosím Prihlásiť alebo Registrácia pre zdieľanie konverzácie.
Xze Rod
New Member
Posts: 7
pred 8 rokmi 6 mesiacmi #1343
od Xze Rod
Odpoveď od Xze Rod na tému Administation Panel - Filter Option & Edit Entry
I don't know, which Settings i have to activate in component-creator to get this solutions, but got both problems work for me:
1. Filter Options in Administrator Panel
---components/com_yourcomponent/views/list/view.html.php
2. Edit List - ENtry by Clicking on the 1. Column Link
---components/com_yourcomponent/views/list/tmpl
Change the first <td> element:to
1. Filter Options in Administrator Panel
---components/com_yourcomponent/views/list/view.html.php
// Set sidebar action - New in 3.0
JHtmlSidebar::setAction('index.php?option=com_jyourcomponent&view=list');
$this->filterForm = $this->get('FilterForm');
$this->activeFilters = $this->get('ActiveFilters');
//Filter for the field 'column2'
$select_label = JText::sprintf('COM_JOOGAMES_COLUMN2', 'Column2');
$options = array();
$options[0] = new stdClass();
$options[0]->value = "1";
$options[0]->text = "Case A";
$options[1] = new stdClass();
$options[1]->value = "2";
$options[1]->text = "Case B";
JHtmlSidebar::addFilter(
$select_label,
'filter_column2',
JHtml::_('select.options', $options , "value", "text", $this->state->get('filter.column2'), true)
);
$this->extra_sidebar = '';
2. Edit List - ENtry by Clicking on the 1. Column Link
---components/com_yourcomponent/views/list/tmpl
Change the first <td> element:
<td>
<?php echo $item->id; ?>
</td>
<td>
<a href="<?php echo JRoute::_('index.php?option=com_yourcomponent&task=yourview.edit&id='.(int) $item->id); ?>">
<?php echo $this->escape($item->id); ?></a>
</td>
Prosím Prihlásiť alebo Registrácia pre zdieľanie konverzácie.
Čas vytvorenia stránky: 0.049 sekúnd