|
@@ -5,6 +5,111 @@ from tracim.model.data import VirtualEvent
|
5
|
5
|
from tracim.model.data import ContentType
|
6
|
6
|
from tracim.model import data
|
7
|
7
|
|
|
8
|
+# FIXME: fix temporaire ...
|
|
9
|
+style = """
|
|
10
|
+.title {
|
|
11
|
+ background:#F5F5F5;
|
|
12
|
+ padding-right:15px;
|
|
13
|
+ padding-left:15px;
|
|
14
|
+ padding-top:10px;
|
|
15
|
+ border-bottom:1px solid #CCCCCC;
|
|
16
|
+ overflow:auto;
|
|
17
|
+} .title h1 { margin-top:0; }
|
|
18
|
+
|
|
19
|
+.content {
|
|
20
|
+ padding: 15px;
|
|
21
|
+}
|
|
22
|
+
|
|
23
|
+#left{ padding:0; }
|
|
24
|
+
|
|
25
|
+#right {
|
|
26
|
+ background:#F5F5F5;
|
|
27
|
+ border-left:1px solid #CCCCCC;
|
|
28
|
+ border-bottom: 1px solid #CCCCCC;
|
|
29
|
+ padding-top:15px;
|
|
30
|
+}
|
|
31
|
+@media (max-width: 1200px) {
|
|
32
|
+ #right {
|
|
33
|
+ border-top:1px solid #CCCCCC;
|
|
34
|
+ border-left: none;
|
|
35
|
+ border-bottom: none;
|
|
36
|
+ }
|
|
37
|
+}
|
|
38
|
+
|
|
39
|
+body { overflow:auto; }
|
|
40
|
+
|
|
41
|
+.btn {
|
|
42
|
+ text-align: left;
|
|
43
|
+}
|
|
44
|
+
|
|
45
|
+.table tbody tr .my-align {
|
|
46
|
+ vertical-align:middle;
|
|
47
|
+}
|
|
48
|
+
|
|
49
|
+.title-icon {
|
|
50
|
+ font-size:2.5em;
|
|
51
|
+ float:left;
|
|
52
|
+ margin-right:10px;
|
|
53
|
+}
|
|
54
|
+.title.page, .title-icon.page { color:#00CC00; }
|
|
55
|
+.title.thread, .title-icon.thread { color:#428BCA; }
|
|
56
|
+
|
|
57
|
+/* ****************************** */
|
|
58
|
+.description-icon {
|
|
59
|
+ color:#999;
|
|
60
|
+ font-size:3em;
|
|
61
|
+}
|
|
62
|
+
|
|
63
|
+.description {
|
|
64
|
+ border-left: 5px solid #999;
|
|
65
|
+ padding-left: 10px;
|
|
66
|
+ margin-left: 10px;
|
|
67
|
+ margin-bottom:10px;
|
|
68
|
+}
|
|
69
|
+
|
|
70
|
+.description-text {
|
|
71
|
+ display:block;
|
|
72
|
+ overflow:hidden;
|
|
73
|
+ color:#999;
|
|
74
|
+}
|
|
75
|
+
|
|
76
|
+.comment-row:nth-child(2n) {
|
|
77
|
+ background-color:#F5F5F5;
|
|
78
|
+}
|
|
79
|
+
|
|
80
|
+.comment-row:nth-child(2n+1) {
|
|
81
|
+ background-color:#FFF;
|
|
82
|
+}
|
|
83
|
+
|
|
84
|
+.comment-icon {
|
|
85
|
+ color:#CCC;
|
|
86
|
+ font-size:3em;
|
|
87
|
+ display:inline-block;
|
|
88
|
+ margin-right: 10px;
|
|
89
|
+ float:left;
|
|
90
|
+}
|
|
91
|
+
|
|
92
|
+.comment-content {
|
|
93
|
+ display:block;
|
|
94
|
+ overflow:hidden;
|
|
95
|
+}
|
|
96
|
+
|
|
97
|
+.comment, .comment-revision {
|
|
98
|
+ padding:10px;
|
|
99
|
+ border-top: 1px solid #999;
|
|
100
|
+}
|
|
101
|
+
|
|
102
|
+.comment-revision-icon {
|
|
103
|
+ color:#777;
|
|
104
|
+ margin-right: 10px;
|
|
105
|
+}
|
|
106
|
+
|
|
107
|
+.title-text {
|
|
108
|
+ display: inline-block;
|
|
109
|
+}
|
|
110
|
+"""
|
|
111
|
+
|
|
112
|
+
|
8
|
113
|
def create_readable_date(created, delta_from_datetime: datetime = None):
|
9
|
114
|
if not delta_from_datetime:
|
10
|
115
|
delta_from_datetime = datetime.now()
|
|
@@ -29,10 +134,6 @@ def create_readable_date(created, delta_from_datetime: datetime = None):
|
29
|
134
|
return aff
|
30
|
135
|
|
31
|
136
|
def designPage(content: data.Content, content_revision: data.ContentRevisionRO) -> str:
|
32
|
|
- f = open('tracim/lib/webdav/style.css', 'r')
|
33
|
|
- style = f.read()
|
34
|
|
- f.close()
|
35
|
|
-
|
36
|
137
|
hist = content.get_history()
|
37
|
138
|
histHTML = '<table class="table table-striped table-hover">'
|
38
|
139
|
for event in hist:
|
|
@@ -134,10 +235,6 @@ def designPage(content: data.Content, content_revision: data.ContentRevisionRO)
|
134
|
235
|
return file
|
135
|
236
|
|
136
|
237
|
def designThread(content: data.Content, content_revision: data.ContentRevisionRO, comments) -> str:
|
137
|
|
- f = open('tracim/lib/webdav/style.css', 'r')
|
138
|
|
- style = f.read()
|
139
|
|
- f.close()
|
140
|
|
-
|
141
|
238
|
hist = content.get_history()
|
142
|
239
|
|
143
|
240
|
allT = []
|