muck-comments 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. data/Rakefile +1 -0
  2. data/VERSION +1 -1
  3. data/app/helpers/muck_comments_helper.rb +13 -0
  4. data/app/views/external/_disqus.html.erb +21 -0
  5. data/lib/muck_comments.rb +1 -3
  6. data/locales/ar.yml +1 -0
  7. data/locales/bg.yml +1 -0
  8. data/locales/ca.yml +2 -1
  9. data/locales/cs.yml +1 -0
  10. data/locales/da.yml +1 -0
  11. data/locales/de.yml +1 -0
  12. data/locales/el.yml +1 -0
  13. data/locales/en.yml +1 -0
  14. data/locales/es.yml +1 -0
  15. data/locales/et.yml +1 -0
  16. data/locales/fa.yml +1 -0
  17. data/locales/fi.yml +1 -0
  18. data/locales/fr.yml +1 -0
  19. data/locales/gl.yml +4 -3
  20. data/locales/hi.yml +1 -0
  21. data/locales/hr.yml +1 -0
  22. data/locales/hu.yml +3 -2
  23. data/locales/id.yml +1 -0
  24. data/locales/it.yml +1 -0
  25. data/locales/iw.yml +1 -0
  26. data/locales/ja.yml +1 -0
  27. data/locales/ko.yml +1 -0
  28. data/locales/lt.yml +1 -0
  29. data/locales/lv.yml +1 -0
  30. data/locales/mt.yml +2 -1
  31. data/locales/nl.yml +1 -0
  32. data/locales/no.yml +1 -0
  33. data/locales/pl.yml +1 -0
  34. data/locales/pt-PT.yml +1 -0
  35. data/locales/ro.yml +1 -0
  36. data/locales/ru.yml +1 -0
  37. data/locales/sk.yml +1 -0
  38. data/locales/sl.yml +1 -0
  39. data/locales/sq.yml +1 -0
  40. data/locales/sr.yml +1 -0
  41. data/locales/sv.yml +1 -0
  42. data/locales/th.yml +1 -0
  43. data/locales/tl.yml +1 -0
  44. data/locales/tr.yml +1 -0
  45. data/locales/uk.yml +1 -0
  46. data/locales/vi.yml +1 -0
  47. data/locales/zh-CN.yml +1 -0
  48. data/locales/zh-TW.yml +1 -0
  49. data/locales/zh.yml +1 -0
  50. data/muck-comments.gemspec +28 -2
  51. data/test/rails_root/Rakefile +9 -1
  52. data/test/rails_root/db/migrate/20090327231918_create_users.rb +40 -0
  53. data/test/rails_root/db/migrate/20090818204527_add_activity_indexes.rb +9 -0
  54. data/test/rails_root/db/migrate/20090819030523_add_attachable_to_activities.rb +13 -0
  55. data/test/rails_root/public/images/arrow_down.gif +0 -0
  56. data/test/rails_root/public/images/arrow_up.gif +0 -0
  57. data/test/rails_root/public/images/icons/blue_guy.png +0 -0
  58. data/test/rails_root/public/images/icons/button_background.png +0 -0
  59. data/test/rails_root/public/images/icons/cancel.png +0 -0
  60. data/test/rails_root/public/images/icons/close.png +0 -0
  61. data/test/rails_root/public/images/icons/comment.png +0 -0
  62. data/test/rails_root/public/images/icons/exclaim.png +0 -0
  63. data/test/rails_root/public/images/icons/grey_guy.png +0 -0
  64. data/test/rails_root/public/images/icons/hide.png +0 -0
  65. data/test/rails_root/public/images/icons/information.png +0 -0
  66. data/test/rails_root/public/images/icons/minus.png +0 -0
  67. data/test/rails_root/public/images/icons/question.png +0 -0
  68. data/test/rails_root/public/images/icons/search_box.png +0 -0
  69. data/test/rails_root/public/images/icons/star.png +0 -0
  70. data/test/rails_root/public/images/icons/stop.png +0 -0
  71. data/test/rails_root/public/images/icons/thumb_down.png +0 -0
  72. data/test/rails_root/public/images/icons/thumb_up.png +0 -0
  73. data/test/rails_root/public/javascripts/muck.js +4 -3
  74. data/test/rails_root/public/javascripts/muck_activities.js +4 -5
  75. data/test/rails_root/public/javascripts/muck_time/en.js +53 -0
  76. data/test/rails_root/public/stylesheets/styles.css +2 -5
  77. metadata +28 -2
data/Rakefile CHANGED
@@ -60,6 +60,7 @@ begin
60
60
  Jeweler::RubyforgeTasks.new do |rubyforge|
61
61
  rubyforge.doc_task = "rdoc"
62
62
  end
63
+ Jeweler::GemcutterTasks.new
63
64
  rescue LoadError
64
65
  puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
65
66
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.11
1
+ 0.1.12
@@ -33,4 +33,17 @@ module MuckCommentsHelper
33
33
  :delete_path => comment_path(comment, :format => 'js') }
34
34
  end
35
35
 
36
+ # outputs a partial that will embed disqus into any page with a unique url
37
+ #
38
+ # Extra instructions from the disqus site:
39
+ # Append #disqus_thread to the end of permalinks. The comment count code will replace the text of these links with the comment count.
40
+ # For example, you may have a link with this HTML:
41
+ # <a href="http://example.com/my_article.html#disqus_thread">Comments</a>
42
+ # The comment count code will replace the text "Comments" with the number of comments on the page http://example.com/my_article.html
43
+ #
44
+ # disqus_short_name: The short name you selected when setting up your site.
45
+ def disqus(disqus_short_name)
46
+ render :partial => 'external/disqus', :locals => { :disqus_short_name => disqus_short_name }
47
+ end
48
+
36
49
  end
@@ -0,0 +1,21 @@
1
+ <div id="disqus_thread"></div>
2
+ <script type="text/javascript" src="http://disqus.com/forums/<%= disqus_short_name %>/embed.js"></script>
3
+ <noscript><a href="http://<%= disqus_short_name %>.disqus.com/?url=ref"><%= t('muck.comments.view_thread') %></a></noscript>
4
+ <a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
5
+
6
+ <% content_for :javascript do -%>
7
+ <script type="text/javascript">
8
+ //<![CDATA[
9
+ (function() {
10
+ var links = document.getElementsByTagName('a');
11
+ var query = '?';
12
+ for(var i = 0; i < links.length; i++) {
13
+ if(links[i].href.indexOf('#disqus_thread') >= 0) {
14
+ query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
15
+ }
16
+ }
17
+ document.write('<script charset="utf-8" type="text/javascript" src="http://disqus.com/forums/<%= disqus_short_name %>/get_num_replies.js' + query + '"></' + 'script>');
18
+ })();
19
+ //]]>
20
+ </script>
21
+ <% end -%>
data/lib/muck_comments.rb CHANGED
@@ -2,6 +2,4 @@ require 'acts_as_commentable_with_threading'
2
2
 
3
3
  ActiveRecord::Base.class_eval { include ActiveRecord::Acts::MuckComment }
4
4
  ActionController::Base.send :helper, MuckCommentsHelper
5
- I18n.load_path += Dir[ File.join(File.dirname(__FILE__), '..', 'locales', '*.{rb,yml}') ]
6
-
7
- Mime::Type.register "text/javascript", :pjs
5
+ I18n.load_path += Dir[ File.join(File.dirname(__FILE__), '..', 'locales', '*.{rb,yml}') ]
data/locales/ar.yml CHANGED
@@ -16,3 +16,4 @@ ar:
16
16
  new_comment_no_title: "إضافة تعليق جديد"
17
17
  new_comment_with_title: "إضافة تعليق جديد ل{{title}}"
18
18
  problem_adding_comment: "كانت هناك مشكلة مضيفا تعليقك"
19
+ view_thread: "عرض ومناقشة الموضوع."
data/locales/bg.yml CHANGED
@@ -16,3 +16,4 @@ bg:
16
16
  new_comment_no_title: "Добавяне на нов коментар"
17
17
  new_comment_with_title: "Добавяне на нов коментар към {{title}}"
18
18
  problem_adding_comment: "Имаше проблем при добавяне на коментар"
19
+ view_thread: "Преглед на дискусия конец."
data/locales/ca.yml CHANGED
@@ -7,7 +7,7 @@ ca:
7
7
  add_comment: Comentari
8
8
  add_comment_button: "Afegir comentari"
9
9
  anonymous: Anònim
10
- cant_delete_comment: "No esteu autoritzat a eliminar aquest comentari"
10
+ cant_delete_comment: "Vostè no permís per eliminar aquest comentari"
11
11
  comment_removed: "Comentari eliminat amb èxit."
12
12
  create_error: "No s&#39;ha pogut crear l&#39;{{errors}} comentari"
13
13
  create_success: "Ha afegit un comentari"
@@ -16,3 +16,4 @@ ca:
16
16
  new_comment_no_title: "Afegeix un comentari nou"
17
17
  new_comment_with_title: "Afegir un nou comentari a l&#39;{{title}}"
18
18
  problem_adding_comment: "Hi va haver un problema en afegir el seu comentari"
19
+ view_thread: "Veure el fil de discussió."
data/locales/cs.yml CHANGED
@@ -16,3 +16,4 @@ cs:
16
16
  new_comment_no_title: "Přidat nový komentář"
17
17
  new_comment_with_title: "Přidat nový komentář {{title}}"
18
18
  problem_adding_comment: "Tam byl problém přidat svůj komentář"
19
+ view_thread: "Zobrazit diskusi vlákno."
data/locales/da.yml CHANGED
@@ -16,3 +16,4 @@ da:
16
16
  new_comment_no_title: "Tilføj en ny kommentar"
17
17
  new_comment_with_title: "Tilføj en ny kommentar til {{title}}"
18
18
  problem_adding_comment: "Der var et problem at tilføje din kommentar"
19
+ view_thread: "Vis diskussionen tråd."
data/locales/de.yml CHANGED
@@ -16,3 +16,4 @@ de:
16
16
  new_comment_no_title: "Fügen Sie einen neuen Beitrag"
17
17
  new_comment_with_title: "Fügen Sie einen neuen Kommentar zu {{title}}"
18
18
  problem_adding_comment: "Es gab ein Problem du deine Kommentar"
19
+ view_thread: "View the discussion thread."
data/locales/el.yml CHANGED
@@ -16,3 +16,4 @@ el:
16
16
  new_comment_no_title: "Προσθέστε ένα νέο σχόλιο"
17
17
  new_comment_with_title: "Προσθέστε ένα νέο σχόλιο για την {{title}}"
18
18
  problem_adding_comment: "Υπήρξε ένα πρόβλημα προσθέτοντας το σχόλιό σας"
19
+ view_thread: "Δείτε το νήμα συζήτηση."
data/locales/en.yml CHANGED
@@ -13,5 +13,6 @@ en:
13
13
  problem_adding_comment: "There was a problem adding your comment"
14
14
  new_comment_email_subject: "New comment from {{name}} on {{application_name}}"
15
15
  anonymous: anonymous
16
+ view_thread: "View the discussion thread."
16
17
  activity_templates:
17
18
  comment: Comments
data/locales/es.yml CHANGED
@@ -16,3 +16,4 @@ es:
16
16
  new_comment_no_title: "Añade un comentario nuevo"
17
17
  new_comment_with_title: "Añadir un nuevo comentario al {{title}}"
18
18
  problem_adding_comment: "Hubo un problema al añadir su comentario"
19
+ view_thread: "Ver el hilo de discusión."
data/locales/et.yml CHANGED
@@ -16,3 +16,4 @@ et:
16
16
  new_comment_no_title: "Lisa uus kommentaar"
17
17
  new_comment_with_title: "Lisa uus kommentaar {{title}}"
18
18
  problem_adding_comment: "Probleem, lisades oma kommentaar"
19
+ view_thread: "Vaata arutelu teema."
data/locales/fa.yml CHANGED
@@ -16,3 +16,4 @@ fa:
16
16
  new_comment_no_title: "اضافه کردن نظر جدید"
17
17
  new_comment_with_title: "اضافه کردن نظر جدید به {{title}}"
18
18
  problem_adding_comment: "بود مشکل اضافه کردن نظر شما وجود دارد."
19
+ view_thread: "نمایش موضوع بحث."
data/locales/fi.yml CHANGED
@@ -16,3 +16,4 @@ fi:
16
16
  new_comment_no_title: "Lisää uusi kommentti"
17
17
  new_comment_with_title: "Lisää uusi kommentti {{title}}"
18
18
  problem_adding_comment: "Oli ongelma lisäämällä kommenttisi"
19
+ view_thread: "Näytä keskustelu säiettä."
data/locales/fr.yml CHANGED
@@ -16,3 +16,4 @@ fr:
16
16
  new_comment_no_title: "Ajouter un commentaire"
17
17
  new_comment_with_title: "Ajouter un nouveau commentaire à {{title}}"
18
18
  problem_adding_comment: "Il y avait un problème en ajoutant vos commentaires"
19
+ view_thread: "Voir le fil de discussion."
data/locales/gl.yml CHANGED
@@ -10,9 +10,10 @@ gl:
10
10
  cant_delete_comment: "Non ten permiso para borrar este comentario"
11
11
  comment_removed: "Comentario eliminado correctamente."
12
12
  create_error: "Non se puido crear o {{errors}} comentario"
13
- create_success: "Engadiu comentarios"
14
- missing_comment_template_error: "Não se puido atopar un {{partial}}. parcial nomeado Por favor, cree un comentario parcial e ténteo de novo."
13
+ create_success: "Engadir comentario"
14
+ missing_comment_template_error: "Non se puido atopar un {{partial}}. parcial nomeado Por favor, cree un comentario parcial e ténteo de novo."
15
15
  new_comment_email_subject: "Novo comentario de {{name}} en {{application_name}}"
16
16
  new_comment_no_title: "Engadir un novo comentario"
17
17
  new_comment_with_title: "Engadir un novo comentario para {{title}}"
18
- problem_adding_comment: "Produciuse un erro ó engadir o seu comentario"
18
+ problem_adding_comment: "Houbo un problema ao engadir o teu comentario"
19
+ view_thread: "Ver tema a debate."
data/locales/hi.yml CHANGED
@@ -16,3 +16,4 @@ hi:
16
16
  new_comment_no_title: "एक नई टिप्पणी जोड़ें"
17
17
  new_comment_with_title: "{{title}} के लिए एक नई टिप्पणी जोड़ें"
18
18
  problem_adding_comment: "वहाँ एक अपनी टिप्पणी जोड़ने समस्या थी"
19
+ view_thread: "सारे चर्चा धागा."
data/locales/hr.yml CHANGED
@@ -16,3 +16,4 @@ hr:
16
16
  new_comment_no_title: "Dodaj novi komentar"
17
17
  new_comment_with_title: "Dodaj novi komentar {{title}}"
18
18
  problem_adding_comment: "Došlo je do problema dodajući Vaš komentar"
19
+ view_thread: "Prikaz rasprava nit."
data/locales/hu.yml CHANGED
@@ -4,9 +4,9 @@ hu:
4
4
  activity_templates:
5
5
  comment: Észrevételeket
6
6
  comments:
7
- add_comment: Kommentáld
7
+ add_comment: Megjegyzést
8
8
  add_comment_button: "Add Comment"
9
- anonymous: Anonim
9
+ anonymous: névtelenek
10
10
  cant_delete_comment: "Önnek nincs jogosultsága törölni ezt a megjegyzést"
11
11
  comment_removed: "Comment sikeresen eltávolították."
12
12
  create_error: "Nem sikerült létrehozni a megjegyzés {{errors}}"
@@ -16,3 +16,4 @@ hu:
16
16
  new_comment_no_title: "Hozzáadása Új hozzászólás"
17
17
  new_comment_with_title: "Új hozzászólás a {{title}}"
18
18
  problem_adding_comment: "Hiba történt a hozzáadja a comment"
19
+ view_thread: "Tekintse meg a téma megvitatását."
data/locales/id.yml CHANGED
@@ -16,3 +16,4 @@ id:
16
16
  new_comment_no_title: "Tambah komentar baru"
17
17
  new_comment_with_title: "Tambah komentar baru untuk {{title}}"
18
18
  problem_adding_comment: "Ada masalah menambahkan komentar Anda"
19
+ view_thread: "Lihat diskusi thread."
data/locales/it.yml CHANGED
@@ -16,3 +16,4 @@ it:
16
16
  new_comment_no_title: "Aggiungi un nuovo commento"
17
17
  new_comment_with_title: "Aggiungi un nuovo commento a {{title}}"
18
18
  problem_adding_comment: "C&#39;è stato un problema di aggiungere il tuo commento"
19
+ view_thread: "Vedi il thread di discussione."
data/locales/iw.yml CHANGED
@@ -16,3 +16,4 @@ iw:
16
16
  new_comment_no_title: "הוסף הערה חדש"
17
17
  new_comment_with_title: "הוסף תגובה חדשה {{title}}"
18
18
  problem_adding_comment: "היתה בעיה להוסיף את ההערה שלך"
19
+ view_thread: "הצג את חוט הדיון."
data/locales/ja.yml CHANGED
@@ -16,3 +16,4 @@ ja:
16
16
  new_comment_no_title: 新しいコメントの追加
17
17
  new_comment_with_title: "{{title}}に新しいコメントを追加"
18
18
  problem_adding_comment: 問題があるあなたのコメントを追加されました
19
+ view_thread: ビューには、議論のスレッド。
data/locales/ko.yml CHANGED
@@ -16,3 +16,4 @@ ko:
16
16
  new_comment_no_title: "새 덧글 추가"
17
17
  new_comment_with_title: "{{title}}에 새로운 코멘트를 추가하십시오"
18
18
  problem_adding_comment: "거기에 문제가 귀하의 코멘트를 추가했습니다"
19
+ view_thread: "토론 스레드보기."
data/locales/lt.yml CHANGED
@@ -16,3 +16,4 @@ lt:
16
16
  new_comment_no_title: "Pridėti naują komentarą"
17
17
  new_comment_with_title: "Pridėti naują komentarą {{title}}"
18
18
  problem_adding_comment: "Iškilo problema pridėti savo komentarą"
19
+ view_thread: "Žiūrėti diskusijų temoje."
data/locales/lv.yml CHANGED
@@ -16,3 +16,4 @@ lv:
16
16
  new_comment_no_title: "Pievienot jaunu komentāru"
17
17
  new_comment_with_title: "Pievienot jaunu komentāru {{title}}"
18
18
  problem_adding_comment: "Radās problēma, pievienojot savu komentāru"
19
+ view_thread: "Apskatīt diskusiju pavedienu."
data/locales/mt.yml CHANGED
@@ -7,7 +7,7 @@ mt:
7
7
  add_comment: Kumment
8
8
  add_comment_button: "Add Comment"
9
9
  anonymous: anonima
10
- cant_delete_comment: "Int ma jkollhomx permess li tħassar dan il-kumment"
10
+ cant_delete_comment: "Inti ma għandekx permess li tħassar dan il-kumment"
11
11
  comment_removed: "Kumment jitneħħew b&#39;suċċess."
12
12
  create_error: "Tista &#39;ma toħloq l-{{errors}} kumment"
13
13
  create_success: "Għaddew miżjud kumment"
@@ -16,3 +16,4 @@ mt:
16
16
  new_comment_no_title: "Żid kumment"
17
17
  new_comment_with_title: "Żid kumment li {{title}}"
18
18
  problem_adding_comment: "Kien hemm problema żżid kumment tiegħek"
19
+ view_thread: "Ara l-ħajt diskussjoni."
data/locales/nl.yml CHANGED
@@ -16,3 +16,4 @@ nl:
16
16
  new_comment_no_title: "Voeg een nieuwe reactie"
17
17
  new_comment_with_title: "Voeg een nieuw commentaar te {{title}}"
18
18
  problem_adding_comment: "Er was een probleem het toevoegen van uw reactie"
19
+ view_thread: "Bekijk de discussie draad."
data/locales/no.yml CHANGED
@@ -17,3 +17,4 @@
17
17
  new_comment_no_title: "Legg til en ny kommentar"
18
18
  new_comment_with_title: "Legg til en ny kommentar til {{title}}"
19
19
  problem_adding_comment: "Det var et problem å legge inn din kommentar"
20
+ view_thread: "Se diskusjonen tråden."
data/locales/pl.yml CHANGED
@@ -16,3 +16,4 @@ pl:
16
16
  new_comment_no_title: "Dodaj nowy komentarz"
17
17
  new_comment_with_title: "Dodaj nowy komentarz {{title}}"
18
18
  problem_adding_comment: "Nie było problemu dodawania komentarza"
19
+ view_thread: "Zobacz wątku dyskusji."
data/locales/pt-PT.yml CHANGED
@@ -16,3 +16,4 @@ pt-PT:
16
16
  new_comment_no_title: "Adicionar um novo comentário"
17
17
  new_comment_with_title: "Adicionar um novo comentário para {{title}}"
18
18
  problem_adding_comment: "Houve um problema ao adicionar o seu comentário"
19
+ view_thread: "Ver tema a discussão."
data/locales/ro.yml CHANGED
@@ -16,3 +16,4 @@ ro:
16
16
  new_comment_no_title: "Adauga un comentariu nou"
17
17
  new_comment_with_title: "Adauga un comentariu nou pentru a {{title}}"
18
18
  problem_adding_comment: "Nu a fost o problemă adăugarea comentariul tau"
19
+ view_thread: "Vizualizaţi şirul de discuţii."
data/locales/ru.yml CHANGED
@@ -16,3 +16,4 @@ ru:
16
16
  new_comment_no_title: "Добавить новый комментарий"
17
17
  new_comment_with_title: "Добавить новый комментарий к {{title}}"
18
18
  problem_adding_comment: "Был проблема добавить свой комментарий"
19
+ view_thread: "Посмотреть обсуждение поток."
data/locales/sk.yml CHANGED
@@ -16,3 +16,4 @@ sk:
16
16
  new_comment_no_title: "Pridať nový komentár"
17
17
  new_comment_with_title: "Pridať nový komentár {{title}}"
18
18
  problem_adding_comment: "Tam bol problém pridať svoj komentár"
19
+ view_thread: "Zobraziť diskusiu vlákno."
data/locales/sl.yml CHANGED
@@ -16,3 +16,4 @@ sl:
16
16
  new_comment_no_title: "Dodaj nov komentar"
17
17
  new_comment_with_title: "Dodaj nov komentar {{title}}"
18
18
  problem_adding_comment: "Prišlo je do težave dodal svoj komentar"
19
+ view_thread: "Prikaži nit razprave."
data/locales/sq.yml CHANGED
@@ -16,3 +16,4 @@ sq:
16
16
  new_comment_no_title: "Shto një koment të ri"
17
17
  new_comment_with_title: "Shto një koment të ri për të {{title}}"
18
18
  problem_adding_comment: "Nuk ishte një problem duke shtuar komentin tuaj"
19
+ view_thread: "View thread diskutim."
data/locales/sr.yml CHANGED
@@ -16,3 +16,4 @@ sr:
16
16
  new_comment_no_title: "Додај нови коментар"
17
17
  new_comment_with_title: "Додај нови коментар на {{title}}"
18
18
  problem_adding_comment: "Дошло је до проблема додати ваш коментар"
19
+ view_thread: "Погледај расправу нит."
data/locales/sv.yml CHANGED
@@ -16,3 +16,4 @@ sv:
16
16
  new_comment_no_title: "Lägg till en ny kommentar"
17
17
  new_comment_with_title: "Lägg till en ny kommentar till {{title}}"
18
18
  problem_adding_comment: "Det uppstod ett problem att lägga till din kommentar"
19
+ view_thread: "Se diskussionen tråd."
data/locales/th.yml CHANGED
@@ -16,3 +16,4 @@ th:
16
16
  new_comment_no_title: เพิ่มความคิดเห็นใหม่
17
17
  new_comment_with_title: "เพิ่มความคิดเห็นใหม่ {{title}}"
18
18
  problem_adding_comment: มีปัญหาการเพิ่มข้อคิดเห็นของคุณได้
19
+ view_thread: ดูหัวข้อสนทนา.
data/locales/tl.yml CHANGED
@@ -16,3 +16,4 @@ tl:
16
16
  new_comment_no_title: "Magdagdag ng isang bagong puna"
17
17
  new_comment_with_title: "Magdagdag ng isang bagong puna sa {{title}}"
18
18
  problem_adding_comment: "Nagkaroon ng problema sa pagdagdag ng iyong puna"
19
+ view_thread: "Tingnan ang discussion thread."
data/locales/tr.yml CHANGED
@@ -16,3 +16,4 @@ tr:
16
16
  new_comment_no_title: "Yeni bir yorum ekle"
17
17
  new_comment_with_title: "{{title}} Yeni yorum ekle"
18
18
  problem_adding_comment: "Bir sorun yorum ekleme oldu"
19
+ view_thread: "Profili tartışma thread."
data/locales/uk.yml CHANGED
@@ -16,3 +16,4 @@ uk:
16
16
  new_comment_no_title: "Додати новий коментар"
17
17
  new_comment_with_title: "Додати новий коментар до {{title}}"
18
18
  problem_adding_comment: "Був проблема додати свій коментар"
19
+ view_thread: "Переглянути обговорення потік."
data/locales/vi.yml CHANGED
@@ -16,3 +16,4 @@ vi:
16
16
  new_comment_no_title: "Thêm một comment mới"
17
17
  new_comment_with_title: "Thêm một comment mới để {{title}}"
18
18
  problem_adding_comment: "Có vấn đề thêm bình luận của bạn"
19
+ view_thread: "Xem các chủ đề thảo luận."
data/locales/zh-CN.yml CHANGED
@@ -16,3 +16,4 @@ zh-CN:
16
16
  new_comment_no_title: 添加新评论
17
17
  new_comment_with_title: "添加对{{title}}新评论"
18
18
  problem_adding_comment: 有一个问题,加入您的评论
19
+ view_thread: 查看讨论线程。
data/locales/zh-TW.yml CHANGED
@@ -16,3 +16,4 @@ zh-TW:
16
16
  new_comment_no_title: 添加新評論
17
17
  new_comment_with_title: "添加新的評論,{{title}}"
18
18
  problem_adding_comment: 有一個問題,加入您的評論
19
+ view_thread: 查看討論線程。
data/locales/zh.yml CHANGED
@@ -16,3 +16,4 @@ zh:
16
16
  new_comment_no_title: 添加新评论
17
17
  new_comment_with_title: "添加对{{title}}新评论"
18
18
  problem_adding_comment: 有一个问题,加入您的评论
19
+ view_thread: 查看讨论线程。
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{muck-comments}
8
- s.version = "0.1.11"
8
+ s.version = "0.1.12"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Ball"]
12
- s.date = %q{2009-10-01}
12
+ s.date = %q{2009-10-27}
13
13
  s.description = %q{The comment engine for the muck system.}
14
14
  s.email = %q{justinball@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -32,6 +32,7 @@ Gem::Specification.new do |s|
32
32
  "app/views/comments/_form.html.erb",
33
33
  "app/views/comments/index.html.erb",
34
34
  "app/views/comments/new.html.erb",
35
+ "app/views/external/_disqus.html.erb",
35
36
  "config/muck_comments_routes.rb",
36
37
  "db/migrate/20090613173314_create_comments.rb",
37
38
  "db/migrate/20090730154102_allow_null_user.rb",
@@ -118,6 +119,7 @@ Gem::Specification.new do |s|
118
119
  "test/rails_root/config/routes.rb",
119
120
  "test/rails_root/db/.keep",
120
121
  "test/rails_root/db/migrate/20090320174818_create_muck_permissions_and_roles.rb",
122
+ "test/rails_root/db/migrate/20090327231918_create_users.rb",
121
123
  "test/rails_root/db/migrate/20090402033319_add_muck_activities.rb",
122
124
  "test/rails_root/db/migrate/20090402234137_create_languages.rb",
123
125
  "test/rails_root/db/migrate/20090426041056_create_countries.rb",
@@ -131,6 +133,8 @@ Gem::Specification.new do |s|
131
133
  "test/rails_root/db/migrate/20090730044139_add_comment_cache.rb",
132
134
  "test/rails_root/db/migrate/20090730074858_add_comment_count_to_users.rb",
133
135
  "test/rails_root/db/migrate/20090730154102_allow_null_user.rb",
136
+ "test/rails_root/db/migrate/20090818204527_add_activity_indexes.rb",
137
+ "test/rails_root/db/migrate/20090819030523_add_attachable_to_activities.rb",
134
138
  "test/rails_root/features/comments.feature",
135
139
  "test/rails_root/features/step_definitions/comment_steps.rb",
136
140
  "test/rails_root/features/step_definitions/common_steps.rb",
@@ -144,8 +148,10 @@ Gem::Specification.new do |s|
144
148
  "test/rails_root/public/500.html",
145
149
  "test/rails_root/public/dispatch.rb",
146
150
  "test/rails_root/public/favicon.ico",
151
+ "test/rails_root/public/images/arrow_down.gif",
147
152
  "test/rails_root/public/images/arrow_left.gif",
148
153
  "test/rails_root/public/images/arrow_right.gif",
154
+ "test/rails_root/public/images/arrow_up.gif",
149
155
  "test/rails_root/public/images/fancybox/fancy_closebox.png",
150
156
  "test/rails_root/public/images/fancybox/fancy_left.png",
151
157
  "test/rails_root/public/images/fancybox/fancy_progress.png",
@@ -163,7 +169,23 @@ Gem::Specification.new do |s|
163
169
  "test/rails_root/public/images/fancybox/fancy_title_right.png",
164
170
  "test/rails_root/public/images/icons/accept.png",
165
171
  "test/rails_root/public/images/icons/add.png",
172
+ "test/rails_root/public/images/icons/blue_guy.png",
173
+ "test/rails_root/public/images/icons/button_background.png",
174
+ "test/rails_root/public/images/icons/cancel.png",
175
+ "test/rails_root/public/images/icons/close.png",
176
+ "test/rails_root/public/images/icons/comment.png",
166
177
  "test/rails_root/public/images/icons/delete.png",
178
+ "test/rails_root/public/images/icons/exclaim.png",
179
+ "test/rails_root/public/images/icons/grey_guy.png",
180
+ "test/rails_root/public/images/icons/hide.png",
181
+ "test/rails_root/public/images/icons/information.png",
182
+ "test/rails_root/public/images/icons/minus.png",
183
+ "test/rails_root/public/images/icons/question.png",
184
+ "test/rails_root/public/images/icons/search_box.png",
185
+ "test/rails_root/public/images/icons/star.png",
186
+ "test/rails_root/public/images/icons/stop.png",
187
+ "test/rails_root/public/images/icons/thumb_down.png",
188
+ "test/rails_root/public/images/icons/thumb_up.png",
167
189
  "test/rails_root/public/images/icons/vote.png",
168
190
  "test/rails_root/public/images/loading.gif",
169
191
  "test/rails_root/public/images/nothing.png",
@@ -186,6 +208,7 @@ Gem::Specification.new do |s|
186
208
  "test/rails_root/public/javascripts/jquery/jquery.tips.js",
187
209
  "test/rails_root/public/javascripts/muck.js",
188
210
  "test/rails_root/public/javascripts/muck_activities.js",
211
+ "test/rails_root/public/javascripts/muck_time/en.js",
189
212
  "test/rails_root/public/javascripts/prototype.js",
190
213
  "test/rails_root/public/javascripts/scriptaculous.js",
191
214
  "test/rails_root/public/javascripts/slider.js",
@@ -364,6 +387,7 @@ Gem::Specification.new do |s|
364
387
  "test/rails_root/config/initializers/session_store.rb",
365
388
  "test/rails_root/config/routes.rb",
366
389
  "test/rails_root/db/migrate/20090320174818_create_muck_permissions_and_roles.rb",
390
+ "test/rails_root/db/migrate/20090327231918_create_users.rb",
367
391
  "test/rails_root/db/migrate/20090402033319_add_muck_activities.rb",
368
392
  "test/rails_root/db/migrate/20090402234137_create_languages.rb",
369
393
  "test/rails_root/db/migrate/20090426041056_create_countries.rb",
@@ -377,6 +401,8 @@ Gem::Specification.new do |s|
377
401
  "test/rails_root/db/migrate/20090730044139_add_comment_cache.rb",
378
402
  "test/rails_root/db/migrate/20090730074858_add_comment_count_to_users.rb",
379
403
  "test/rails_root/db/migrate/20090730154102_allow_null_user.rb",
404
+ "test/rails_root/db/migrate/20090818204527_add_activity_indexes.rb",
405
+ "test/rails_root/db/migrate/20090819030523_add_attachable_to_activities.rb",
380
406
  "test/rails_root/features/step_definitions/comment_steps.rb",
381
407
  "test/rails_root/features/step_definitions/common_steps.rb",
382
408
  "test/rails_root/features/step_definitions/webrat_steps.rb",
@@ -12,4 +12,12 @@ require 'tasks/rails'
12
12
  require 'muck_comments/tasks'
13
13
  require 'muck_engine/tasks'
14
14
  require 'muck_users/tasks'
15
- require 'muck_activities/tasks'
15
+ require 'muck_activities/tasks'
16
+
17
+ namespace :muck do
18
+
19
+ def muck_gems
20
+ ['../../muck-engine', '../../muck-users', '../../muck-activities', '../../muck-comments']
21
+ end
22
+
23
+ end
@@ -0,0 +1,40 @@
1
+ class CreateUsers < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :users, :force => true do |t|
4
+ t.string :login
5
+ t.string :email
6
+ t.string :first_name
7
+ t.string :last_name
8
+ t.string :crypted_password
9
+ t.string :password_salt
10
+ t.string :persistence_token, :null => false
11
+ t.string :single_access_token, :null => false
12
+ t.string :perishable_token, :null => false
13
+ t.integer :login_count, :null => false, :default => 0
14
+ t.integer :failed_login_count, :null => false, :default => 0
15
+ t.datetime :last_request_at
16
+ t.datetime :current_login_at
17
+ t.datetime :last_login_at
18
+ t.string :current_login_ip
19
+ t.string :last_login_ip
20
+ t.boolean :terms_of_service, :default => false, :null => false
21
+ t.string :time_zone, :default => "UTC"
22
+ t.datetime :disabled_at
23
+ t.datetime :created_at
24
+ t.datetime :activated_at
25
+ t.datetime :updated_at
26
+ t.string :identity_url
27
+ t.string :url_key
28
+ end
29
+
30
+ add_index :users, :login
31
+ add_index :users, :email
32
+ add_index :users, :persistence_token
33
+ add_index :users, :last_request_at
34
+
35
+ end
36
+
37
+ def self.down
38
+ drop_table :users
39
+ end
40
+ end
@@ -0,0 +1,9 @@
1
+ class AddActivityIndexes < ActiveRecord::Migration
2
+ def self.up
3
+ add_index :activities, ["source_id", "source_type"]
4
+ end
5
+
6
+ def self.down
7
+ remove_index :activities, ["source_id", "source_type"]
8
+ end
9
+ end
@@ -0,0 +1,13 @@
1
+ class AddAttachableToActivities < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :activities, :attachable_id, :integer
4
+ add_column :activities, :attachable_type, :string
5
+ add_index :activities, ["attachable_id", "attachable_type"]
6
+ end
7
+
8
+ def self.down
9
+ remove_column :activities, :attachable_id
10
+ remove_column :activities, :attachable_type
11
+ remove_index :activities, ["attachable_id", "attachable_type"]
12
+ end
13
+ end
@@ -69,12 +69,13 @@ jQuery(document).ready(function() {
69
69
  jQuery("#global-login").focus(function() {
70
70
  jQuery("#global-login").val("");
71
71
  });
72
-
72
+
73
73
  jQuery("#global-password").focus(function() {
74
74
  jQuery("#global-password").val("");
75
75
  });
76
-
76
+
77
77
  jQuery("#quick-login-submit").click(function() {
78
78
  jQuery("#quick-login").submit();
79
- });
79
+ });
80
+
80
81
  });
@@ -1,14 +1,13 @@
1
1
  jQuery(document).ready(function() {
2
- apply_comment_methods();
2
+ apply_activity_ajax_methods();
3
3
  });
4
4
 
5
- function apply_comment_methods(){
5
+ function apply_activity_ajax_methods(){
6
6
  setup_comment_submit();
7
7
  hide_comment_boxes();
8
8
  apply_comment_hover();
9
9
  apply_activity_hover();
10
- jQuery('.activity-no-comments').hide();
11
-
10
+ jQuery('.activity-no-comments').hide();
12
11
  jQuery('.activity-has-comments').find('textarea').click(function(){
13
12
  show_comment_box(this);
14
13
  });
@@ -57,7 +56,7 @@ function setup_comment_submit(){
57
56
  comment_box.removeClass('activity-no-comments');
58
57
  comment_box.addClass('activity-has-comments');
59
58
  comment_box.find('textarea').show();
60
- apply_comment_methods();
59
+ apply_activity_ajax_methods();
61
60
  }
62
61
  });
63
62
  return false;
@@ -0,0 +1,53 @@
1
+ // from http://blog.peelmeagrape.net/2008/7/26/time-ago-in-words-javascript-part-1
2
+ function distanceOfTimeInWords(fromTime, toTime, includeSeconds) {
3
+ var fromSeconds = fromTime.getTime();
4
+ var toSeconds = toTime.getTime();
5
+ var distanceInSeconds = Math.round(Math.abs(fromSeconds - toSeconds) / 1000)
6
+ var distanceInMinutes = Math.round(distanceInSeconds / 60)
7
+ if (distanceInMinutes <= 1) {
8
+ if (!includeSeconds)
9
+ return (distanceInMinutes == 0) ? 'less than a minute' : '1 minute'
10
+ if (distanceInSeconds < 5)
11
+ return 'less than 5 seconds'
12
+ if (distanceInSeconds < 10)
13
+ return 'less than 10 seconds'
14
+ if (distanceInSeconds < 20)
15
+ return 'less than 20 seconds'
16
+ if (distanceInSeconds < 40)
17
+ return 'half a minute'
18
+ if (distanceInSeconds < 60)
19
+ return 'less than a minute'
20
+ return '1 minute'
21
+ }
22
+ if (distanceInMinutes < 45)
23
+ return distanceInMinutes + ' minutes'
24
+ if (distanceInMinutes < 90)
25
+ return "about 1 hour"
26
+ if (distanceInMinutes < 1440)
27
+ return "about " + (Math.round(distanceInMinutes / 60)) + ' hours'
28
+ if (distanceInMinutes < 2880)
29
+ return "1 day"
30
+ if (distanceInMinutes < 43200)
31
+ return (Math.round(distanceInMinutes / 1440)) + ' days'
32
+ if (distanceInMinutes < 86400)
33
+ return "about 1 month"
34
+ if (distanceInMinutes < 525600)
35
+ return (Math.round(distanceInMinutes / 43200)) + ' months'
36
+ if (distanceInMinutes < 1051200)
37
+ return "about 1 year"
38
+ return "over " + (Math.round(distanceInMinutes / 525600)) + ' years'
39
+ }
40
+
41
+ if ( typeof jQuery != "undefined" )
42
+ jQuery.fn.readableDate = function(){
43
+ return this.each(function(){
44
+ var span = jQuery(this);
45
+ var date = distanceOfTimeInWords(new Date(span.text()), new Date(), true);
46
+ if (date)
47
+ jQuery(this).text(date + ' ago');
48
+ });
49
+ };
50
+
51
+ jQuery(document).ready(function() {
52
+ jQuery(".readable-time").readableDate();
53
+ });
@@ -1,6 +1,7 @@
1
1
  /* general */
2
2
  .center{text-align:center;}
3
3
  #popup_wrapper{width:auto;}
4
+ .waiting{margin:3px 0;padding-left:20px;background:transparent url('/images/spinner.gif') no-repeat scroll left bottom;}
4
5
 
5
6
  /* forms */
6
7
  input{margin:0 10px 5px 0;padding:4px;font-size:1.3em;}
@@ -23,6 +24,7 @@ form fieldset input[type="text"],form fieldset input[type="password"]{width:500p
23
24
  .button-link {background-color:transparent;border-top-width: 0px;border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;}
24
25
 
25
26
  /*images*/
27
+ .tiny{width:24px;height:24px;}
26
28
  .icon{width:50px;height:50px;}
27
29
  .thumb{width:100px;height:100px;}
28
30
  .medium{width:300px;height:300px;}
@@ -82,8 +84,3 @@ div.jGrowl div.jGrowl-notification h2{text-align:left;font-weight:bold;padding:5
82
84
  #errorExplanation h2{text-align:left;font-weight:bold;padding:5px 5px 5px 15px;font-size:16px;background-color:#B61E12;color:#fff;}
83
85
  #errorExplanation p{color:#333;margin-bottom:0;padding:5px;}
84
86
  #errorExplanation ul li{list-style:square;}
85
-
86
- /* iFrame */
87
- .inner_shadow {-moz-background-clip:border;-moz-background-inline-policy:continuous;-moz-background-origin:padding;background:transparent url(/images/nothing.png) repeat-x scroll left bottom;height:3px;width:100%;}
88
- .framed_content{height:100%;margin-bottom:-1px;width:100%;}
89
- #content_iframe{border-top:1px solid #BCC5D3;border-width:1px 0 0;display:block;display:block;}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-comments
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Ball
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-01 00:00:00 -06:00
12
+ date: 2009-10-27 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -57,6 +57,7 @@ files:
57
57
  - app/views/comments/_form.html.erb
58
58
  - app/views/comments/index.html.erb
59
59
  - app/views/comments/new.html.erb
60
+ - app/views/external/_disqus.html.erb
60
61
  - config/muck_comments_routes.rb
61
62
  - db/migrate/20090613173314_create_comments.rb
62
63
  - db/migrate/20090730154102_allow_null_user.rb
@@ -143,6 +144,7 @@ files:
143
144
  - test/rails_root/config/routes.rb
144
145
  - test/rails_root/db/.keep
145
146
  - test/rails_root/db/migrate/20090320174818_create_muck_permissions_and_roles.rb
147
+ - test/rails_root/db/migrate/20090327231918_create_users.rb
146
148
  - test/rails_root/db/migrate/20090402033319_add_muck_activities.rb
147
149
  - test/rails_root/db/migrate/20090402234137_create_languages.rb
148
150
  - test/rails_root/db/migrate/20090426041056_create_countries.rb
@@ -156,6 +158,8 @@ files:
156
158
  - test/rails_root/db/migrate/20090730044139_add_comment_cache.rb
157
159
  - test/rails_root/db/migrate/20090730074858_add_comment_count_to_users.rb
158
160
  - test/rails_root/db/migrate/20090730154102_allow_null_user.rb
161
+ - test/rails_root/db/migrate/20090818204527_add_activity_indexes.rb
162
+ - test/rails_root/db/migrate/20090819030523_add_attachable_to_activities.rb
159
163
  - test/rails_root/features/comments.feature
160
164
  - test/rails_root/features/step_definitions/comment_steps.rb
161
165
  - test/rails_root/features/step_definitions/common_steps.rb
@@ -169,8 +173,10 @@ files:
169
173
  - test/rails_root/public/500.html
170
174
  - test/rails_root/public/dispatch.rb
171
175
  - test/rails_root/public/favicon.ico
176
+ - test/rails_root/public/images/arrow_down.gif
172
177
  - test/rails_root/public/images/arrow_left.gif
173
178
  - test/rails_root/public/images/arrow_right.gif
179
+ - test/rails_root/public/images/arrow_up.gif
174
180
  - test/rails_root/public/images/fancybox/fancy_closebox.png
175
181
  - test/rails_root/public/images/fancybox/fancy_left.png
176
182
  - test/rails_root/public/images/fancybox/fancy_progress.png
@@ -188,7 +194,23 @@ files:
188
194
  - test/rails_root/public/images/fancybox/fancy_title_right.png
189
195
  - test/rails_root/public/images/icons/accept.png
190
196
  - test/rails_root/public/images/icons/add.png
197
+ - test/rails_root/public/images/icons/blue_guy.png
198
+ - test/rails_root/public/images/icons/button_background.png
199
+ - test/rails_root/public/images/icons/cancel.png
200
+ - test/rails_root/public/images/icons/close.png
201
+ - test/rails_root/public/images/icons/comment.png
191
202
  - test/rails_root/public/images/icons/delete.png
203
+ - test/rails_root/public/images/icons/exclaim.png
204
+ - test/rails_root/public/images/icons/grey_guy.png
205
+ - test/rails_root/public/images/icons/hide.png
206
+ - test/rails_root/public/images/icons/information.png
207
+ - test/rails_root/public/images/icons/minus.png
208
+ - test/rails_root/public/images/icons/question.png
209
+ - test/rails_root/public/images/icons/search_box.png
210
+ - test/rails_root/public/images/icons/star.png
211
+ - test/rails_root/public/images/icons/stop.png
212
+ - test/rails_root/public/images/icons/thumb_down.png
213
+ - test/rails_root/public/images/icons/thumb_up.png
192
214
  - test/rails_root/public/images/icons/vote.png
193
215
  - test/rails_root/public/images/loading.gif
194
216
  - test/rails_root/public/images/nothing.png
@@ -211,6 +233,7 @@ files:
211
233
  - test/rails_root/public/javascripts/jquery/jquery.tips.js
212
234
  - test/rails_root/public/javascripts/muck.js
213
235
  - test/rails_root/public/javascripts/muck_activities.js
236
+ - test/rails_root/public/javascripts/muck_time/en.js
214
237
  - test/rails_root/public/javascripts/prototype.js
215
238
  - test/rails_root/public/javascripts/scriptaculous.js
216
239
  - test/rails_root/public/javascripts/slider.js
@@ -410,6 +433,7 @@ test_files:
410
433
  - test/rails_root/config/initializers/session_store.rb
411
434
  - test/rails_root/config/routes.rb
412
435
  - test/rails_root/db/migrate/20090320174818_create_muck_permissions_and_roles.rb
436
+ - test/rails_root/db/migrate/20090327231918_create_users.rb
413
437
  - test/rails_root/db/migrate/20090402033319_add_muck_activities.rb
414
438
  - test/rails_root/db/migrate/20090402234137_create_languages.rb
415
439
  - test/rails_root/db/migrate/20090426041056_create_countries.rb
@@ -423,6 +447,8 @@ test_files:
423
447
  - test/rails_root/db/migrate/20090730044139_add_comment_cache.rb
424
448
  - test/rails_root/db/migrate/20090730074858_add_comment_count_to_users.rb
425
449
  - test/rails_root/db/migrate/20090730154102_allow_null_user.rb
450
+ - test/rails_root/db/migrate/20090818204527_add_activity_indexes.rb
451
+ - test/rails_root/db/migrate/20090819030523_add_attachable_to_activities.rb
426
452
  - test/rails_root/features/step_definitions/comment_steps.rb
427
453
  - test/rails_root/features/step_definitions/common_steps.rb
428
454
  - test/rails_root/features/step_definitions/webrat_steps.rb