Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
568062c4
Commit
568062c4
authored
Nov 24, 2015
by
Robert Lyon
Committed by
Gerrit Code Review
Nov 24, 2015
Browse files
Merge "Bug 739528, Bug 1515826: Adding actual theme css files"
parents
8e4e4e3f
01f89709
Changes
3
Hide whitespace changes
Inline
Side-by-side
htdocs/export/html/lib.php
View file @
568062c4
...
...
@@ -67,12 +67,26 @@ class PluginExportHtml extends PluginExport {
.
$this
->
get
(
'user'
)
->
get
(
'id'
)
.
'-'
.
$this
->
exporttime
.
'.zip'
;
// Find what stylesheets need to be included
$themedirs
=
$THEME
->
get_path
(
''
,
true
,
'export/html'
);
$stylesheets
=
array
(
'style.css'
,
'jquery.rating.css'
);
$themedirs
=
$THEME
->
get_path
(
''
,
true
);
foreach
(
$themedirs
as
$theme
=>
$themedir
)
{
foreach
(
$stylesheets
as
$stylesheet
)
{
if
(
is_readable
(
$themedir
.
'style/'
.
$stylesheet
))
{
array_unshift
(
$this
->
stylesheets
[
''
],
'theme/'
.
$theme
.
'/style/'
.
$stylesheet
);
if
(
is_readable
(
$themedir
.
'style/'
))
{
$files
=
scandir
(
$themedir
.
'style/'
);
foreach
(
$files
as
$stylesheet
)
{
if
(
substr_count
(
$stylesheet
,
'.css'
)
>
0
)
{
array_unshift
(
$this
->
stylesheets
[
''
],
'theme/'
.
$theme
.
'/static/style/'
.
$stylesheet
);
}
}
}
}
// Find what export plugin stylesheets need to be included
$exportthemedirs
=
$THEME
->
get_path
(
''
,
true
,
'export/html'
);
foreach
(
$exportthemedirs
as
$theme
=>
$themedir
)
{
if
(
is_readable
(
$themedir
.
'style/'
))
{
$files
=
scandir
(
$themedir
.
'style/'
);
foreach
(
$files
as
$stylesheet
)
{
if
(
substr_count
(
$stylesheet
,
'.css'
)
>
0
)
{
array_unshift
(
$this
->
stylesheets
[
''
],
'theme/'
.
$theme
.
'/static/export/style/'
.
$stylesheet
);
}
}
}
}
...
...
@@ -251,7 +265,7 @@ class PluginExportHtml extends PluginExport {
$smarty
->
assign
(
'export_time'
,
$this
->
exporttime
);
$smarty
->
assign
(
'sitename'
,
get_config
(
'sitename'
));
$smarty
->
assign
(
'stylesheets'
,
$stylesheets
);
$smarty
->
assign
(
'maharalogo'
,
$rootpath
.
$this
->
theme_path
(
'images/logo.png'
));
$smarty
->
assign
(
'maharalogo'
,
$rootpath
.
$this
->
theme_path
(
'images/
site-
logo.png'
));
return
$smarty
;
}
...
...
@@ -264,7 +278,7 @@ class PluginExportHtml extends PluginExport {
*/
private
function
theme_path
(
$path
)
{
global
$THEME
;
$themestaticdirs
=
$THEME
->
get_path
(
''
,
true
,
'export/html'
);
$themestaticdirs
=
$THEME
->
get_path
(
''
,
true
);
foreach
(
$themestaticdirs
as
$theme
=>
$dir
)
{
if
(
is_readable
(
$dir
.
$path
))
{
return
'static/theme/'
.
$theme
.
'/static/'
.
$path
;
...
...
@@ -499,14 +513,31 @@ class PluginExportHtml extends PluginExport {
require_once
(
'file.php'
);
$staticdir
=
$this
->
get
(
'exportdir'
)
.
'/'
.
$this
->
get
(
'rootdir'
)
.
'/static/'
;
$directoriestocopy
=
array
();
$themestaticdirs
=
$THEME
->
get_path
(
''
,
true
);
// Get static directories from each theme for HTML export
$themestaticdirs
=
$THEME
->
get_path
(
''
,
true
,
'export/html'
);
$statics
=
array
(
'style'
,
'images'
,
'fonts'
,
'js'
);
foreach
(
$themestaticdirs
as
$theme
=>
$dir
)
{
$themedir
=
$staticdir
.
'theme/'
.
$theme
.
'/static/'
;
$directoriestocopy
[
$dir
]
=
$themedir
;
if
(
!
check_dir_exists
(
$themedir
))
{
throw
new
SystemException
(
"Could not create theme directory for theme
$theme
"
);
// Get static directories from each theme for HTML export
foreach
(
$statics
as
$static
)
{
$themedir
=
$staticdir
.
'theme/'
.
$theme
.
'/static/'
.
$static
;
if
(
is_readable
(
$dir
.
$static
))
{
$directoriestocopy
[
$dir
.
'/'
.
$static
]
=
$themedir
;
if
(
!
check_dir_exists
(
$themedir
))
{
throw
new
SystemException
(
"Could not create theme directory for theme
$theme
"
);
}
}
}
}
$exportthemedirs
=
$THEME
->
get_path
(
''
,
true
,
'export/html'
);
foreach
(
$exportthemedirs
as
$theme
=>
$dir
)
{
foreach
(
$statics
as
$static
)
{
$themedir
=
$staticdir
.
'theme/'
.
$theme
.
'/static/export/'
.
$static
;
if
(
is_readable
(
$dir
.
$static
))
{
$directoriestocopy
[
$dir
.
'/'
.
$static
]
=
$themedir
;
if
(
!
check_dir_exists
(
$themedir
))
{
throw
new
SystemException
(
"Could not create theme directory for theme
$theme
"
);
}
}
}
}
...
...
htdocs/theme/raw/plugintype/export/html/style/jquery.rating.css
deleted
100644 → 0
View file @
8e4e4e3f
/* jQuery.Rating Plugin CSS - http://www.fyneworks.com/jquery/star-rating/ */
div
.rating-cancel
,
div
.star-rating
{
float
:
left
;
width
:
19px
;
height
:
19px
;
text-indent
:
-999em
;
cursor
:
pointer
;
display
:
block
;
background
:
transparent
;
overflow
:
hidden
}
div
.rating-cancel
,
div
.rating-cancel
a
{
background
:
url(../images/rating_delete.png)
no-repeat
0
-19px
}
div
.star-rating
,
div
.star-rating
a
{
background
:
url(../images/rating_star.png)
no-repeat
0
0px
}
div
.rating-cancel
a
,
div
.star-rating
a
{
display
:
block
;
width
:
19px
;
height
:
100%
;
background-position
:
0
0px
;
border
:
0
}
div
.star-rating-on
a
{
background-position
:
0
-19px
!important
}
div
.star-rating-hover
a
{
background-position
:
0
-38px
}
/* Read Only CSS */
div
.star-rating-readonly
a
{
cursor
:
default
!important
}
/* Partial Star CSS */
div
.star-rating
{
background
:
transparent
!important
;
overflow
:
hidden
!important
}
/* END jQuery.Rating Plugin CSS */
\ No newline at end of file
htdocs/theme/raw/plugintype/export/html/templates/header.tpl
View file @
568062c4
...
...
@@ -3,8 +3,8 @@
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=UTF-8"
>
<title>
{
str
tag
=
usersportfolio
section
=
export
.
html
args
=
$user
|
full_name
|
escape
}
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
{
$rootpath
}
static/views.css"
>
{
foreach
from
=
$stylesheets
item
=
sheet
}
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
{
$rootpath
}
static/
{
$sheet
}
"
>
{/
foreach
}
</head>
<body>
...
...
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