소스 검색

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

pull/3/head
Adrian Short 14 년 전
부모
커밋
8d5cdaba23
7개의 변경된 파일31개의 추가작업 그리고 64개의 파일을 삭제
  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 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

@@ -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 파일 보기

@@ -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"

불러오는 중...
취소
저장