An open source, stand-alone, customisable public spending data web app.
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

servicepayments.haml 2.7 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. });
  19. .grid_12
  20. %ul#breadcrumb
  21. %li.home
  22. %a{ :href => '/'} Home
  23. %li
  24. %a{ :href => '/services' } Services
  25. %li
  26. %a{ :href => "/services/#{@service.slug}" }
  27. = @service.name
  28. %li Payments to Suppliers
  29. %h2= @page_title = "#{@service.name}: Payments to Suppliers"
  30. %p
  31. A service in the
  32. %a{ :href => '/directorates/' + @service.directorate.slug }
  33. = @service.directorate.name
  34. Directorate
  35. %p.noprint
  36. %a{ :href => "/services/#{@service.slug}" }
  37. « Suppliers by Spend summary for
  38. = @service.name
  39. %p.noprint.download
  40. %a{ :href => "/services/#{@service.slug}/payments.csv" }
  41. Download data as CSV
  42. .noprint
  43. %p.filter
  44. Show payments over
  45. - for v in @FILTER_VALUES
  46. - @min.to_i == v.to_i ? klass = "filter_selected" : klass = ""
  47. %a{ :href => '#', :id => "min" + v.to_s, :class => klass }
  48. = "£" + commify(v)
  49.   
  50. %img.spinner{ :src => "/spinner.gif" } <!-- Thanks, http://ajaxload.info/ -->
  51. #payments= haml :servicepaymentsdetail, :layout => false
  52. .clear
  53. -#
  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>