-
-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editor / Upload file or overview from main form #6371
Conversation
Rework the overview manager to manage any kind of file upload. The directive can also be embedded into the main form directly to manage overview or to easily upload files. Files are upload in the data store and then a link is added with `WWW:DOWNLOAD` protocol by default or a custom value. Examples: ```xml Example for file upload in the main form <section> <field xpath="/gmd:MD_Metadata/gmd:identificationInfo//gmd:title"/> * Manage overview <directive data-gn-overview-manager=""/> * Manage uploaded file with a WWW:DOWNLOAD protocol <directive data-gn-file-uploader="" data-type="onlines"/> * Same but with custom titles and icons <directive data-gn-file-uploader="" data-title="Resource for download" data-btn-label="Drop a file here" data-icon="fa-cloud" data-type="onlines"/> * Without the panel <directive data-gn-file-uploader="" data-title="" data-type="onlines"/> * With a custom protocol <directive data-gn-file-uploader="" data-protocol="DIRECTDOWNLOAD" data-type="onlines"/> </section> ```
class="gn-file-uploader"> | ||
<div data-ng-if="panelMode" class="panel-heading" data-gn-slide-toggle> | ||
<i class="fa fa-fw {{icon}}"></i> | ||
<span data-translate="">{{title}}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The overview panel with the change displays the header Download
instead of Overview
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
'/attachments?visibility=public', | ||
dropZone: $('#gn-overview-dropzone'), | ||
singleUpload: true, | ||
// TODO: acceptFileTypes: /(\.|\/)(xml|skos|rdf)$/i, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is something to improve: for thumbnails, only image formats should be allowed. For files, should be limited to certain types, maybe make both configurable in the settings?
Not in the scope of this pull request, but to create a ticket to track this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to use https://github.com/blueimp/jQuery-File-Upload/wiki/Options#processqueue without success.
|
||
* Same but with custom titles and icons | ||
<directive data-gn-file-uploader="" | ||
data-title="Resource for download" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this support translation keys?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could put text or a key that you can set in database translation.
Follow up of #6371 * Cleanup styles to have same rendering of links in record view and editor (labels, icons) - Replace #6101 * Improve format encoding can use WWW:DOWNLOAD:{format} or a MimeFileType element in ISO standards. * Create directive for uploading file that can be used in various places (eg. metadata filestore or form file or thumbnail upload) * Upload file / Add file format to import eg. images only for thumbnails
…abels (#6411) * Online source / Improve format support Follow up of #6371 * Cleanup styles to have same rendering of links in record view and editor (labels, icons) - Replace #6101 * Improve format encoding can use WWW:DOWNLOAD:{format} or a MimeFileType element in ISO standards. * Create directive for uploading file that can be used in various places (eg. metadata filestore or form file or thumbnail upload) * Upload file / Add file format to import eg. images only for thumbnails * Online source / Improve format support / Wro4j errors. * Online source / Improve format support / Styling.
Rework the overview manager to manage any kind of file upload.
The directive can also be embedded into the main form directly to manage overview or to easily upload files.
Files are upload in the data store and then a link is added with
WWW:DOWNLOAD
protocol by default or a custom value.Sample editor configuration for file upload in the main form: