Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
21f4ddd4
Commit
21f4ddd4
authored
7 years ago
by
Olimpia Magliulo
Browse files
Options
Downloads
Patches
Plain Diff
Convert metadata-converter to twig template
parent
9c749df8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/metadata-converter.twig
+51
-0
51 additions, 0 deletions
templates/metadata-converter.twig
with
51 additions
and
0 deletions
templates/metadata-converter.twig
0 → 100644
+
51
−
0
View file @
21f4ddd4
{%
set
pagetitle
=
'Metadata parser'
|
trans
%}
{%
extends
"base.twig"
%}
{%
set
i
=
1
%}
{%
block
content
%}
<h2>
{{
pagetitle
}}
</h2>
<form
method=
"post"
enctype=
"multipart/form-data"
>
<p>
{%
trans
'XML metadata'
%}
</p>
<p>
<textarea
name=
"xmldata"
rows=
"20"
style=
"width:100%"
>
{{
xmldata
}}
</textarea>
</p>
<p>
{{
'or select a file:'
|
trans
}}
<input
type=
"file"
name=
"xmlfile"
/>
</p>
<p>
<button
type=
"submit"
class=
"btn"
>
{%
trans
%}
Parse
{%
endtrans
%}
</button>
</p>
</form>
{%
if
output
%}
<h2>
{{
'Converted metadata'
|
trans
}}
</h2>
{%
for
type
,
text
in
output
if
text
%}
<h3>
{{
type
}}
</h3>
<div
class=
"metadatabox"
>
<button
data-clipboard-target=
"#metadata
{{
loop.index
}}
"
id=
"btn
{{
loop.index
}}
"
class=
"btn topright"
style=
"margin-right: 0.5em"
>
<img
src=
"/
{{
baseurlpath
}}
resources/icons/clipboard.svg"
alt=
"Copy to clipboard"
/>
</button>
<pre
id=
"metadata
{{
loop.index
}}
"
>
{{
text
}}
</pre>
</div>
{%
set
i
=
i
+
1
%}
{%
endfor
%}
{%
endif
%}
{%
endblock
content
%}
{%
block
postload
%}
<script
type=
"text/javascript"
>
{%
-
for
j
in
1.
.
i
%}
var
clipboard
{{
j
}}
=
new
Clipboard
(
'
#btn
{{
j
}}
'
);
{%
-
endfor
%}
</script>
{%
endblock
postload
%}
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