Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx
edx-platform
Commits
4a734bf1
Commit
4a734bf1
authored
Feb 29, 2012
by
Reda Lemeden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed wiki history table and header alignment issues
parent
919cf9b1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
94 additions
and
48 deletions
+94
-48
sass/application.scss
+1
-1
sass/wiki/_table.scss
+48
-0
sass/wiki/_wiki.scss
+3
-6
simplewiki_history.html
+42
-41
No files found.
sass/application.scss
View file @
4a734bf1
...
...
@@ -11,7 +11,7 @@
@import
"textbook"
;
@import
"info"
;
@import
"profile"
;
@import
"wiki/basic-html"
,
"wiki/sidebar"
,
"wiki/create"
,
"wiki/wiki"
;
@import
"wiki/basic-html"
,
"wiki/sidebar"
,
"wiki/create"
,
"wiki/wiki"
,
"wiki/table"
;
@import
"help"
;
@import
"discussion/askbot-original"
,
"discussion/discussion"
,
"discussion/sidebar"
,
"discussion/questions"
,
"discussion/tags"
,
"discussion/question-view"
,
"discussion/answers"
,
"discussion/forms"
,
"discussion/form-wmd-toolbar"
,
"discussion/modals"
,
"discussion/profile"
;
sass/wiki/_table.scss
0 → 100644
View file @
4a734bf1
table
.wiki-history
{
thead
{
background
:
#ddd
;
// border-bottom: 1px solid #ddd;
tr
{
height
:
40px
;
th
{
padding-top
:
10px
;
padding-left
:
15px
;
&
#revision
{
width
:
5%
;
}
&
#comment
{
width
:
15%
;
}
&
#diff
{
width
:
60%
;
}
&
#modified
{
width
:
20%
;
}
}
}
}
tbody
{
tr
td
{
padding
:
8px
15px
;
}
}
tr
.dark
{
background-color
:
#efefef
;
}
}
div
.history-controls
{
margin-top
:
20px
;
input
[
type
=
"submit"
]
{
@extend
.light-button
;
}
}
sass/wiki/_wiki.scss
View file @
4a734bf1
...
...
@@ -7,6 +7,8 @@ div.wiki-wrapper {
header
{
@extend
.topbar
;
height
:
46px
;
@include
box-shadow
(
inset
0
1px
0
white
);
&
:empty
{
display
:
none
!
important
;
...
...
@@ -43,7 +45,7 @@ div.wiki-wrapper {
font-size
:
12px
;
text-transform
:
uppercase
;
letter-spacing
:
1px
;
padding
:
14px
;
padding
:
14
.9
px
;
padding-left
:
38px
;
margin
:
0
;
...
...
@@ -93,10 +95,5 @@ div.wiki-wrapper {
}
}
#wiki_history_table
{
tr
.dark
{
background-color
:
$light-gray
;
}
}
}
}
simplewiki_history.html
View file @
4a734bf1
...
...
@@ -17,7 +17,7 @@ ${ wiki_article.title }
<div
style=
"display:none"
>
<input
type=
"hidden"
name=
"csrfmiddlewaretoken"
value=
"${csrf_token}"
/>
</div>
<table
id=
"wiki_history_table"
>
<table
id=
"wiki_history_table"
class=
"wiki-history"
>
<thead>
<tr>
<th
id=
"revision"
>
Revision
</th>
...
...
@@ -27,34 +27,34 @@ ${ wiki_article.title }
</tr>
</thead>
<tbody>
<
%
loopCount =
0
%
>
%for revision in wiki_history:
%if revision.deleted
<
2
or
show_delete_revision:
<%
loopCount
+=
1
%
>
<tr
style=
"border-top: 1px"
class=
"${'dark ' if (loopCount % 2) == 0 else ''}${'deleted ' if (revision.deleted==2) else ''}"
>
<td
width=
"15px"
>
<input
type=
"radio"
name=
"revision"
id=
"${revision.id}"
value=
"${revision.id}"
${"
checked
"
if
wiki_article
.
current_revision
.
id =
=
revision
.
id
else
""}
/>
<label
for=
"${revision.id}"
>
${ revision }
%if revision.previous_revision:
%if not revision.counter == revision.previous_revision.counter + 1:
<br/>
(based on ${revision.previous_revision})
%endif
%endif
</label>
</td>
<td>
${ revision.revision_text if revision.revision_text else "
<i>
None
</i>
" }
</td>
<td
class=
"diff"
>
%for x in revision.get_diff():
${x|h}
<br/>
%endfor
</td>
<td>
${revision.get_user()}
<br/>
${revision.revision_date.strftime("%b %d, %Y, %I:%M %p")}
</td>
</tr>
%endif
<
%
loopCount =
0
%
>
%for revision in wiki_history:
%if revision.deleted
<
2
or
show_delete_revision:
<%
loopCount
+=
1
%
>
<tr
style=
"border-top: 1px"
class=
"${'dark ' if (loopCount % 2) == 0 else ''}${'deleted ' if (revision.deleted==2) else ''}"
>
<td
width=
"15px"
>
<input
type=
"radio"
name=
"revision"
id=
"${revision.id}"
value=
"${revision.id}"
${"
checked
"
if
wiki_article
.
current_revision
.
id =
=
revision
.
id
else
""}
/>
<label
for=
"${revision.id}"
>
${ revision }
%if revision.previous_revision:
%if not revision.counter == revision.previous_revision.counter + 1:
<br/>
(based on ${revision.previous_revision})
%endif
%endif
</label>
</td>
<td>
${ revision.revision_text if revision.revision_text else "
<i>
None
</i>
" }
</td>
<td
class=
"diff"
>
%for x in revision.get_diff():
${x|h}
<br/>
%endfor
</td>
<td>
${revision.get_user()}
<br/>
${revision.revision_date.strftime("%b %d, %Y, %I:%M %p")}
</td>
</tr>
%endif
%endfor
</tbody>
%if wiki_prev_page or wiki_next_page:
...
...
@@ -72,17 +72,18 @@ ${ wiki_article.title }
</tfoot>
%endif
</table>
<input
type=
"submit"
name=
"view"
value=
"View revision"
/>
<input
type=
"submit"
name=
"change"
value=
"Change to revision"
%
if
not
wiki_write:
disabled=
"true"
%
endif
/>
%if show_delete_revision:
<input
type=
"submit"
name=
"delete"
value=
"Admin Delete revision"
/>
<input
type=
"submit"
name=
"restore"
value=
"Admin Restore revision"
/>
<input
type=
"submit"
name=
"delete_all"
value=
"Admin Delete all revisions"
>
<input
type=
"submit"
name=
"lock_article"
value=
"${'Lock Article' if not wiki_article.locked else 'Unlock Article'}"
>
%endif
<div
class=
"history-controls"
><input
type=
"submit"
name=
"view"
value=
"View revision"
/>
<input
type=
"submit"
name=
"change"
value=
"Change to revision"
%
if
not
wiki_write:
disabled=
"true"
%
endif
/>
%if show_delete_revision:
<input
type=
"submit"
name=
"delete"
value=
"Delete revision"
/>
<input
type=
"submit"
name=
"restore"
value=
"Restore revision"
/>
<input
type=
"submit"
name=
"delete_all"
value=
"Delete all revisions"
>
<input
type=
"submit"
name=
"lock_article"
value=
"${'Lock Article' if not wiki_article.locked else 'Unlock Article'}"
>
%endif
</div>
</form>
</
%
block>
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