Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
marcus-lodspeakr
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
uib-ub
Spesialsamlingene
marcus-lodspeakr
Commits
1024b96a
Commit
1024b96a
authored
13 years ago
by
alangrafu
Browse files
Options
Downloads
Patches
Plain Diff
Including params in base variable for special URIs
Also, displaying results when there is only one class in special/index
parent
2171e6bf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
classes/BasicSpecialFunction.php
+2
-0
2 additions, 0 deletions
classes/BasicSpecialFunction.php
classes/Utils.php
+7
-2
7 additions, 2 deletions
classes/Utils.php
views/special.index.view.html
+4
-0
4 additions, 0 deletions
views/special.index.view.html
with
13 additions
and
2 deletions
classes/BasicSpecialFunction.php
+
2
−
0
View file @
1024b96a
...
...
@@ -58,6 +58,7 @@ class SpecialFunction extends AbstractSpecialFunction{
}
$data
[
'query'
]
=
$queryHeader
.
$query
;
$data
[
'results'
]
=
$e
->
query
(
$data
[
'query'
],
Utils
::
getResultsType
(
$query
));
$data
[
'params'
]
=
$params
;
Utils
::
processDocument
(
$uri
,
$acceptContentType
,
$data
,
$viewFile
);
}
catch
(
Exception
$ex
){
Utils
::
send500
(
$uri
);
...
...
@@ -68,3 +69,4 @@ class SpecialFunction extends AbstractSpecialFunction{
}
?>
This diff is collapsed.
Click to expand it.
classes/Utils.php
+
7
−
2
View file @
1024b96a
...
...
@@ -102,6 +102,9 @@ class Utils{
$base
[
'this'
][
'value'
]
=
$uri
;
$base
[
'this'
][
'curie'
]
=
Utils
::
uri2curie
(
$uri
);
$base
[
'ns'
]
=
$conf
[
'ns'
];
if
(
isset
(
$data
[
'params'
])){
$base
[
'this'
][
'params'
]
=
$data
[
'params'
];
}
require
(
'lib/Haanga/lib/Haanga.php'
);
Haanga
::
configure
(
array
(
'template_dir'
=>
'./'
,
...
...
@@ -206,8 +209,9 @@ class Utils{
}
else
{
$results
=
Utils
::
serializeByQueryType
(
$data
,
$extension
);
}
Utils
::
showView
(
$uri
,
$results
,
$viewFile
);
$baseData
[
'uri'
]
=
$uri
;
$baseData
[
'params'
]
=
$data
[
'params'
];
Utils
::
showView
(
$baseData
,
$results
,
$viewFile
);
exit
(
0
);
}
...
...
@@ -226,3 +230,4 @@ class Utils{
}
?>
This diff is collapsed.
Click to expand it.
views/special.index.view.html
+
4
−
0
View file @
1024b96a
...
...
@@ -10,6 +10,10 @@
<body>
<h1>
Instances of {{base.this.curie}}
</h1>
<ul>
{% if r.value.resource != null %}
<!-- Only one class available -->
<li><a
href=
'{{base.baseUrl}}special/instances/{{ r.curie.resource }}'
>
{{r.curie.resource}}
</a></li>
{% endif %}
{% for row in r %}
{% if row.value.resource != null %}
<li><a
href=
'{{base.baseUrl}}special/instances/{{ row.curie.resource }}'
>
{{row.curie.resource}}
</a></li>
...
...
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