Skip to content

Commit

Permalink
[IMP] dms: Show Upload button in the file kanban view only if it is a…
Browse files Browse the repository at this point in the history
…llowed to create

TT50055
  • Loading branch information
victoralmau committed Oct 11, 2024
1 parent 660c9e4 commit dcfb237
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions dms/static/src/js/views/file_kanban_renderer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,31 @@
t-inherit-mode="primary"
>
<xpath expr="//div" position="inside">
<button
type="button"
class="d-inline d-md-none btn btn-primary mx-1"
t-on-click.prevent="uploadDocument"
>
Scan
</button>
<input
type="file"
name="ufile"
class="d-none"
t-ref="fileInput"
multiple="1"
accept="*"
t-on-change="onChangeFileInput"
/>
<button
type="button"
class="d-none d-md-inline btn btn-primary mx-1"
t-on-click.prevent="uploadDocument"
>
Upload
</button>
<t t-if="props.archInfo.activeActions.create">
<button
type="button"
class="d-inline d-md-none btn btn-primary mx-1"
t-on-click.prevent="uploadDocument"
>
Scan
</button>
<input
type="file"
name="ufile"
class="d-none"
t-ref="fileInput"
multiple="1"
accept="*"
t-on-change="onChangeFileInput"
/>
<button
type="button"
class="d-none d-md-inline btn btn-primary mx-1"
t-on-click.prevent="uploadDocument"
>
Upload
</button>
</t>
</xpath>
</t>
</templates>

0 comments on commit dcfb237

Please sign in to comment.