Skip to content

Commit

Permalink
Merge pull request #167 from DFID/bug-fix-missing-details
Browse files Browse the repository at this point in the history
Bug fix missing details
  • Loading branch information
g-shafiullah committed May 18, 2016
2 parents 5044cd7 + 8939140 commit 806fe5a
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 25 deletions.
4 changes: 2 additions & 2 deletions data/countries.json
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@
},
{
"code":"GM",
"name":"Gambia, The",
"name":"The Gambia",
"description":"In 2008 DFID announced that its bilateral aid programme in the Gambia would wind down to final closure in 2011. With the advent of a new Government in the UK, a thorough review was undertaken of all DFID's bilateral aid programmes, with the aim of focusing UK assistance where it can have the greatest possible impact. This review has endorsed the closure of the Gambia programme as announced in 2008.\n\nThe decision to close our programme in the Gambia was agreed with the Government of Gambia in 2008 and our office closed then. We have since been winding down the programme which is due to close in 2011. The decision was taken to wind down the programme gradually as part of a responsible exit to help sustainability of project outputs and ensure partners build on successful DFID programmes.\n\nThe UK will also continue to support the Gambia through the UK's increasing share of World Bank, African Development Bank, European Commission and other multilateral programming.",
"population":1681000,
"lifeExpectancy":58.16002439,
Expand Down Expand Up @@ -2762,7 +2762,7 @@
},
{
"code":"TA",
"name":"Tristan Da Cunha",
"name":"Tristan da Cunha",
"description":"Tristan da Cunha is a group of islands in the South Atlantic Ocean situated 1350 miles to the south of St Helena. Tristan da Cunha is part of the British Overseas Territory of St Helena, Ascension and Tristan da Cunha. It is considered the most remote inhabited archipelago in the world. The territory consists of the main island, Tristan da Cunha, an active volcanic island and home to approximately 275 British Citizens, and several uninhabited islands. Financially self-sustaining, the island’s economy is based on traditional subsistence farming and fishing. UK Government annual bilateral funding is modest and provides international expertise not available on the island such as in the provision of medical care, assistance with education, public works and government reform. In addition the UK is working with the Tristan da Cunha Government in looking at future options for the hospital and a longer term plan for the harbour.\n\n## Further resources\n[DFID Operational Plan for British Overseas Territories](https://www.gov.uk/government/publications/dfid-british-overseas-territories-operational-plan-2013)\n\n[St Helena, Ascension and Tristan da Cunha page on GOV.UK website](https://www.gov.uk/government/world/st-helena-ascension-and-tristan-da-cunha)",
"population":null,
"lifeExpectancy":null,
Expand Down
6 changes: 3 additions & 3 deletions data/dfidCountries.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
},
{
"code" : "TL",
"name" : "Timor-Leste"
"name" : "East Timor"
},
{
"code" : "EC",
Expand All @@ -109,7 +109,7 @@
},
{
"code" : "GM",
"name" : "Gambia, The"
"name" : "The Gambia"
},
{
"code" : "GE",
Expand Down Expand Up @@ -357,7 +357,7 @@
},
{
"code":"TA",
"name":"Tristan Da Cunha"
"name":"Tristan da Cunha"
},
{
"code" : "TG",
Expand Down
1 change: 0 additions & 1 deletion helpers/project_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ def dfid_country_map_data
current_last_day_of_financial_year = last_day_of_financial_year(DateTime.now)

oipaCountryProjectBudgetValuesJSON = RestClient.get settings.oipa_api_url + "activities/aggregations/?format=json&reporting_organisation=GB-GOV-1&budget_period_start=#{current_first_day_of_financial_year}&budget_period_end=#{current_last_day_of_financial_year}&group_by=recipient_country&aggregations=count,budget&order_by=recipient_country"
puts "activities/aggregations/?format=json&reporting_organisation=GB-GOV-1&budget_period_start=#{current_first_day_of_financial_year}&budget_period_end=#{current_last_day_of_financial_year}&group_by=recipient_country&aggregations=count,budget&order_by=recipient_country"
projectBudgetValues = JSON.parse(oipaCountryProjectBudgetValuesJSON)
projectBudgetValues = projectBudgetValues['results']
oipaCountryProjectCountJSON = RestClient.get settings.oipa_api_url + "activities/aggregations/?format=json&hierarchy=1&reporting_organisation=GB-GOV-1&group_by=recipient_country&aggregations=count&reporting_organisation=GB-GOV-1&activity_status=2"
Expand Down
47 changes: 28 additions & 19 deletions views/projects/documents.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,35 @@
</thead>
<tbody>
<% project['document_links'].each do |document| %>
<tr class="result-list-row">
<th scope="row"><a href="<%=document['url']%>"><%= document['title'][0]['narratives'][0]['text'].gsub(/\.[^.]*$/, '') %></a></th>
<% if document['title'][0]['narratives'][0]['language']['code'] != "en" then%>
<td scope="col">
<span class="language">
<%= document['title'][0]['narratives'][0]['language']['name'] %>
</span>
</td>
<% end %>
<td scope="col">
<%= if !document['format'].nil? then iati_mime_type document['format']['code'] else "" end %>
</td>
<td scope="col">
<% document['categories'].each do |category| %>
<span class="category">
<%= category['name']%>
</span>
<%begin%>
<%
t_url = document['url']
t_url_txt = document['title'][0]['narratives'][0]['text'].gsub(/\.[^.]*$/, '')
t_code = document['title'][0]['narratives'][0]['language']['code']
t_title = document['title'][0]['narratives'][0]['language']['name']
%>
<tr class="result-list-row">
<th scope="row"><a href="<%= t_url %>"><%= t_url_txt %></a></th>
<% if t_code != "en" then%>
<td scope="col">
<span class="language">
<%= t_title %>
</span>
</td>
<% end %>
</td>
</tr>
<td scope="col">
<%= if !document['format'].nil? then iati_mime_type document['format']['code'] else "" end %>
</td>
<td scope="col">
<% document['categories'].each do |category| %>
<span class="category">
<%= category['name']%>
</span>
<% end %>
</td>
</tr>
<%rescue%>
<%end%>
<% end %>
</tbody>
</table>
Expand Down

0 comments on commit 806fe5a

Please sign in to comment.