An open source, stand-alone, customisable public spending data web app.
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 

104 рядки
2.5 KiB

  1. .grid_12
  2. %ul#breadcrumb
  3. %li.home
  4. %a{ :href => '/'} Home
  5. %li
  6. %a{ :href => '/services' } Services
  7. %li
  8. = @service.name
  9. %h2= @page_title = @service.name
  10. %p
  11. A service in the
  12. %a{ :href => '/directorates/' + @service.directorate.slug }
  13. = @service.directorate.name
  14. Directorate
  15. %p.noprint.download
  16. %a{ :href => "/services/#{@service.slug}.csv" }
  17. Download data as CSV
  18. %p
  19. %h3 Summary
  20. %table
  21. %tr
  22. %th.right Payments
  23. %th.right Total
  24. %th.right Max
  25. %th.right Min
  26. %th.right Average
  27. %tr
  28. %td.right= commify(@count)
  29. %td.right= commify(sprintf("£%0d", @total))
  30. %td.right= commify(sprintf("£%0d", @max))
  31. %td.right= commify(sprintf("£%0d", @min))
  32. %td.right= commify(sprintf("£%0d", @avg))
  33. %p
  34. %h3 Suppliers by Spend
  35. %table
  36. %tr
  37. %th Supplier
  38. %th Total £
  39. %th Total %
  40. - for row in @results
  41. %tr
  42. %td
  43. %a{ :href => "/suppliers/#{row['supplier_slug']}" }
  44. = row['supplier_name']
  45. %td.right= commify(sprintf("%0d", row['total']))
  46. %td.right= sprintf("%0.1f", row['total'] / @total * 100)
  47. %p
  48. %h3 Payments to Suppliers
  49. %table
  50. %tr
  51. %th Date
  52. %th Ref.
  53. %th Supplier
  54. %th.right £
  55. - for payment in @service.payments
  56. %tr
  57. %td= payment.d.strftime("%d %b %Y")
  58. %td.right
  59. %a{ :href => "/payments/#{payment.id}" }
  60. = payment.id
  61. %td
  62. %a{ :href => '/suppliers/' + payment.supplier.slug }
  63. = payment.supplier.name
  64. %td.right= commify(sprintf("%0d", payment.amount))
  65. %tr
  66. %td
  67. %td
  68. %td
  69. %strong TOTAL
  70. %td.right= commify(sprintf("%0d", @total))
  71. .clear
  72. <div class="grid_9 noprint">
  73. = haml_partial "comment_header"
  74. <div id="disqus_thread" class="noprint"></div>
  75. <script type="text/javascript">
  76. var disqus_developer = 1;
  77. (function() {
  78. var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
  79. dsq.src = 'http://armchairauditor.disqus.com/embed.js';
  80. (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  81. })();
  82. </script>
  83. <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript=armchairauditor">comments powered by Disqus.</a></noscript>
  84. <a href="http://disqus.com" class="dsq-brlink noprint">Comments powered by <span class="logo-disqus">Disqus</span></a>
  85. </div>