Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
General documentation
Manage
Activity
Members
Labels
Plan
Issues
24
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Documentation
General documentation
Commits
ac1e23c8
Commit
ac1e23c8
authored
3 years ago
by
Manon Bourgognon
Browse files
Options
Downloads
Patches
Plain Diff
update: solid-action example
parent
c4335ea4
No related branches found
Branches containing commit
No related tags found
1 merge request
!90
feature: add link-text attribute
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/import_documentation/Widgets/Examples.rst
+37
-19
37 additions, 19 deletions
source/import_documentation/Widgets/Examples.rst
with
37 additions
and
19 deletions
source/import_documentation/Widgets/Examples.rst
+
37
−
19
View file @
ac1e23c8
.. _widgets-examples:
Examples
Examples
=========
=========
...
@@ -178,21 +180,38 @@ solid-set-div
...
@@ -178,21 +180,38 @@ solid-set-div
solid-action
solid-action
~~~~~~~~~~~~
~~~~~~~~~~~~
A classic example of solid-action use is a list of resources (users here) with only one field displayed and the possibility to access additionnal informations by clicking on "User details" :
.. code:: html
.. code:: html
<solid-display
<solid-display
data-src="data/list/user-4.jsonld"
data-src="data/list/users.jsonld"
fields="first_name, last_name, skills"
fields="name, details"
widget-skills="solid-action-label"
value-details="User details"
link-text-skills="Click to see his/her skills"
label-name="Name :"
label-skills="Skills :"
widget-name="solid-display-value-label"
src-skills="data/list/user-4-skills.jsonld"
></solid-display>
></solid-display>
.. figure:: ../../_static/images/import_documentation/widgets-examples/widget-action.png
.. figure:: ../../_static/images/import_documentation/widgets-examples/widget-action.png
:alt: Basic solid-display
This is the solid-display with action attribute and link-text-[field] attribute use to replace the basic value-[field] from above.
.. code:: html
<solid-display
data-src="data/list/users.jsonld"
fields="name, details"
label-name="Name :"
widget-name="solid-display-value-label"
action-details="user-details"
link-text-details="User details"
></solid-display>
.. figure:: ../../_static/images/import_documentation/widgets-examples/widget-action2.png
:alt: Widget solid-action
:alt: Widget solid-action
By adding
action attribute in the solid-display,
a router, a route and another view, clicking on the solid-action displays the view (dotted border):
By adding a router, a route and another view, clicking on the solid-action displays the view (dotted border):
.. code:: html
.. code:: html
...
@@ -200,29 +219,28 @@ By adding action attribute in the solid-display, a router, a route and another v
...
@@ -200,29 +219,28 @@ By adding action attribute in the solid-display, a router, a route and another v
<solid-route
<solid-route
hidden
hidden
use-id
use-id
name="
skills
-details"
name="
user
-details"
></solid-route>
></solid-route>
</solid-router>
</solid-router>
<solid-display
<solid-display
data-src="data/list/user-4.jsonld"
data-src="data/list/users.jsonld"
fields="first_name, last_name, skills"
fields="name, details"
widget-skills="solid-action-label"
label-name="Name :"
link-text-skills="Click to see his/her skills"
widget-name="solid-display-value-label"
label-skills="Skills :"
action-details="user-details"
src-skills="data/list/user-4-skills.jsonld"
link-text-details="User details"
action-skills="skills-details"
></solid-display>
></solid-display>
<div data-view="
skills
-details" hidden>
<div data-view="
user
-details" hidden>
<solid-display
<solid-display
bind-resources
bind-resources
fields="
name
"
fields="
first_name, last_name, username, email
"
></solid-display>
></solid-display>
</div>
</div>
.. figure:: ../../_static/images/import_documentation/widgets-examples/widget-action
2
.png
.. figure:: ../../_static/images/import_documentation/widgets-examples/widget-action
3
.png
:alt: Widget solid-action
:alt: Widget solid-action
with view
Step-by-step widget creation
Step-by-step widget creation
...
...
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