Skip to content

Commit 11310eb

Browse files
feat: add my contents checkbox
1 parent 8d37f75 commit 11310eb

File tree

7 files changed

+22
-0
lines changed

7 files changed

+22
-0
lines changed

logs/.gitkeep

100644100755
File mode changed.

src/Locale/en_US/default.po

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,9 @@ msgstr ""
383383
msgid "On"
384384
msgstr ""
385385

386+
msgid "Only my contents"
387+
msgstr ""
388+
386389
msgid "Open"
387390
msgstr ""
388391

src/Locale/it_IT/default.po

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,9 @@ msgstr ""
383383
msgid "On"
384384
msgstr ""
385385

386+
msgid "Only my contents"
387+
msgstr "Solo i miei contenuti"
388+
386389
msgid "Open"
387390
msgstr "Apri"
388391

src/Locale/master.pot

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,9 @@ msgstr ""
380380
msgid "On"
381381
msgstr ""
382382

383+
msgid "Only my contents"
384+
msgstr ""
385+
383386
msgid "Open"
384387
msgstr ""
385388

src/Template/Element/FilterBox/filter_box_common.twig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@
9494
<button v-show="showFilterButtons" class="button button-secondary" @click.prevent="applyFilter()">{{ __('Search') }}</button>
9595
<button v-show="showFilterButtons" class="button button-secondary" @click.prevent="resetFilter()">{{ __('Reset filters') }}</button>
9696
</div>
97+
98+
99+
{# Checkbox my contents #}
100+
<div class="filter-container radio">
101+
<label>
102+
<input type="checkbox" v-model="queryFilter.filter['mine']">{{ __('Only my contents') }}</input>
103+
</label>
104+
</div>
97105
</div>
98106

99107
{% if filterActive %}

src/Template/Layout/js/app/app.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,11 @@ const _vueInstance = new Vue({
176176
* @return {void}
177177
*/
178178
onFilterObjects(filter) {
179+
// remove from query string ilter mine if it is false
180+
if (!filter.filter.mine) {
181+
delete filter.filter.mine;
182+
}
183+
179184
this.urlFilterQuery = filter;
180185
this.page = '';
181186

vendor/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)