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
2dd689fe
Commit
2dd689fe
authored
May 10, 2010
by
Richard Mansfield
Browse files
Don't double escape latest view headings; move clean_html call into template
Signed-off-by:
Richard Mansfield
<
richardm@catalyst.net.nz
>
parent
0dc1f7d1
Changes
4
Hide whitespace changes
Inline
Side-by-side
htdocs/blocktype/newviews/theme/raw/newviews.tpl
View file @
2dd689fe
{
if
$views
}
{
if
$views
}
<ul
class=
"viewlist"
>
{
foreach
from
=
$views
item
=
view
}
{
foreach
from
=
$views
item
=
view
}
<div><strong><a
href=
"
{
$WWWROOT
}
view/view.php?id=
{
$view.id
}
"
>
{
$view.title
|
escape
}
</a></strong></div>
<li>
<div>
{
$view.shortdescription
}
</div>
<div><strong><a
href=
"
{
$WWWROOT
}
view/view.php?id=
{
$view.id
}
"
>
{
$view.title
}
</a></strong></div>
{
if
$view.sharedby
}
<div>
{
$view.shortdescription
|
safe
|
clean_html
}
</div>
<div>
{
if
$view.sharedby
}
{
if
$view.group
&&
$loggedin
}
<div>
<a
href=
"
{
$WWWROOT
}
group/view.php?id=
{
$view.group
|
escape
}
"
>
{
$view.sharedby
|
escape
}
</a>
{
if
$view.group
&&
$loggedin
}
{
elseif
$view.owner
&&
$loggedin
}
<a
href=
"
{
$WWWROOT
}
group/view.php?id=
{
$view.group
}
"
>
{
$view.sharedby
}
</a>
<a
href=
"
{
$WWWROOT
}
user/view.php?id=
{
$view.owner
|
escape
}
"
>
{
$view.sharedby
|
escape
}
</a>
{
elseif
$view.owner
&&
$loggedin
}
{
else
}
<a
href=
"
{
$WWWROOT
}
user/view.php?id=
{
$view.owner
}
"
>
{
$view.sharedby
}
</a>
{
$view.sharedby
|
escape
}
{
else
}
{
$view.sharedby
}
{/
if
}
<span
class=
"postedon"
>
{
if
$view.mtime
==
$view.ctime
}{
str
tag
=
Created
}{
else
}{
str
tag
=
Updated
}{/
if
}
{
$view.mtime
|
strtotime
|
format_date
:
'strftimedate'
}
</span>
</div>
{/
if
}
{/
if
}
<span
class=
"postedon"
>
</li>
{
if
$view.mtime
==
$view.ctime
}{
str
tag
=
Created
}{
else
}{
str
tag
=
Updated
}{/
if
}
{
$view.mtime
|
strtotime
|
format_date
:
'strftimedate'
}
</span>
</div>
{/
if
}
{/
foreach
}
{/
foreach
}
</ul>
{
else
}
{
else
}
{
str
tag
=
noviews
section
=
view
}
{
str
tag
=
noviews
section
=
view
}
{/
if
}
{/
if
}
htdocs/lib/view.php
View file @
2dd689fe
...
@@ -2566,7 +2566,7 @@ class View {
...
@@ -2566,7 +2566,7 @@ class View {
$institutions
[
'mahara'
]
->
displayname
=
get_config
(
'sitename'
);
$institutions
[
'mahara'
]
->
displayname
=
get_config
(
'sitename'
);
}
}
foreach
(
$viewdata
as
&
$v
)
{
foreach
(
$viewdata
as
&
$v
)
{
$v
->
shortdescription
=
clean_html
(
str_shorten_html
(
str_replace
(
'<br />'
,
' '
,
$v
->
description
),
100
,
true
)
)
;
$v
->
shortdescription
=
str_shorten_html
(
str_replace
(
'<br />'
,
' '
,
$v
->
description
),
100
,
true
);
if
(
$v
->
owner
)
{
if
(
$v
->
owner
)
{
$v
->
sharedby
=
View
::
owner_name
(
$v
->
ownerformat
,
$owners
[
$v
->
owner
]);
$v
->
sharedby
=
View
::
owner_name
(
$v
->
ownerformat
,
$owners
[
$v
->
owner
]);
}
else
if
(
$v
->
group
)
{
}
else
if
(
$v
->
group
)
{
...
...
htdocs/theme/raw/static/style/style.css
View file @
2dd689fe
...
@@ -1642,3 +1642,14 @@ form#search input.text {
...
@@ -1642,3 +1642,14 @@ form#search input.text {
.help
,
.help
a
,
.help
a
img
{
.help
,
.help
a
,
.help
a
img
{
vertical-align
:
top
;
vertical-align
:
top
;
}
}
ul
.viewlist
{
list-style
:
none
;
margin
:
0
0
0
0.25em
;
}
ul
.viewlist
li
:first-child
{
margin
:
0
;
}
ul
.viewlist
li
{
margin
:
0.75em
0
0
;
}
htdocs/theme/raw/templates/group/view.tpl
View file @
2dd689fe
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
{
$view.sharedby
}
{
$view.sharedby
}
{/
if
}
{/
if
}
{/
if
}
{/
if
}
<div>
{
$view.shortdescription
}
</div>
<div>
{
$view.shortdescription
|
clean_html
}
</div>
{
if
$view.tags
}
<div
class=
"tags"
>
{
str
tag
=
tags
}
:
{
list_tags
owner
=
$view.owner
tags
=
$view.tags
}
</div>
{/
if
}
{
if
$view.tags
}
<div
class=
"tags"
>
{
str
tag
=
tags
}
:
{
list_tags
owner
=
$view.owner
tags
=
$view.tags
}
</div>
{/
if
}
{
if
$view.template
}
{
if
$view.template
}
<div><a
href=
""
>
{
str
tag
=
copythisview
section
=
view
}
</a></div>
<div><a
href=
""
>
{
str
tag
=
copythisview
section
=
view
}
</a></div>
...
...
Write
Preview
Supports
Markdown
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