Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
UNL_Search
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Ryan Dee
UNL_Search
Commits
b4ba7a08
Commit
b4ba7a08
authored
11 years ago
by
Kevin Abel
Browse files
Options
Downloads
Patches
Plain Diff
In debug mode (only) use the local template dependents rather than CDN
parent
55a7465c
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
www/index.php
+14
-8
14 additions, 8 deletions
www/index.php
www/templates/embed-debug.tpl.php
+41
-0
41 additions, 0 deletions
www/templates/embed-debug.tpl.php
www/templates/embed.tpl.php
+1
-1
1 addition, 1 deletion
www/templates/embed.tpl.php
with
56 additions
and
9 deletions
www/index.php
+
14
−
8
View file @
b4ba7a08
...
...
@@ -18,7 +18,14 @@ $isEmbed = isset($_GET['embed']) && $_GET['embed'];
UNL_Templates
::
setCachingService
(
new
UNL_Templates_CachingService_Null
());
UNL_Templates
::
$options
[
'version'
]
=
4.0
;
$page
=
UNL_Templates
::
factory
(
'Fixed'
);
if
(
UNL_Search
::
$mode
===
'debug'
)
{
$page
=
UNL_Templates
::
factory
(
'Local'
);
$page
->
addScript
(
'js/search.js'
);
}
else
{
$page
=
UNL_Templates
::
factory
(
'Fixed'
);
$page
->
addScript
(
'js/search.min.js'
);
}
if
(
!
$isEmbed
)
{
$page
->
doctitle
=
'<title>Search | University of Nebraska–Lincoln</title>'
;
...
...
@@ -28,12 +35,6 @@ if (!$isEmbed) {
$page
->
breadcrumbs
=
ob_get_clean
();
}
if
(
UNL_Search
::
$mode
===
'debug'
)
{
$page
->
addScript
(
'js/search.js'
);
}
else
{
$page
->
addScript
(
'js/search.min.js'
);
}
$local_results
=
''
;
$inlineJS
=
''
;
$apiKey
=
UNL_Search
::
getJSAPIKey
();
...
...
@@ -129,7 +130,12 @@ if (!$isEmbed) {
$page
->
maincontentarea
=
$maincontent
;
echo
$page
;
}
else
{
renderTemplate
(
'templates/embed.tpl.php'
,
array
(
if
(
UNL_Search
::
$mode
===
'debug'
)
{
$template
=
'templates/embed-debug.tpl.php'
;
}
else
{
$template
=
'templates/embed.tpl.php'
;
}
renderTemplate
(
$template
,
array
(
'head'
=>
$page
->
head
,
'maincontent'
=>
$maincontent
));
...
...
This diff is collapsed.
Click to expand it.
www/templates/embed-debug.tpl.php
0 → 100644
+
41
−
0
View file @
b4ba7a08
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="ie iem7 embed"><![endif]-->
<!--[if lt IE 7 ]><html class="ie ie6 embed" lang="en"><![endif]-->
<!--[if IE 7 ]><html class="ie ie7 embed" lang="en"><![endif]-->
<!--[if IE 8 ]><html class="ie ie8 embed" lang="en"><![endif]-->
<!--[if (gte IE 9)|(gt IEMobile 7) ]><html class="ie embed" lang="en"><![endif]-->
<!--[if !(IEMobile) | !(IE)]><!-->
<html
class=
"embed"
lang=
"en"
>
<!--<![endif]-->
<head>
<meta
charset=
"utf-8"
/>
<title>
UNL Search | University of Nebraska
–
Lincoln
</title>
<!-- Load Cloud.typography fonts -->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"//cloud.typography.com/7717652/616662/css/fonts.css"
/>
<!-- Load our base CSS file -->
<!--[if gte IE 9]><!-->
<link
rel=
"stylesheet"
type=
"text/css"
media=
"all"
href=
"/wdn/templates_4.0/css/all.css"
/>
<!--<![endif]-->
<!-- Load the template JS file -->
<script
type=
"text/javascript"
src=
"/wdn/templates_4.0/scripts/compressed/all.js"
id=
"wdn_dependents"
></script>
<!--[if lt IE 9]>
<link rel="stylesheet" type="text/css" media="all" href="/wdn/templates_4.0/css/all_oldie.css" />
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- For all IE versions, bring in the tweaks -->
<!--[if IE]>
<link rel="stylesheet" type="text/css" media="all" href="/wdn/templates_4.0/css/ie.css" />
<![endif]-->
<?php
echo
$head
?>
</head>
<body>
<div
id=
"wdn_wrapper"
>
<div
id=
"wdn_content_wrapper"
>
<div
id=
"maincontent"
class=
"wdn-main"
>
<?php
echo
$maincontent
?>
</div>
</div>
</div>
</body>
</html>
This diff is collapsed.
Click to expand it.
www/templates/embed.tpl.php
+
1
−
1
View file @
b4ba7a08
...
...
@@ -16,7 +16,7 @@
<!--<![endif]-->
<!-- Load the template JS file -->
<script
type=
"text/javascript"
src=
"/wdn/templates_4.0/scripts/compressed/all.js?dep=
4.0.7
"
id=
"wdn_dependents"
></script>
<script
type=
"text/javascript"
src=
"/
/unlcms.unl.edu/
wdn/templates_4.0/scripts/compressed/all.js?dep=
$DEP_VERSION$
"
id=
"wdn_dependents"
></script>
<!--[if lt IE 9]>
<link rel="stylesheet" type="text/css" media="all" href="//unlcms.unl.edu/wdn/templates_4.0/css/all_oldie.css" />
...
...
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