Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
custom-tzcld
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Components
custom-tzcld
Commits
6c95fad3
Commit
6c95fad3
authored
1 year ago
by
Antoine Dupré
Browse files
Options
Downloads
Patches
Plain Diff
feature: add shared files for referents
parent
1712105b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!7
fix: backlink on left in territory profile...
Pipeline
#16118
passed with stage
in 1 minute and 11 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/styles/shared-files.scss
+24
-0
24 additions, 0 deletions
src/styles/shared-files.scss
src/views-terrytories.js
+63
-9
63 additions, 9 deletions
src/views-terrytories.js
src/widjets-display-shared-files.js
+13
-5
13 additions, 5 deletions
src/widjets-display-shared-files.js
with
100 additions
and
14 deletions
src/styles/shared-files.scss
+
24
−
0
View file @
6c95fad3
.list-files-bordered
{
border-radius
:
10px
;
border
:
1px
solid
var
(
--
color-primary
)
;;
}
.list-shared-files
{
&
.masonry
{
flex-wrap
:
wrap
;
...
...
@@ -7,6 +11,19 @@
&
>
div
{
display
:
flex
;
padding-left
:
16px
;
margin-bottom
:
16px
;
}
}
solid-delete
{
text-indent
:
-999em
;
display
:
inline-block
;
width
:
24px
;
position
:
relative
;
&
::before
{
position
:
absolute
;
top
:
5px
;
right
:
5px
;
text-indent
:
0
;
}
}
...
...
@@ -37,6 +54,13 @@
}
.shared-file-action-wrapper
{
vertical-align
:
middle
;
padding
:
5px
15px
;
a
,
solid-link
,
solid-delete
{
padding
:
5px
;
&
::before
{
font-size
:
16px
;
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/views-terrytories.js
+
63
−
9
View file @
6c95fad3
...
...
@@ -99,6 +99,9 @@ import("./utils.js").then((utils) => {
<solid-route name="
${
utils
.
TZCLD_URLS
.
my_territory_shared_files_space
}
" use-id></solid-route>
<solid-route name="
${
utils
.
TZCLD_URLS
.
my_territory_shared_files_all
}
" use-id></solid-route>
<solid-route name="
${
utils
.
TZCLD_URLS
.
my_territory_shared_file_add
}
" use-id></solid-route>
<solid-route name="
${
utils
.
TZCLD_URLS
.
my_territory_grappe_shared_files_space
}
" use-id></solid-route>
<solid-route name="
${
utils
.
TZCLD_URLS
.
my_territory_grappe_shared_files_all
}
" use-id></solid-route>
<solid-route name="
${
utils
.
TZCLD_URLS
.
my_territory_grappe_shared_file_add
}
" use-id></solid-route>
</ul>
</solid-router>
</nav>`
;
...
...
@@ -334,12 +337,32 @@ import("./utils.js").then((utils) => {
order-desc="date"
paginate-by="8"
loader-id="loader-
${
this
.
route
}
-tzcld-exchanges-files"
route-suffix="
${
utils
.
TZCLD_URLS
.
my_territory_shared_files_edit
}
"
item-width="half"
>
</tzcld-shared-files-display>
<p class="text-right padding-right-xxlarge"><solid-link class="segment margin-top-xxlarge sm-full button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered button-icon icon icon-square-edit icon-margin-right-xsmall" bind-resources next="
${
utils
.
TZCLD_URLS
.
my_territory_shared_file_add
}
">Ajouter un fichier ou un dossier</solid-link></p>
</div>
<div class="segment third padding-xsmall whitespace-normal list-referents">
<div class="segment third padding-xsmall whitespace-normal list-files-bordered">
<h2 class="tzcld-h2">Partagés avec la grappe</h2>
<div class="loader" id="loader-
${
this
.
route
}
-tzcld-exchanges-ref-files">
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<tzcld-shared-files-display
bind-resources=""
nested-field="tzcld_community_synthesis_followed.tzcld_referents_community_shared_files"
solid-resource=""
order-desc="date"
paginate-by="4"
loader-id="loader-
${
this
.
route
}
-tzcld-exchanges-ref-files"
route-suffix="
${
utils
.
TZCLD_URLS
.
my_territory_grappe_shared_files_edit
}
"
item-width="full"
>
</tzcld-shared-files-display>
<p class="text-right padding-right-xxlarge"><solid-link class="segment margin-top-xxlarge sm-full button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered button-icon icon icon-square-edit icon-margin-right-xsmall" bind-resources next="
${
utils
.
TZCLD_URLS
.
my_territory_grappe_shared_file_add
}
">Ajouter un fichier ou un dossier</solid-link></p>
</div>
</div>
...
...
@@ -1192,7 +1215,11 @@ import("./utils.js").then((utils) => {
return
render
;
}
viewCommunitySharedFileEdit
()
{
viewCommunitySharedFileEdit
(
nested
=
false
)
{
let
nested_value
=
'
tzcld_profile_identity.tzcld_admins_community_shared_files
'
;
if
(
nested
)
{
nested_value
=
nested
;
}
let
render
=
`
<div class="segment block margin-right-xxsmall margin-left-xxsmall sm-margin-none padding-top-none sm-padding-xsmall">
<div class="segment block sm-hidden text-left">
...
...
@@ -1200,7 +1227,7 @@ import("./utils.js").then((utils) => {
</div>
<div class="segment full padding-xsmall whitespace-normal">
<div class="loader" id="loader-
${
this
.
route
}
-
${
utils
.
TZCLD_URLS
.
my_territory_shared_files_edit
}
">
<div class="loader" id="loader-
${
this
.
route
}
-
${
utils
.
TZCLD_URLS
.
my_territory_shared_files_edit
}
-
${
nested
}
">
<div></div>
<div></div>
<div></div>
...
...
@@ -1238,7 +1265,7 @@ import("./utils.js").then((utils) => {
widget-author="solid-form-dropdown-autocompletion-label"
order-asc-author="username"
range-author="
${
this
.
rangeUser
}
"
loader-id="loader-
${
this
.
route
}
-
${
utils
.
TZCLD_URLS
.
my_territory_shared_files_edit
}
"
loader-id="loader-
${
this
.
route
}
-
${
utils
.
TZCLD_URLS
.
my_territory_shared_files_edit
}
-
${
nested
}
"
bind-resources=""
solid-resource=""
patrtial
...
...
@@ -1257,7 +1284,11 @@ import("./utils.js").then((utils) => {
}
viewCommunitySharedFileAdd
()
{
viewCommunitySharedFileAdd
(
nested
=
false
)
{
let
nested_value
=
'
tzcld_profile_identity.tzcld_admins_community_shared_files
'
;
if
(
nested
)
{
nested_value
=
nested
;
}
let
render
=
`
<div class="segment block margin-right-xxsmall margin-left-xxsmall sm-margin-none padding-top-none sm-padding-xsmall">
<div class="segment block sm-hidden text-left">
...
...
@@ -1265,7 +1296,7 @@ import("./utils.js").then((utils) => {
</div>
<div class="segment full padding-xsmall whitespace-normal">
<div class="loader" id="loader-
${
this
.
route
}
-
${
utils
.
TZCLD_URLS
.
my_territory_shared_file_add
}
">
<div class="loader" id="loader-
${
this
.
route
}
-
${
utils
.
TZCLD_URLS
.
my_territory_shared_file_add
}
-
${
nested
}
">
<div></div>
<div></div>
<div></div>
...
...
@@ -1294,9 +1325,9 @@ import("./utils.js").then((utils) => {
label-document="Document"
label-name="Titre du edocument"
loader-id="loader-
${
this
.
route
}
-
${
utils
.
TZCLD_URLS
.
my_territory_shared_file_add
}
"
loader-id="loader-
${
this
.
route
}
-
${
utils
.
TZCLD_URLS
.
my_territory_shared_file_add
}
-
${
nested
}
"
bind-resources=""
nested-field="
tzcld_profile_identity.tzcld_admins_community_shared_files
"
nested-field="
${
nested_value
}
"
solid-resource=""
patrtial
submit-button="Enregistrer"
...
...
@@ -1359,6 +1390,8 @@ import("./utils.js").then((utils) => {
//console.table(props);
this
.
route
=
this
.
getRoute
(
this
.
uniq
);
let
nested_shared_ref_value
=
'
tzcld_community_synthesis_followed.tzcld_referents_community_shared_files
'
;
let
render
=
`
${
this
.
routeurs
()}
...
...
@@ -1485,6 +1518,27 @@ import("./utils.js").then((utils) => {
<div id="
${
utils
.
TZCLD_URLS
.
my_territory_shared_file_add
}
" data-view="
${
utils
.
TZCLD_URLS
.
my_territory_shared_file_add
}
" class="community-files" hidden>
${
this
.
viewCommunitySharedFileAdd
()}
</div>
<div id="
${
utils
.
TZCLD_URLS
.
my_territory_grappe_shared_files_space
}
" data-view="
${
utils
.
TZCLD_URLS
.
my_territory_grappe_shared_files_space
}
" class="community-files one" hidden>
<solid-router default-route="my_territory_shared_file_empty" route-prefix="">
<solid-route name="my_territory_grappe_shared_file_empty" use-id></solid-route>
<solid-route name="
${
utils
.
TZCLD_URLS
.
my_territory_grappe_shared_files_edit
}
" use-id></solid-route>
</solid-router>
<div id="my_territory_grappe_shared_file_empty" data-view="my_territory_grappe_shared_file_empty" class="files one" hidden>
</div>
<div id="
${
utils
.
TZCLD_URLS
.
my_territory_grappe_shared_files_edit
}
" data-view="
${
utils
.
TZCLD_URLS
.
my_territory_grappe_shared_files_edit
}
" class="community-files-edit one" hidden>
${
this
.
viewCommunitySharedFileEdit
(
nested_shared_ref_value
)}
</div>
</div>
<div id="
${
utils
.
TZCLD_URLS
.
my_territory_grappe_shared_files_all
}
" data-view="
${
utils
.
TZCLD_URLS
.
my_territory_grappe_shared_files_all
}
" class="community-files" hidden>
</div>
<div id="
${
utils
.
TZCLD_URLS
.
my_territory_grappe_shared_file_add
}
" data-view="
${
utils
.
TZCLD_URLS
.
my_territory_grappe_shared_file_add
}
" class="community-files" hidden>
${
this
.
viewCommunitySharedFileAdd
(
nested_shared_ref_value
)}
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
src/widjets-display-shared-files.js
+
13
−
5
View file @
6c95fad3
...
...
@@ -18,6 +18,9 @@ import("./utils.js").then((utils) => {
<div></div>
<div></div>
</div>`
;
let
route_name
=
this
.
element
.
attributes
[
'
route-suffix
'
].
value
;
let
item_width
=
this
.
element
.
attributes
[
'
item-width
'
].
value
;
//let paginate_by = this.element.attributes['paginate-by'].value ;
let
tzcldprofile
=
{
files
:
await
this
.
resource
[
"
ldp:contains
"
]
};
...
...
@@ -27,8 +30,12 @@ import("./utils.js").then((utils) => {
}
}
let
render
=
`<div class="segment block margin-top-small margin-bottom-small list-shared-files masonry">`
;
//let i = 0;
for
(
let
file
of
tzcldprofile
.
files
)
{
/*i++;
if (i > paginate_by) {
break ;
}*/
let
icon_content
=
utils
.
getSVGFile
()
;
if
(
await
file
.
document
!=
""
)
{
let
extention_file
=
utils
.
getFileExt
(
await
file
.
document
)
;
...
...
@@ -37,7 +44,7 @@ import("./utils.js").then((utils) => {
}
}
render
+=
`<div class="segment
half
card-shared-file">
render
+=
`<div class="segment
${
item_width
}
card-shared-file">
<div class="segment flex bg-color-white shadow border-rounded-xxsmall full text-top whitespace-normal">
<div class="segment auto shared-file-icon-wrapper padding-small">
${
icon_content
}
...
...
@@ -60,17 +67,18 @@ import("./utils.js").then((utils) => {
render
+=
`<div class="shared-file-meta-wrapper">
${
await
user
.
name
}
<br/>
${
moment
(
await
date
.
toString
()).
locale
(
'
fr
'
).
format
(
'
Do/MM/YYYY
'
)}
</div>`
;
render
+=
`</div>
<div class="segment auto shared-file-action-wrapper
padding-small
whitespace-normal">`
;
<div class="segment auto shared-file-action-wrapper whitespace-normal">`
;
if
(
await
file
.
document
!=
""
)
{
render
+=
`<a class="text-color-heading" target="_blank" href="
${
await
file
.
document
}
"><span class="icontz-mdi_download-box-outline"></span></a><br/>
<solid-ac-checker permission="acl:Write" data-src="
${
await
file
[
'
@id
'
]}
">
<solid-link data-src="
${
await
file
[
'
@id
'
]}
" next="
${
utils
.
TZCLD_URLS
.
my_territory_shared_files_edit
}
"><span class="icontz-mdi_pencil-outline"></span></solid-link><br/>
<solid-link data-src="
${
await
file
[
'
@id
'
]}
" next="
${
route_name
}
"><span class="icontz-mdi_pencil-outline
text-color-heading
"></span></solid-link><br/>
<solid-delete data-src="
${
await
file
[
'
@id
'
]}
"
confirmation-submit-class="icontz-mdi_trash"
confirmation-submit-text="ttttt"
confirmation-type="confirm"
confirmation-message="Merci de confirmer la suppression du fichier
${
await
file
.
name
}
."
><span class="icontz-mdi_trash"></span></solid-delete>
class="icontz-mdi_trash text-color-heading"
></solid-delete>
</solid-ac-checker>`
;
}
render
+=
`</div>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment