Skip to content

Commit

Permalink
Minor fixes around sourcing.
Browse files Browse the repository at this point in the history
  • Loading branch information
pudo committed Mar 30, 2015
1 parent c25dd49 commit 38ecbf5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
6 changes: 3 additions & 3 deletions connectedafrica/default_settings.py
Expand Up @@ -28,7 +28,7 @@
DOCCLOUD_PROJECTID = int(os.environ.get('DOCCLOUD_PROJECTID', '130'))

SOURCE_NAMES = {
'za-new-import.popit.mysociety.org': "People's Assembly Data",
'www.windeedsearch.co.za': "Windeed CIPC Search",
'www.jse.co.za': "Johannesburg Stock Exchange"
'za-new-import.popit.mysociety.org': "People's Assembly",
'www.windeedsearch.co.za': "Windeed CIPC",
'www.jse.co.za': "JSE"
}
14 changes: 9 additions & 5 deletions connectedafrica/templates/profile.html
Expand Up @@ -31,9 +31,12 @@ <h1>
<td class="property-value">
{{property.value}}
{% if property.source_url %}
<a href="{{ property.source_url }}" class="source-ref"
<!--a href="{{ property.source_url }}" class="source-ref"
title="Source: {{ property.source_url | source_readable }}"
data-toggle="tooltip" data-placement="right"><i class="fa fa-external-link-square"></i></a>
data-toggle="tooltip" data-placement="right"><i class="fa fa-external-link-square"></i></a-->
<span class="source-ref"
title="Source: {{ property.source_url | source_readable }}"
data-toggle="tooltip" data-placement="right"><i class="fa fa-external-link-square"></i></span>
{% endif %}
</td>
</tr>
Expand Down Expand Up @@ -79,7 +82,7 @@ <h3 class="section-title">{{ section.schema.meta.section_label or section.schema
<th>{{v}}</th>
{% endfor %}
<th>Dates</th>
<th></th>
<th>Source</th>
</tr>
{% for relation in section.relations %}
<tr>
Expand All @@ -94,9 +97,10 @@ <h3 class="section-title">{{ section.schema.meta.section_label or section.schema
</td>
<td width="1%">
{% if relation | relation_source %}
<a href="{{ relation | relation_source }}" class="source-ref"
{{ relation | relation_source | source_readable }}
<!--a href="{{ relation | relation_source }}" class="source-ref"
title="Source: {{ relation | relation_source | source_readable }}"
data-toggle="tooltip" data-placement="left"><i class="fa fa-external-link-square"></i></a>
data-toggle="tooltip" data-placement="left"><i class="fa fa-external-link-square"></i></a-->
{% endif %}
</td>
</tr>
Expand Down
4 changes: 3 additions & 1 deletion connectedafrica/util/properties.py
Expand Up @@ -42,7 +42,9 @@ def __init__(self, obj):
@property
def properties(self):
for name, data in self.obj.properties.items():
yield Property(data, self.attributes.get(name))
attr = self.attributes.get(name)
if attr is not None:
yield Property(data, attr)

def __getattr__(self, name):
return self.get(name)
Expand Down

0 comments on commit 38ecbf5

Please sign in to comment.