Sfoglia il codice sorgente

Added disqus_shortname to settings and moved all Disqus code to the _disquus_comments partial

pull/3/head
Adrian Short 14 anni fa
parent
commit
8d5cdaba23
7 ha cambiato i file con 31 aggiunte e 64 eliminazioni
  1. +1
    -0
      lib/models.rb
  2. +0
    -7
      views/_comment_header.haml
  3. +18
    -0
      views/_disqus_comments.haml
  4. +3
    -14
      views/payment.haml
  5. +3
    -15
      views/service.haml
  6. +3
    -14
      views/servicepayments.haml
  7. +3
    -14
      views/supplier.haml

+ 1
- 0
lib/models.rb Vedi File

@@ -122,6 +122,7 @@ class Setting
property :org_name, String, :length => 255
property :org_url, String, :length => 255
property :data_url, String, :length => 255
property :disqus_shortname, String, :length => 255
end

DataMapper.setup(:default, ENV['DATABASE_URL'] || "sqlite3://#{Dir.pwd}/db.sqlite3")


+ 0
- 7
views/_comment_header.haml Vedi File

@@ -1,7 +0,0 @@
.noprint
%h3 Comments
%p.highlight
This is an independent website.
%a{ :href => "#{SETTING.org_url}" }<
= SETTING.org_name
might not see your comments here or reply to them.

+ 18
- 0
views/_disqus_comments.haml Vedi File

@@ -0,0 +1,18 @@
%h3 Comments
%p.highlight
This is an independent website.
%a{ :href => "#{SETTING.org_url}" }<
= SETTING.org_name
might not see your comments here or reply to them.
<div id="disqus_thread" class="noprint"></div>
<script type="text/javascript">
var disqus_developer = 1;
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = "http://#{SETTING.disqus_shortname}.disqus.com/embed.js";
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript=#{SETTING.disqus_shortname}">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink noprint">Comments powered by <span class="logo-disqus">Disqus</span></a>

+ 3
- 14
views/payment.haml Vedi File

@@ -24,17 +24,6 @@
%td Amount &pound;
%td= commify(sprintf("%0.2f", @payment.amount))
.clear
<div class="grid_9 noprint">
= haml_partial "comment_header"
<div id="disqus_thread" class="noprint"></div>
<script type="text/javascript">
var disqus_developer = 1;
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://armchairauditor.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript=armchairauditor">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink noprint">Comments powered by <span class="logo-disqus">Disqus</span></a>
</div>

.grid_9.noprint
= haml_partial "disqus_comments"

+ 3
- 15
views/service.haml Vedi File

@@ -67,18 +67,6 @@
%td.right= sprintf("%0.1f", row['total'] / @total * 100)
.clear
<div class="grid_9 noprint">
= haml_partial "comment_header"
<div id="disqus_thread" class="noprint"></div>
<script type="text/javascript">
var disqus_developer = 1;
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://armchairauditor.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript=armchairauditor">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink noprint">Comments powered by <span class="logo-disqus">Disqus</span></a>
</div>

.grid_9.noprint
= haml_partial "disqus_comments"

+ 3
- 14
views/servicepayments.haml Vedi File

@@ -64,17 +64,6 @@
.clear

<div class="grid_9 noprint">
= haml_partial "comment_header"
<div id="disqus_thread" class="noprint"></div>
<script type="text/javascript">
var disqus_developer = 1;
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://armchairauditor.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript=armchairauditor">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink noprint">Comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
.grid_9.noprint
= haml_partial "disqus_comments"

+ 3
- 14
views/supplier.haml Vedi File

@@ -72,17 +72,6 @@
%td.right= commify(sprintf("%0d", @total))
.clear
<div class="grid_9 noprint">
= haml_partial "comment_header"
<div id="disqus_thread" class="noprint"></div>
<script type="text/javascript">
var disqus_developer = 1;
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://armchairauditor.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript=armchairauditor">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink noprint">Comments powered by <span class="logo-disqus">Disqus</span></a>
</div>

.grid_9.noprint
= haml_partial "disqus_comments"

Caricamento…
Annulla
Salva