Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubicweb
Commits
36b11249014e
Commit
fb87323b
authored
Aug 20, 2009
by
Aurelien Campeas
Browse files
[pdf] (ugly) pdf icon, component
--HG-- branch : 3.5
parent
f35b64718d02
Changes
3
Hide whitespace changes
Inline
Side-by-side
web/data/cubicweb.css
View file @
36b11249
...
...
@@ -838,4 +838,13 @@ input.validateButton {
border
:
1px
solid
#edecd2
;
border-color
:
#edecd2
#cfceb7
#cfceb7
#edecd2
;
background
:
#fffff8
url("button.png")
bottom
left
repeat-x
;
}
\ No newline at end of file
}
/********************************/
/* placement of alt. view icons */
/********************************/
.otherView
{
float
:
right
;
}
web/data/pdf_icon.gif
0 → 100644
View file @
36b11249
230 Bytes
web/views/basecomponents.py
View file @
36b11249
...
...
@@ -2,6 +2,7 @@
* the rql input form
* the logged user link
* pdf view link
:organization: Logilab
:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
...
...
@@ -214,6 +215,23 @@ class EtypeRestrictionComponent(component.Component):
self
.
w
(
u
' | '
.
join
(
html
))
self
.
w
(
u
'</div>'
)
class
PdfViewComponent
(
component
.
Component
):
id
=
'pdfview'
__select__
=
yes
()
context
=
'header'
property_defs
=
{
_
(
'visible'
):
dict
(
type
=
'Boolean'
,
default
=
True
,
help
=
_
(
'display the pdf icon or not'
)),
}
def
call
(
self
,
vid
):
self
.
req
.
add_css
(
'cubes.confman.css'
)
entity
=
self
.
entity
(
0
,
0
)
self
.
w
(
u
'<a href="%s" class="otherView"><img src="data/pdf_icon.gif"/></a>'
%
(
xml_escape
(
entity
.
absolute_url
()
+
'?vid=%s&__template=pdf-main-template'
%
vid
)))
def
registration_callback
(
vreg
):
vreg
.
register_all
(
globals
().
values
(),
__name__
,
(
SeeAlsoVComponent
,))
...
...
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