An open source, stand-alone, customisable public spending data web app.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

servicepayments.haml 2.7 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. :javascript
  2. function getPayments(min, objj) {
  3. $('.spinner').show()
  4. $.get("/services/#{@service.slug}/paymentsdetail", { min: min }, function(data) {
  5. $('#payments').html(data);
  6. $('.spinner').hide()
  7. $('.filter a').removeClass('filter_selected');
  8. $(objj).addClass('filter_selected');
  9. $.cookie("payments_filter_min", min, { expires: 60, path: '/' }); /* expires in n days */
  10. });
  11. }
  12. $(function(){
  13. $('#min500').click(function() { getPayments(500, $(this)); return false; });
  14. $('#min1000').click(function() { getPayments(1000, $(this)); return false; });
  15. $('#min2500').click(function() { getPayments(2500, $(this)); return false; });
  16. $('#min5000').click(function() { getPayments(5000, $(this)); return false; });
  17. $('#min10000').click(function() { getPayments(10000, $(this)); return false; });
  18. $('#min20000').click(function() { getPayments(20000, $(this)); return false; });
  19. });
  20. .grid_12
  21. %ul#breadcrumb
  22. %li.home
  23. %a{ :href => '/'} Home
  24. %li
  25. %a{ :href => '/services' } Services
  26. %li
  27. %a{ :href => "/services/#{@service.slug}" }
  28. = @service.name
  29. %li Payments to Suppliers
  30. %h2= @page_title = "#{@service.name}: Payments to Suppliers"
  31. %p
  32. A service in the
  33. %a{ :href => '/directorates/' + @service.directorate.slug }
  34. = @service.directorate.name
  35. Directorate
  36. %p.noprint
  37. %a{ :href => "/services/#{@service.slug}" }
  38. « Suppliers by Spend summary for
  39. = @service.name
  40. %p.noprint.download
  41. %a{ :href => "/services/#{@service.slug}/payments.csv" }
  42. Download data as CSV
  43. .noprint
  44. %p.filter
  45. Show payments over
  46. - for v in @FILTER_VALUES
  47. - @min.to_i == v.to_i ? klass = "filter_selected" : klass = ""
  48. %a{ :href => '#', :id => "min" + v.to_s, :class => klass }
  49. = "£" + commify(v)
  50.   
  51. %img.spinner{ :src => "/spinner.gif" } <!-- Thanks, http://ajaxload.info/ -->
  52. #payments= haml :servicepaymentsdetail, :layout => false
  53. .clear
  54. <div class="grid_9 noprint">
  55. = haml_partial "comment_header"
  56. <div id="disqus_thread" class="noprint"></div>
  57. <script type="text/javascript">
  58. var disqus_developer = 1;
  59. (function() {
  60. var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
  61. dsq.src = 'http://armchairauditor.disqus.com/embed.js';
  62. (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  63. })();
  64. </script>
  65. <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript=armchairauditor">comments powered by Disqus.</a></noscript>
  66. <a href="http://disqus.com" class="dsq-brlink noprint">Comments powered by <span class="logo-disqus">Disqus</span></a>
  67. </div>