Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
6
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Historiana
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Paul Jongsma
Historiana
Commits
404d86a0
Unverified
Commit
404d86a0
authored
Oct 18, 2020
by
Paul Jongsma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add publish/unpublish
parent
bc80dfaf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
src/pages/ViewpointsIndex.vue
src/pages/ViewpointsIndex.vue
+16
-2
No files found.
src/pages/ViewpointsIndex.vue
View file @
404d86a0
...
...
@@ -34,9 +34,13 @@
:image=
"vp.icon"
:url=
"vp.url"
type=
"Viewpoint Collection"
csstype=
"ViewpointCollection
"
:csstype=
"vp.is_visible ? 'ViewpointCollection' : 'private'
"
:btn-edit-modal=
"user === vp.owner"
@
showEdit=
"showEdit(vp)"
:btn-publish=
"!vp.is_visible"
:btn-un-publish=
"vp.is_visible"
@
publish=
"publish(vp)"
@
unpublish=
"publish(vp)"
>
{{
vp
.
introduction
}}
</card>
</span>
...
...
@@ -68,9 +72,18 @@ export default {
},
methods
:
{
publish
(
vp
)
{
let
vm
=
this
;
API
.
post
(
'
/viewpoints/toggle/visibility
'
,
{
collection
:
vp
.
uuid
,
session
:
this
.
$store
.
getters
[
'
user/session
'
]
}).
then
(()
=>
{
vm
.
reload
();
});
},
showEdit
(
e
)
{
this
.
current
=
e
;
console
.
log
(
'
showEdit:
'
,
e
);
this
.
toggleForm
=
true
;
this
.
action
=
'
Edit
'
;
},
...
...
@@ -80,6 +93,7 @@ export default {
this
.
action
=
'
Add
'
;
this
.
toggleForm
=
true
;
},
reload
(
toggle
=
false
)
{
//this.$q.notify({ message: 'RELOADED', position: 'center' });
return
API
.
get
(
'
/viewpoints/
'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment