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
58edeb60
Commit
58edeb60
authored
Oct 27, 2007
by
Nigel McNie
Browse files
Link the file link to the details page. The icon is now the direct download link.
parent
966b35e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/file/blocktype/filedownload/lib.php
View file @
58edeb60
...
...
@@ -54,20 +54,24 @@ class PluginBlocktypeFiledownload extends PluginBlocktype {
'view'
=>
$instance
->
get
(
'view'
),
);
$result
.
=
'<div title="'
.
hsc
(
$artefact
->
get
(
'title'
))
.
'">'
;
$result
.
=
'<div class="fl"><img src="'
.
call_static_method
(
generate_artefact_class_name
(
$artefact
->
get
(
'artefacttype'
)),
'get_icon'
,
$icondata
)
.
'" alt=""></div>'
;
$result
.
=
'<div style="margin-left: 30px;">'
;
$detailsurl
=
get_config
(
'wwwroot'
)
.
'view/view.php?view='
.
$instance
->
get
(
'view'
)
.
'&artefact='
.
$artefactid
;
if
(
$artefact
instanceof
ArtefactTypeProfileIcon
)
{
require_once
(
'file.php'
);
$url
=
get_config
(
'wwwroot'
)
.
'thumb.php?type=profileiconbyid&id='
.
$artefactid
;
$
download
url
=
get_config
(
'wwwroot'
)
.
'thumb.php?type=profileiconbyid&id='
.
$artefactid
;
$size
=
filesize
(
get_dataroot_image_path
(
'artefact/internal/profileicons/'
,
$artefactid
));
}
else
if
(
$artefact
instanceof
ArtefactTypeFile
)
{
$url
=
get_config
(
'wwwroot'
)
.
'artefact/file/download.php?file='
.
$artefactid
.
'&view='
.
$icondata
[
'view'
];
$
download
url
=
get_config
(
'wwwroot'
)
.
'artefact/file/download.php?file='
.
$artefactid
.
'&view='
.
$icondata
[
'view'
];
$size
=
$artefact
->
get
(
'size'
);
}
$result
.
=
'<h4><a href="'
.
hsc
(
$url
)
.
'">'
.
str_shorten
(
$artefact
->
get
(
'title'
),
20
)
.
'</a></h4>'
;
$result
.
=
'<div title="'
.
hsc
(
$artefact
->
get
(
'title'
))
.
'">'
;
$result
.
=
'<div class="fl"><a href="'
.
hsc
(
$downloadurl
)
.
'">'
;
$result
.
=
'<img src="'
.
call_static_method
(
generate_artefact_class_name
(
$artefact
->
get
(
'artefacttype'
)),
'get_icon'
,
$icondata
)
.
'" alt=""></a></div>'
;
$result
.
=
'<div style="margin-left: 30px;">'
;
$result
.
=
'<h4><a href="'
.
hsc
(
$detailsurl
)
.
'">'
.
str_shorten
(
$artefact
->
get
(
'title'
),
20
)
.
'</a></h4>'
;
$description
=
$artefact
->
get
(
'description'
);
if
(
$description
)
{
...
...
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