Permalink
Browse files

Merge pull request #8 from sergiocharpineljr/bug_526468

Bug 526468 and Bug 518319: Allow documentation pages in more languages
  • Loading branch information...
2 parents cd3ee9e + 07bb011 commit 5f16017563bbeee2aedd809589d6b118ac02ea58 @bwinton bwinton committed Aug 15, 2012
View

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -69,6 +69,14 @@ def xmlOneDotOne(data):
text = unicode(text)
e.text = text
+ # DocURL
+ for docurl in data.docurl_set.all():
+ doc = ET.SubElement(emailProvider, "documentation")
+ doc.attrib["url"] = docurl.url
+ for desc in docurl.descriptions.all():
+ d = ET.SubElement(doc, "descr")
+ d.attrib["lang"] = desc.language
+ d.text = unicode(desc.description)
retval = StringIO("w")
xml = ET.ElementTree(config)
@@ -89,4 +89,8 @@
#sanity_results {
margin-top: 10px;
-}
+}
+
+.tab_desc {
+ margin-left: 10px;
+}
@@ -31,3 +31,17 @@ input[readonly=readonly] {
#div_report_link {
padding: 10px;
}
+
+table.tab_descs td, table.tab_descs th,
+td.noborder, th.noborder {
+ border-bottom: 0px;
+}
+
+.add_desc {
+ font-size: 12px;
+}
+
+#add_docurl {
+ padding-top: 10px;
+ padding-bottom: 10px;
+}
@@ -1,7 +1,7 @@
.box {
border: 1px solid #CACACA;
border-radius: 10px;
- width: 60%;
+ width: 70%;
overflow: auto;
word-wrap: break-word;
}
@@ -62,3 +62,7 @@
#edit {
float: right;
}
+
+.tab_desc {
+ margin-left: 10px;
+}
@@ -7,7 +7,7 @@
@register.filter
def data_verbose(boundField, attr_name="value"):
"""
- Returns field's data or it's verbose version
+ Returns field's data or its verbose version
for a field with choices defined.
Usage::
@@ -23,6 +23,21 @@ def data_verbose(boundField, attr_name="value"):
return rv
@register.filter
+def data_verbose_field(boundField, attr_name="value"):
+ """
+ Returns field's data or its verbose version
+ for a field with choices defined.
+
+ Usage::
+
+ {{form.some_field|data_verbose_field}}
+ """
+ data = boundField.value()
+ field = boundField.field
+ return hasattr(field, 'choices') and dict(field.choices).get(data,'') or \
+ data
+
+@register.filter
def is_undo_available(self):
delta = timezone.now() - self.deleted_datetime
if delta.days > 0:
Oops, something went wrong.

0 comments on commit 5f16017

Please sign in to comment.