Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
problem-builder
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
problem-builder
Commits
6dfba282
Commit
6dfba282
authored
Dec 08, 2013
by
Xavier Antoviaque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add background images to map tables (arrows)
parent
841b56ef
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
1 deletions
+15
-1
mentoring/table.py
+4
-0
static/css/mentoring-table.css
+10
-0
static/img/immunity-map-assumptions-bg.png
+0
-0
static/img/immunity-map-bg.png
+0
-0
templates/html/mentoring-table.html
+1
-1
No files found.
mentoring/table.py
View file @
6dfba282
...
@@ -33,10 +33,14 @@ class MentoringTableBlock(XBlock, XBlockWithChildrenFragmentsMixin):
...
@@ -33,10 +33,14 @@ class MentoringTableBlock(XBlock, XBlockWithChildrenFragmentsMixin):
view_name
=
'mentoring_table_view'
)
view_name
=
'mentoring_table_view'
)
f
,
header_frags
=
self
.
get_children_fragment
(
context
,
view_name
=
'mentoring_table_header_view'
)
f
,
header_frags
=
self
.
get_children_fragment
(
context
,
view_name
=
'mentoring_table_header_view'
)
# TODO: What's the right way to link to images from CSS? This hack won't work in prod
bg_image_url
=
self
.
runtime
.
resources_url
(
'mentoring/img/{}-bg.png'
.
format
(
self
.
type
))
fragment
.
add_content
(
render_template
(
'templates/html/mentoring-table.html'
,
{
fragment
.
add_content
(
render_template
(
'templates/html/mentoring-table.html'
,
{
'self'
:
self
,
'self'
:
self
,
'columns_frags'
:
columns_frags
,
'columns_frags'
:
columns_frags
,
'header_frags'
:
header_frags
,
'header_frags'
:
header_frags
,
'bg_image_url'
:
bg_image_url
,
}))
}))
fragment
.
add_css
(
load_resource
(
'static/css/mentoring-table.css'
))
fragment
.
add_css
(
load_resource
(
'static/css/mentoring-table.css'
))
fragment
.
add_javascript
(
load_resource
(
'static/js/vendor/jquery.shorten.js'
))
fragment
.
add_javascript
(
load_resource
(
'static/js/vendor/jquery.shorten.js'
))
...
...
static/css/mentoring-table.css
View file @
6dfba282
.mentoring-table
{
background-size
:
100%
auto
;
background-repeat
:
no-repeat
;
background-position
:
center
;
}
.mentoring-table
table
{
.mentoring-table
table
{
width
:
100%
;
width
:
100%
;
border
:
1px
solid
;
border
:
1px
solid
;
...
@@ -19,6 +25,10 @@
...
@@ -19,6 +25,10 @@
width
:
20%
;
width
:
20%
;
}
}
.mentoring-table
td
:first-of-type
>
div
{
min-height
:
500px
;
}
.mentoring-table
h3
,
.mentoring-table
h4
{
.mentoring-table
h3
,
.mentoring-table
h4
{
margin
:
0
0
5px
;
margin
:
0
0
5px
;
}
}
static/img/immunity-map-assumptions-bg.png
0 → 100644
View file @
6dfba282
7.09 KB
static/img/immunity-map-bg.png
0 → 100644
View file @
6dfba282
4.84 KB
templates/html/mentoring-table.html
View file @
6dfba282
<div
class=
"mentoring-table {{ self.type }}"
>
<div
class=
"mentoring-table {{ self.type }}"
style=
"background-image: url({{ bg_image_url }})"
>
<table>
<table>
{% if header_frags %}
{% if header_frags %}
<thead>
<thead>
...
...
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