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.
 
 
 
 

83 lignes
2.6 KiB

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