Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Géocontrib Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor 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
externe Matthieu
Géocontrib Frontend
Commits
b94c6a93
Commit
b94c6a93
authored
3 years ago
by
DESPRES Damien
Browse files
Options
Downloads
Patches
Plain Diff
hide functions when offline
parent
b58aa76c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/views/feature/Feature_edit.vue
+42
-36
42 additions, 36 deletions
src/views/feature/Feature_edit.vue
src/views/project/Project_detail.vue
+6
-6
6 additions, 6 deletions
src/views/project/Project_detail.vue
with
48 additions
and
42 deletions
src/views/feature/Feature_edit.vue
+
42
−
36
View file @
b94c6a93
...
...
@@ -72,7 +72,7 @@
<!-- Import GeoImage -->
<div
v-frag
v-if=
"feature_type && feature_type.geom_type === 'point'"
>
<p>
<p
v-if=
"isOffline()!=true"
>
<button
@
click=
"showGeoRef = true"
id=
"add-geo-image"
...
...
@@ -182,45 +182,48 @@
</div>
<!-- Pièces jointes -->
<div
class=
"ui horizontal divider"
>
PIÈCES JOINTES
</div>
<div
id=
"formsets-attachment"
>
<FeatureAttachmentForm
v-for=
"form in attachmentFormset"
:key=
"form.dataKey"
:attachmentForm=
"form"
ref=
"attachementForm"
/>
</div>
<div
v-if=
"isOffline()!=true"
>
<div
class=
"ui horizontal divider"
>
PIÈCES JOINTES
</div>
<div
v-if=
"isOffline()!=true"
id=
"formsets-attachment"
>
<FeatureAttachmentForm
v-for=
"form in attachmentFormset"
:key=
"form.dataKey"
:attachmentForm=
"form"
ref=
"attachementForm"
/>
</div>
<button
@
click=
"add_attachement_formset"
id=
"add-attachment"
type=
"button"
class=
"ui compact basic button button-hover-green"
>
<i
class=
"ui plus icon"
></i>
Ajouter une pièce jointe
</button>
<button
@
click=
"add_attachement_formset"
id=
"add-attachment"
type=
"button"
class=
"ui compact basic button button-hover-green"
>
<i
class=
"ui plus icon"
></i>
Ajouter une pièce jointe
</button>
</div>
<!-- Signalements liés -->
<div
class=
"ui horizontal divider"
>
SIGNALEMENTS LIÉS
</div>
<div
id=
"formsets-link"
>
<FeatureLinkedForm
v-for=
"form in linkedFormset"
:key=
"form.dataKey"
:linkedForm=
"form"
:features=
"features"
ref=
"linkedForm"
/>
<div
v-if=
"isOffline()!=true"
>
<div
class=
"ui horizontal divider"
>
SIGNALEMENTS LIÉS
</div>
<div
id=
"formsets-link"
>
<FeatureLinkedForm
v-for=
"form in linkedFormset"
:key=
"form.dataKey"
:linkedForm=
"form"
:features=
"features"
ref=
"linkedForm"
/>
</div>
<button
@
click=
"add_linked_formset"
id=
"add-link"
type=
"button"
class=
"ui compact basic button button-hover-green"
>
<i
class=
"ui plus icon"
></i>
Ajouter une liaison
</button>
</div>
<button
@
click=
"add_linked_formset"
id=
"add-link"
type=
"button"
class=
"ui compact basic button button-hover-green"
>
<i
class=
"ui plus icon"
></i>
Ajouter une liaison
</button>
<div
class=
"ui divider"
></div>
<button
@
click=
"postForm"
type=
"button"
class=
"ui teal icon button"
>
...
...
@@ -428,6 +431,9 @@ export default {
},
methods
:
{
isOffline
(){
return
navigator
.
onLine
==
false
;
},
initForm
()
{
if
(
this
.
currentRouteName
===
"
editer-signalement
"
)
{
for
(
let
key
in
this
.
feature
)
{
...
...
This diff is collapsed.
Click to expand it.
src/views/project/Project_detail.vue
+
6
−
6
View file @
b94c6a93
...
...
@@ -64,7 +64,7 @@
</div>
<div
class=
"ui icon right floated compact buttons"
>
<a
v-if=
"permissions && permissions.can_view_project"
v-if=
"permissions && permissions.can_view_project
&& isOffline()!=true
"
id=
"subscribe-button"
class=
"ui button button-hover-green"
data-tooltip=
"S'abonner au projet"
...
...
@@ -75,7 +75,7 @@
<i
class=
"inverted grey envelope icon"
></i>
</a>
<router-link
v-if=
"permissions && permissions.can_update_project"
v-if=
"permissions && permissions.can_update_project
&& isOffline()!=true
"
:to=
"
{ name: 'project_edit', params: { slug: project.slug } }"
class="ui button button-hover-orange"
data-tooltip="Modifier le projet"
...
...
@@ -166,7 +166,7 @@
v-if="
project
&&
permissions
&&
permissions.can_create_feature_type
permissions.can_create_feature_type
&&
isOffline()!=true
"
class="
ui
...
...
@@ -192,7 +192,7 @@
project
&&
type.is_editable
&&
permissions
&&
permissions.can_create_feature_type
permissions.can_create_feature_type
&&
isOffline()!=true
"
class="
ui
...
...
@@ -218,7 +218,7 @@
<div
class=
"nouveau-type-signalement"
>
<router-link
v-if=
"permissions && permissions.can_update_project"
v-if=
"permissions && permissions.can_update_project
&& isOffline()!=true
"
:to=
"
{
name: 'ajouter-type-signalement',
params: { slug: project.slug },
...
...
@@ -230,7 +230,7 @@
</div>
<div
class=
"nouveau-type-signalement"
>
<a
v-if=
"permissions && permissions.can_update_project"
v-if=
"permissions && permissions.can_update_project
&& isOffline()!=true
"
class=
"
ui
compact
...
...
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