Skip to content
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

ufal/fe-22-54-download-preview-item #362

Merged
merged 28 commits into from
Oct 4, 2023
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4c89209
create new component and add model file and service file
HuynhKhoa1601 Jul 12, 2023
65290d8
build the user interface and calling the api from backend
HuynhKhoa1601 Jul 13, 2023
e794918
add logic for handling data from BE and refactor the UI
HuynhKhoa1601 Jul 14, 2023
e3df2d3
fix the lint error and fix the collapse/hide behaviour
HuynhKhoa1601 Jul 17, 2023
060bf51
add UI for download buttons and fix UI for the ZIP Preview
HuynhKhoa1601 Jul 18, 2023
a537c05
getting data from backend and make the download feature
HuynhKhoa1601 Jul 19, 2023
bafb92b
handle with the dynamic input
HuynhKhoa1601 Jul 21, 2023
af88da9
fix the collapese/hide behaviour and handle more cases
HuynhKhoa1601 Jul 24, 2023
52a07b2
add more conditions for checking permission to preview and download f…
HuynhKhoa1601 Jul 26, 2023
9ddbb6e
fix lint error
HuynhKhoa1601 Jul 26, 2023
395db4e
fix failed test
HuynhKhoa1601 Jul 27, 2023
a868331
Lock/download preview (#311)
milanmajchrak Sep 27, 2023
d12d397
Merge branch 'ufal/fe-22-54-download-preview-item' of github.com:data…
milanmajchrak Sep 27, 2023
dfde4a8
Resolved conflicts
milanmajchrak Sep 27, 2023
9c9149f
Resolved conflicts
milanmajchrak Sep 27, 2023
94b62af
Revert unnecessary changes
milanmajchrak Sep 27, 2023
a720ac8
Refactoring and removed font awesome loading from node modules
milanmajchrak Sep 27, 2023
23835f4
Updated preview file box look and feel
milanmajchrak Sep 28, 2023
1fc1509
Fixed file preview icons
milanmajchrak Sep 28, 2023
32190b5
Fixed html preview scrolling
milanmajchrak Sep 28, 2023
70f0120
Show scrollbar in txt preview
milanmajchrak Sep 29, 2023
6109d40
Some refactoring
milanmajchrak Oct 2, 2023
f964a4c
Refactoring and the dspace BE is loaded from configuration property.
milanmajchrak Oct 3, 2023
48017e8
Added messages
milanmajchrak Oct 3, 2023
bb18eb9
Fixed tests
milanmajchrak Oct 4, 2023
af3c35e
Added download buttons and fixed downloading
milanmajchrak Oct 4, 2023
b8081c2
Added messages
milanmajchrak Oct 4, 2023
54863ec
Added image to the assetstore instead of url from lindat
milanmajchrak Oct 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added messages
milanmajchrak committed Oct 3, 2023
commit 48017e8e5a94f6492cd0c7254d361c1bbee04d8d
Original file line number Diff line number Diff line change
@@ -4,55 +4,58 @@
<source
src="https://samplelib.com/lib/preview/mp4/sample-5s.mp4"
type="video/mp4"/>
Your browser does not support the video tag.
{{'item.file.description.not.supported.video' | translate}}
</video>
</div>
<div class="file-content">
<dl class="dl-horizontal">
<dt>Name</dt>
<dt>{{'item.file.description.name' | translate}}</dt>
<dd title="ud-treebanks-v2.12.tgz">
{{ fileInput.name }}
</dd>
<dt>Size</dt>
<dt>{{'item.file.description.size' | translate}}</dt>
<dd>
{{ fileInput.fileSize }}
</dd>
<dt>Format</dt>
<dt>{{'item.file.description.format' | translate}}</dt>
<dd>
{{ fileInput.format }}
</dd>
<dt>Description</dt>
<dt>{{'item.file.description.description' | translate}}</dt>
<dd>
{{ fileInput.description }}
</dd>
<dt>MD5</dt>
<dt>{{'item.file.description.checksum' | translate}}</dt>
<dd>
{{ fileInput.checksum }}
</dd>
</dl>
<img
*ngIf="fileInput.format !== 'video/mp4'"
src="https://lindat.mff.cuni.cz/repository/xmlui/themes/UFAL/images/mime/application-x-gzip.png"
src="https://lindat.mff.cuni.cz/repository/xmlui/themes/UFAL/images/mime/application-x-gzip.png"
alt="Preview"
class="preview-image"/>
</div>
<div class="button-container">
<span>
<a class="download-btn" (click)="downloadFiles()">
<i class="fa fa-chevron-circle-down">&nbsp;</i>Download file
<i class="fa fa-chevron-circle-down">&nbsp;</i>
{{'item.file.description.download.file' | translate}}
</a>
</span>
<span class="pl-1">
<a class="preview-btn collapsed" data-toggle="collapse" *ngIf="couldPreview()" role="button"
href="#file_file_{{ fileInput.id }}">
<i class="fa fa-eye">&nbsp;</i>Preview
<i class="fa fa-eye">&nbsp;</i>
{{'item.file.description.preview' | translate}}
</a>
</span>
</div>
<div class="in collapse" id="file_file_{{ fileInput.id }}" style="height: auto">
<div style="margin: 5px 1px 1px 1px" class="panel panel-info">
<div style="height: auto; padding: 0px" class="bold panel-heading text-center">
<i class="fa fa-eye">&nbsp;</i>File Preview
<i class="fa fa-eye">&nbsp;</i>
{{'item.file.description.file.preview' | translate}}
<a class="pull-right collapsed" data-toggle="collapse" role="button" href="#file_file_{{ fileInput.id }}">
<i class="fa fa-remove">&nbsp;</i>
</a>
28 changes: 28 additions & 0 deletions src/assets/i18n/cs.json5
Original file line number Diff line number Diff line change
@@ -5126,6 +5126,34 @@
"item.view.box.no-files.message": "Tento záznam neobsahuje soubory.",


// "item.file.description.not.supported.video": "Your browser does not support the video tag.",
"item.file.description.not.supported.video": "Váš prohlížeč nepodporuje videa.",

// "item.file.description.name": "Name",
"item.file.description.name": "Název",

// "item.file.description.size": "Size",
"item.file.description.size": "Velikost",

// "item.file.description.format": "Format",
"item.file.description.format": "Formát",

// "item.file.description.description": "Description",
"item.file.description.description": "Popis",

// "item.file.description.checksum": "MD5",
"item.file.description.checksum": "MD5",

// "item.file.description.download.file": "Download file",
"item.file.description.download.file": "Stáhnout soubor",

// "item.file.description.preview": "Preview",
"item.file.description.preview": "Náhled",

// "item.file.description.file.preview": "File Preview",
"item.file.description.file.preview": "Náhled souboru",


// "item.select.confirm" : "Confirm selected"
"item.select.confirm" : "Potvrdit vybrané",

20 changes: 20 additions & 0 deletions src/assets/i18n/en.json5
Original file line number Diff line number Diff line change
@@ -2776,6 +2776,26 @@
"item.view.box.no-files.message": "This item contains no files.",


"item.file.description.not.supported.video": "Your browser does not support the video tag.",

"item.file.description.name": "Name",

"item.file.description.size": "Size",

"item.file.description.format": "Format",

"item.file.description.description": "Description",

"item.file.description.checksum": "MD5",

"item.file.description.download.file": "Download file",

"item.file.description.preview": "Preview",

"item.file.description.file.preview": "File Preview",



"item.select.confirm": "Confirm selected",

"item.select.empty": "No items to show",