muck-raker 0.1.37 → 0.1.38
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +4 -2
- data/VERSION +1 -1
- data/app/controllers/muck/aggregation_feeds_controller.rb +43 -0
- data/app/controllers/muck/aggregations_controller.rb +150 -260
- data/app/controllers/muck/topics_controller.rb +93 -0
- data/app/helpers/muck_raker_aggregations_helper.rb +21 -0
- data/app/helpers/muck_raker_feeds_helper.rb +0 -12
- data/app/helpers/muck_raker_google_helper.rb +70 -80
- data/app/models/aggregation.rb +63 -17
- data/app/models/aggregation_feed.rb +2 -1
- data/app/models/feed.rb +29 -2
- data/app/models/google_feed_request.rb +7 -1
- data/app/models/identity_feed.rb +2 -2
- data/app/models/service.rb +125 -31
- data/app/views/aggregations/_aggregation.html.erb +1 -0
- data/app/views/aggregations/_data_source.html.erb +2 -2
- data/app/views/aggregations/_feeds.html.erb +1 -0
- data/app/views/aggregations/_preview_form.html.erb +12 -0
- data/app/views/aggregations/edit.html.erb +60 -14
- data/app/views/aggregations/index.html.erb +17 -0
- data/app/views/aggregations/index.iphone.erb +0 -0
- data/app/views/aggregations/new.html.erb +3 -4
- data/app/views/aggregations/preview.html.erb +46 -0
- data/app/views/aggregations/preview.iphone.erb +0 -0
- data/app/views/aggregations/rss_discovery.html.erb +3 -0
- data/app/views/feeds/_form.html.erb +1 -1
- data/app/views/feeds/new.html.erb +1 -1
- data/app/views/feeds/new_extended.html.erb +1 -1
- data/app/views/feeds/new_oai_rss.html.erb +1 -1
- data/app/views/google/_feed.html.erb +33 -1
- data/app/views/google/_feeds_scripts.html.erb +19 -0
- data/app/views/raker_mailer/notification_feed_added.text.ar.html.erb +2 -1
- data/app/views/raker_mailer/notification_feed_added.text.ar.plain.erb +3 -1
- data/app/views/raker_mailer/notification_feed_added.text.bg.html.erb +3 -2
- data/app/views/raker_mailer/notification_feed_added.text.bg.plain.erb +4 -2
- data/app/views/raker_mailer/notification_feed_added.text.ca.html.erb +1 -0
- data/app/views/raker_mailer/notification_feed_added.text.ca.plain.erb +2 -0
- data/app/views/raker_mailer/notification_feed_added.text.cs.html.erb +2 -1
- data/app/views/raker_mailer/notification_feed_added.text.cs.plain.erb +3 -1
- data/app/views/raker_mailer/notification_feed_added.text.da.html.erb +2 -1
- data/app/views/raker_mailer/notification_feed_added.text.da.plain.erb +3 -1
- data/app/views/raker_mailer/notification_feed_added.text.de.html.erb +1 -0
- data/app/views/raker_mailer/notification_feed_added.text.de.plain.erb +2 -0
- data/app/views/raker_mailer/notification_feed_added.text.el.html.erb +3 -2
- data/app/views/raker_mailer/notification_feed_added.text.el.plain.erb +4 -2
- data/app/views/raker_mailer/notification_feed_added.text.es.html.erb +1 -0
- data/app/views/raker_mailer/notification_feed_added.text.es.plain.erb +2 -0
- data/app/views/raker_mailer/notification_feed_added.text.et.html.erb +2 -1
- data/app/views/raker_mailer/notification_feed_added.text.et.plain.erb +3 -1
- data/app/views/raker_mailer/notification_feed_added.text.fa.html.erb +2 -1
- data/app/views/raker_mailer/notification_feed_added.text.fa.plain.erb +3 -1
- data/app/views/raker_mailer/notification_feed_added.text.fi.html.erb +2 -1
- data/app/views/raker_mailer/notification_feed_added.text.fi.plain.erb +3 -1
- data/app/views/raker_mailer/notification_feed_added.text.fr.html.erb +2 -1
- data/app/views/raker_mailer/notification_feed_added.text.fr.plain.erb +3 -1
- data/app/views/raker_mailer/notification_feed_added.text.gl.html.erb +3 -2
- data/app/views/raker_mailer/notification_feed_added.text.gl.plain.erb +4 -2
- data/app/views/raker_mailer/notification_feed_added.text.hi.html.erb +2 -1
- data/app/views/raker_mailer/notification_feed_added.text.hi.plain.erb +3 -1
- data/app/views/raker_mailer/notification_feed_added.text.hr.html.erb +3 -2
- data/app/views/raker_mailer/notification_feed_added.text.hr.plain.erb +4 -2
- data/app/views/raker_mailer/notification_feed_added.text.hu.html.erb +3 -2
- data/app/views/raker_mailer/notification_feed_added.text.hu.plain.erb +4 -2
- data/app/views/raker_mailer/notification_feed_added.text.id.html.erb +2 -1
- data/app/views/raker_mailer/notification_feed_added.text.id.plain.erb +3 -1
- data/app/views/raker_mailer/notification_feed_added.text.it.html.erb +2 -1
- data/app/views/raker_mailer/notification_feed_added.text.it.plain.erb +3 -1
- data/app/views/raker_mailer/notification_feed_added.text.iw.html.erb +2 -1
- data/app/views/raker_mailer/notification_feed_added.text.iw.plain.erb +3 -1
- data/app/views/raker_mailer/notification_feed_added.text.ja.html.erb +4 -3
- data/app/views/raker_mailer/notification_feed_added.text.ja.plain.erb +5 -3
- data/app/views/raker_mailer/notification_feed_added.text.ko.html.erb +1 -0
- data/app/views/raker_mailer/notification_feed_added.text.ko.plain.erb +2 -0
- data/app/views/raker_mailer/notification_feed_added.text.lt.html.erb +2 -1
- data/app/views/raker_mailer/notification_feed_added.text.lt.plain.erb +3 -1
- data/app/views/raker_mailer/notification_feed_added.text.lv.html.erb +3 -2
- data/app/views/raker_mailer/notification_feed_added.text.lv.plain.erb +4 -2
- data/app/views/raker_mailer/notification_feed_added.text.mt.html.erb +2 -1
- data/app/views/raker_mailer/notification_feed_added.text.mt.plain.erb +3 -1
- data/app/views/raker_mailer/notification_feed_added.text.nl.html.erb +1 -0
- data/app/views/raker_mailer/notification_feed_added.text.nl.plain.erb +2 -0
- data/app/views/raker_mailer/notification_feed_added.text.no.html.erb +1 -0
- data/app/views/raker_mailer/notification_feed_added.text.no.plain.erb +2 -0
- data/app/views/raker_mailer/notification_feed_added.text.pl.html.erb +2 -1
- data/app/views/raker_mailer/notification_feed_added.text.pl.plain.erb +3 -1
- data/app/views/raker_mailer/notification_feed_added.text.pt-PT.html.erb +3 -2
- data/app/views/raker_mailer/notification_feed_added.text.pt-PT.plain.erb +4 -2
- data/app/views/raker_mailer/notification_feed_added.text.ro.html.erb +2 -1
- data/app/views/raker_mailer/notification_feed_added.text.ro.plain.erb +3 -1
- data/app/views/raker_mailer/notification_feed_added.text.ru.html.erb +1 -0
- data/app/views/raker_mailer/notification_feed_added.text.ru.plain.erb +2 -0
- data/app/views/raker_mailer/notification_feed_added.text.sk.html.erb +2 -1
- data/app/views/raker_mailer/notification_feed_added.text.sk.plain.erb +3 -1
- data/app/views/raker_mailer/notification_feed_added.text.sl.html.erb +2 -1
- data/app/views/raker_mailer/notification_feed_added.text.sl.plain.erb +3 -1
- data/app/views/raker_mailer/notification_feed_added.text.sq.html.erb +3 -2
- data/app/views/raker_mailer/notification_feed_added.text.sq.plain.erb +4 -2
- data/app/views/raker_mailer/notification_feed_added.text.sr.html.erb +3 -2
- data/app/views/raker_mailer/notification_feed_added.text.sr.plain.erb +4 -2
- data/app/views/raker_mailer/notification_feed_added.text.sv.html.erb +1 -0
- data/app/views/raker_mailer/notification_feed_added.text.sv.plain.erb +2 -0
- data/app/views/raker_mailer/notification_feed_added.text.th.html.erb +4 -3
- data/app/views/raker_mailer/notification_feed_added.text.th.plain.erb +5 -3
- data/app/views/raker_mailer/notification_feed_added.text.tl.html.erb +2 -1
- data/app/views/raker_mailer/notification_feed_added.text.tl.plain.erb +3 -1
- data/app/views/raker_mailer/notification_feed_added.text.tr.html.erb +3 -2
- data/app/views/raker_mailer/notification_feed_added.text.tr.plain.erb +4 -2
- data/app/views/raker_mailer/notification_feed_added.text.uk.html.erb +2 -1
- data/app/views/raker_mailer/notification_feed_added.text.uk.plain.erb +3 -1
- data/app/views/raker_mailer/notification_feed_added.text.vi.html.erb +2 -1
- data/app/views/raker_mailer/notification_feed_added.text.vi.plain.erb +3 -1
- data/app/views/raker_mailer/notification_feed_added.text.zh-CN.html.erb +4 -3
- data/app/views/raker_mailer/notification_feed_added.text.zh-CN.plain.erb +5 -3
- data/app/views/raker_mailer/notification_feed_added.text.zh-TW.html.erb +4 -3
- data/app/views/raker_mailer/notification_feed_added.text.zh-TW.plain.erb +5 -3
- data/app/views/raker_mailer/notification_feed_added.text.zh.html.erb +4 -3
- data/app/views/raker_mailer/notification_feed_added.text.zh.plain.erb +5 -3
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.ar.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.ar.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.bg.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.bg.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.ca.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.ca.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.cs.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.cs.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.da.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.da.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.de.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.de.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.el.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.el.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.es.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.es.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.et.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.et.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.fa.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.fa.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.fi.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.fi.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.fr.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.fr.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.gl.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.gl.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.hi.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.hi.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.hr.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.hr.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.hu.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.hu.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.id.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.id.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.it.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.it.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.iw.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.iw.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.ja.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.ja.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.ko.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.ko.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.lt.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.lt.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.lv.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.lv.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.mt.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.mt.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.nl.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.nl.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.no.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.no.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.pl.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.pl.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.pt-PT.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.pt-PT.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.ro.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.ro.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.ru.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.ru.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.sk.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.sk.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.sl.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.sl.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.sq.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.sq.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.sr.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.sr.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.sv.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.sv.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.th.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.th.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.tl.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.tl.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.tr.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.tr.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.uk.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.uk.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.vi.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.vi.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.zh-CN.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.zh-CN.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.zh-TW.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.zh-TW.plain.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.zh.html.erb +4 -0
- data/app/views/raker_mailer/notification_oai_endpoint_added.text.zh.plain.erb +4 -0
- data/app/views/topics/_feed_preview.html.erb +18 -0
- data/app/views/topics/_form.html.erb +15 -0
- data/app/views/{opmls → topics}/_rss_discover.html.erb +0 -0
- data/app/views/{opmls → topics}/new.html.erb +7 -7
- data/app/views/topics/photos.html.erb +14 -0
- data/app/views/topics/show.html.erb +47 -0
- data/app/views/{opmls/index.opml.builder → topics/show.opml.builder} +0 -0
- data/app/views/topics/videos.html.erb +14 -0
- data/config/muck_raker_routes.rb +4 -3
- data/db/bootstrap/service_categories.yml +1 -1
- data/db/bootstrap/services.yml +15 -1
- data/db/migrate/20091006183742_add_feed_count_to_aggregation.rb +9 -0
- data/lib/muck_raker.rb +0 -4
- data/locales/ar.yml +27 -6
- data/locales/bg.yml +28 -7
- data/locales/ca.yml +30 -9
- data/locales/cs.yml +27 -6
- data/locales/da.yml +27 -6
- data/locales/de.yml +28 -7
- data/locales/el.yml +27 -6
- data/locales/en.yml +27 -6
- data/locales/es.yml +28 -7
- data/locales/et.yml +28 -7
- data/locales/fa.yml +27 -6
- data/locales/fi.yml +27 -6
- data/locales/fr.yml +27 -6
- data/locales/gl.yml +31 -10
- data/locales/hi.yml +27 -6
- data/locales/hr.yml +29 -8
- data/locales/hu.yml +29 -8
- data/locales/id.yml +27 -6
- data/locales/it.yml +29 -8
- data/locales/iw.yml +29 -8
- data/locales/ja.yml +29 -8
- data/locales/ko.yml +29 -8
- data/locales/lt.yml +30 -9
- data/locales/lv.yml +30 -9
- data/locales/mt.yml +32 -11
- data/locales/nl.yml +28 -7
- data/locales/no.yml +30 -9
- data/locales/pl.yml +27 -6
- data/locales/pt-PT.yml +27 -6
- data/locales/ro.yml +28 -7
- data/locales/ru.yml +27 -6
- data/locales/sk.yml +27 -6
- data/locales/sl.yml +30 -9
- data/locales/sq.yml +28 -7
- data/locales/sr.yml +27 -6
- data/locales/sv.yml +27 -6
- data/locales/th.yml +28 -7
- data/locales/tl.yml +27 -6
- data/locales/tr.yml +27 -6
- data/locales/uk.yml +27 -6
- data/locales/vi.yml +27 -6
- data/locales/zh-CN.yml +28 -7
- data/locales/zh-TW.yml +28 -7
- data/locales/zh.yml +28 -7
- data/muck-raker.gemspec +126 -13
- data/public/images/service_icons/16/metacafe.png +0 -0
- data/public/images/service_icons/24/metacafe.png +0 -0
- data/public/images/service_icons/48/metacafe.png +0 -0
- data/public/images/service_icons/60/metacafe.png +0 -0
- data/public/images/service_icons/source/bibsonomy.psd +0 -0
- data/public/images/service_icons/source/metacafe.psd +0 -0
- data/public/stylesheets/frame.css +10 -6
- data/public/stylesheets/muck-raker.css +77 -0
- data/test/rails_root/app/views/layouts/default.html.erb +1 -1
- data/test/rails_root/db/bootstrap/service_categories.yml +1 -1
- data/test/rails_root/db/bootstrap/services.yml +18 -2
- data/test/rails_root/db/migrate/20091006183742_add_feed_count_to_aggregation.rb +9 -0
- data/test/rails_root/public/images/service_icons/16/metacafe.png +0 -0
- data/test/rails_root/public/images/service_icons/24/metacafe.png +0 -0
- data/test/rails_root/public/images/service_icons/48/metacafe.png +0 -0
- data/test/rails_root/public/images/service_icons/60/metacafe.png +0 -0
- data/test/rails_root/public/images/service_icons/source/bibsonomy.psd +0 -0
- data/test/rails_root/public/images/service_icons/source/metacafe.psd +0 -0
- data/test/rails_root/public/javascripts/muck_activities.js +1 -2
- data/test/rails_root/public/stylesheets/application.css +0 -117
- data/test/rails_root/public/stylesheets/frame.css +10 -6
- data/test/rails_root/public/stylesheets/muck-activities.css +39 -0
- data/test/rails_root/public/stylesheets/muck-raker.css +77 -0
- data/test/rails_root/test/factories.rb +5 -0
- data/test/rails_root/test/functional/aggregation_feeds_controller_test.rb +67 -0
- data/test/rails_root/test/functional/aggregations_controller_test.rb +37 -3
- data/test/rails_root/test/functional/topics_controller_test.rb +46 -0
- data/test/rails_root/test/unit/aggregation_feed_test.rb +8 -0
- data/test/rails_root/test/unit/aggregation_test.rb +95 -0
- data/test/rails_root/test/unit/comment_test.rb +1 -1
- data/test/rails_root/test/unit/entry_test.rb +3 -0
- data/test/rails_root/test/unit/feed_test.rb +3 -0
- data/test/rails_root/test/unit/oai_endpoint_test.rb +3 -0
- data/test/rails_root/test/unit/service_test.rb +81 -11
- metadata +126 -13
- data/app/controllers/muck/opmls_controller.rb +0 -28
- data/app/views/google/_feed_bookmarks.html.erb +0 -13
- data/app/views/google/_feed_display.html.erb +0 -13
- data/app/views/google/_feed_photos.html.erb +0 -13
- data/app/views/google/_feeds_display.html.erb +0 -2
- data/app/views/opmls/index.html.erb +0 -19
- data/test/rails_root/test/functional/opmls_controller_test.rb +0 -37
data/README.rdoc
CHANGED
@@ -80,7 +80,9 @@ class Comment < ActiveRecord::Base
|
|
80
80
|
end
|
81
81
|
|
82
82
|
=== CSS
|
83
|
-
|
83
|
+
Running rake muck:raker:sync will copy a default css file called muck-raker.css into your stylesheets directory.
|
84
|
+
You can include that file in your layout or copy it and modify it to meet your needs.
|
85
|
+
(Don't change the file as each time you run rake muck:raker:sync it will overwrite any changes you might have made.)
|
84
86
|
|
85
87
|
=== Frame css
|
86
88
|
There is an example css file for the framed page in frame.css.
|
@@ -90,4 +92,4 @@ You will need to have mysql setup to run the migrations for the test database.
|
|
90
92
|
|
91
93
|
|
92
94
|
|
93
|
-
Copyright (c) 2009
|
95
|
+
Copyright (c) 2009 Tatemae.com, released under the MIT license
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.38
|
@@ -0,0 +1,43 @@
|
|
1
|
+
class Muck::AggregationFeedsController < ApplicationController
|
2
|
+
|
3
|
+
unloadable
|
4
|
+
|
5
|
+
before_filter :login_required
|
6
|
+
|
7
|
+
def destroy
|
8
|
+
@aggregation_feed = AggregationFeed.find(params[:id]) rescue nil if params[:id] && params[:id].to_i > 0
|
9
|
+
@aggregation_feed ||= AggregationFeed.find_by_feed_id_and_aggregation_id(params[:feed_id], params[:aggregation_id])
|
10
|
+
@aggregation = @aggregation_feed.aggregation
|
11
|
+
if has_aggregation_permission?
|
12
|
+
@aggregation_feed.destroy
|
13
|
+
respond_to do |format|
|
14
|
+
message = I18n.t('muck.raker.feed_remove')
|
15
|
+
format.html do
|
16
|
+
flash[:notice] = message
|
17
|
+
redirect_to polymorphic_url([@aggregation.ownable, @aggregation])
|
18
|
+
end
|
19
|
+
format.json { render :json => { :success => true, :message => message }.as_json }
|
20
|
+
format.xml { head :ok }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
protected
|
26
|
+
|
27
|
+
def has_aggregation_permission?
|
28
|
+
if !@aggregation.can_edit?(current_user)
|
29
|
+
message = I18n.t('muck.raker.cant_modify_aggregation')
|
30
|
+
respond_to do |format|
|
31
|
+
format.html do
|
32
|
+
flash[:notice] = message
|
33
|
+
redirect_to polymorphic_url([@aggregation.ownable, @aggregation])
|
34
|
+
end
|
35
|
+
format.js { render(:update) {|page| page.alert message} }
|
36
|
+
format.json { render :json => { :success => false, :message => message }.as_json }
|
37
|
+
end
|
38
|
+
else
|
39
|
+
true
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
@@ -2,41 +2,49 @@ class Muck::AggregationsController < ApplicationController
|
|
2
2
|
|
3
3
|
unloadable
|
4
4
|
|
5
|
-
|
5
|
+
#before_filter :adjust_format_for_iphone
|
6
6
|
|
7
|
-
|
8
|
-
before_filter :get_owner, :only => [:index, :new, :create]
|
9
|
-
before_filter :has_permission?, :only => [:index, :new, :create]
|
7
|
+
require 'cgi'
|
10
8
|
|
11
|
-
before_filter :
|
12
|
-
before_filter :
|
9
|
+
before_filter :login_required, :except => [:index, :show, :preview, :rss_discovery]
|
10
|
+
before_filter :get_owner, :only => [:index, :preview, :new, :create]
|
11
|
+
before_filter :check_user_permissions, :only => [:create]
|
12
|
+
before_filter :get_aggregation, :only => [:destroy, :edit, :update, :show, :rss_discovery]
|
13
|
+
before_filter :has_aggregation_permission?, :only => [:destroy, :edit, :update]
|
14
|
+
before_filter :setup_feed_display_variables, :only => [:preview, :update]
|
15
|
+
def index
|
16
|
+
if @parent
|
17
|
+
@aggregations = @parent.aggregations.by_title
|
18
|
+
else
|
19
|
+
@aggregations = Aggregation.newest
|
20
|
+
end
|
21
|
+
respond_to do |format|
|
22
|
+
format.html { render(:template => 'aggregations/index') }
|
23
|
+
format.iphone { render(:template => 'aggregations/index') }
|
24
|
+
end
|
25
|
+
end
|
13
26
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
# render(:layout => 'reader') }
|
19
|
-
# format.opml { @aggregations = Aggregation.find_all_by_user_id(current_user.id, :include =>:feeds, :order => 'feeds.title ASC')
|
20
|
-
# render(:layout => false) }
|
21
|
-
# format.xml { @aggregations = Aggregation.find_all_by_user_id(current_user.id, :order => 'title ASC')
|
22
|
-
# render :xml => @aggregations }
|
23
|
-
# end
|
24
|
-
# end
|
25
|
-
#
|
26
|
-
# def manage
|
27
|
-
# @page_title = 'Manage'
|
28
|
-
# @user = current_user
|
29
|
-
# @aggregations = Aggregation.find_all_by_user_id(@user.id, :order => 'title ASC')
|
30
|
-
# respond_to do |format|
|
31
|
-
# format.html
|
32
|
-
# format.xml { render :xml => @aggregations }
|
33
|
-
# end
|
34
|
-
# end
|
27
|
+
def rss_discovery
|
28
|
+
@feeds = @aggregation.feeds
|
29
|
+
render :template => 'aggregations/rss_discovery'
|
30
|
+
end
|
35
31
|
|
36
32
|
def show
|
37
|
-
@aggregation = Aggregation.find(params[:id])
|
38
33
|
@page_title = @aggregation.title
|
39
|
-
|
34
|
+
|
35
|
+
@photo_feeds = @aggregation.photo_feeds
|
36
|
+
@video_feeds = @aggregation.video_feeds
|
37
|
+
@bookmark_feeds = @aggregation.bookmark_feeds
|
38
|
+
@music_feeds = @aggregation.music_feeds
|
39
|
+
@general_feeds = @aggregation.general_feeds
|
40
|
+
|
41
|
+
if GlobalConfig.render_feeds_client_side
|
42
|
+
|
43
|
+
elsif GlobalConfig.render_feeds_server_side
|
44
|
+
@feeds = @aggregation.feeds
|
45
|
+
else
|
46
|
+
@entries = @aggregation.feeds.entries.paginate(:page => @page, :per_page => @per_page)
|
47
|
+
end
|
40
48
|
respond_to do |format|
|
41
49
|
format.html { render(:template => 'aggregations/show') }
|
42
50
|
format.opml { render(:layout => false) }
|
@@ -44,152 +52,34 @@ class Muck::AggregationsController < ApplicationController
|
|
44
52
|
end
|
45
53
|
end
|
46
54
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
# format.xml { render :xml => @entries }
|
76
|
-
# format.rss { render(:template => 'aggregations/show', :layout => false) }
|
77
|
-
# end
|
78
|
-
# end
|
79
|
-
#
|
80
|
-
# def all_photos
|
81
|
-
# @page_title = 'View photos from all aggregations'
|
82
|
-
# @aggregation = Aggregation.new
|
83
|
-
# @aggregation.title = @page_title
|
84
|
-
# @photos = EntryImage.get_photos_for_user(params[:user_id], :limit => @per_page, :offset => (@per_page * @page))
|
85
|
-
# respond_to do |format|
|
86
|
-
# format.html { render(:template => 'aggregations/photos', :layout => false) }
|
87
|
-
# format.xml { render :xml => @photos }
|
88
|
-
# end
|
89
|
-
# end
|
90
|
-
#
|
91
|
-
# def photos
|
92
|
-
# @aggregation = Aggregation.find(params[:id])
|
93
|
-
# @page_title = "View photos from #{@aggregation.title}"
|
94
|
-
# @photos = EntryImage.get_entry_images_for_aggregation(@aggregation.id, :limit => @per_page, :offset => (@per_page * @page))
|
95
|
-
# respond_to do |format|
|
96
|
-
# format.html { render(:template => 'aggregations/photos', :layout => false) }
|
97
|
-
# format.xml { render :xml => @photos }
|
98
|
-
# end
|
99
|
-
# end
|
100
|
-
#
|
101
|
-
# def bookmarks
|
102
|
-
# @aggregation = Aggregation.find(params[:id])
|
103
|
-
# @page_title = "View bookmarks from #{@aggregation.title}"
|
104
|
-
# @entries = Entry.get_bookmarks_for_aggregation(@aggregation.id, -1, :limit => @per_page, :offset => (@per_page * @page))
|
105
|
-
# respond_to do |format|
|
106
|
-
# format.html { render(:template => 'aggregations/bookmarks', :layout => false) }
|
107
|
-
# format.xml { render :xml => @entries }
|
108
|
-
# end
|
109
|
-
# end
|
110
|
-
#
|
111
|
-
# def read_photos
|
112
|
-
# @page_title = 'View photos from read entries'
|
113
|
-
# @aggregation = Aggregation.new
|
114
|
-
# @aggregation.title = @page_title
|
115
|
-
# @photos = EntryImage.get_read_photos_for_user(params[:user_id], :limit => @per_page, :offset => (@per_page * @page)) | []
|
116
|
-
# respond_to do |format|
|
117
|
-
# format.html { render(:template => 'aggregations/photos', :layout => false) }
|
118
|
-
# format.xml { render :xml => @photos }
|
119
|
-
# end
|
120
|
-
# end
|
121
|
-
#
|
122
|
-
# def marked_photos
|
123
|
-
# @page_title = 'View photos from marked entries'
|
124
|
-
# @aggregation = Aggregation.new
|
125
|
-
# @aggregation.title = @page_title
|
126
|
-
# @photos = EntryImage.get_marked_photos_for_user(params[:user_id], :limit => @per_page, :offset => (@per_page * @page)) | []
|
127
|
-
# respond_to do |format|
|
128
|
-
# format.html { render(:template => 'aggregations/photos', :layout => false) }
|
129
|
-
# format.xml { render :xml => @photos }
|
130
|
-
# end
|
131
|
-
# end
|
132
|
-
#
|
133
|
-
# def marked
|
134
|
-
# @page_title = 'View entries that I have marked'
|
135
|
-
# @aggregation = Aggregation.new
|
136
|
-
# @aggregation.title = @page_title
|
137
|
-
# @user = User.find(params[:user_id])
|
138
|
-
#
|
139
|
-
# @rss_title = @aggregation.title
|
140
|
-
# @rss_description = 'View entries from all entries marked by ' + @user.login
|
141
|
-
#
|
142
|
-
# @entries = Entry.get_marked_entries_for_user(@user.id, :limit => @per_page, :offset => (@per_page * @page))
|
143
|
-
# respond_to do |format|
|
144
|
-
# format.html { render(:template => 'aggregations/show', :layout => false) }
|
145
|
-
# format.xml { render :xml => @entries }
|
146
|
-
# format.rss { render(:template => 'aggregations/show', :layout => false) }
|
147
|
-
# end
|
148
|
-
# end
|
149
|
-
#
|
150
|
-
# def read
|
151
|
-
# @page_title = 'View entries I have read'
|
152
|
-
# @aggregation = Aggregation.new
|
153
|
-
# @aggregation.title = @page_title
|
154
|
-
# @entries = Entry.get_entries_read_for_user(current_user.id, :limit => @per_page, :offset => (@per_page * @page))
|
155
|
-
# respond_to do |format|
|
156
|
-
# format.html { render(:template => 'aggregations/show', :layout => false) }
|
157
|
-
# format.xml { render :xml => @entries }
|
158
|
-
# end
|
159
|
-
# end
|
160
|
-
#
|
161
|
-
# def duplicate
|
162
|
-
# @page_title = 'Duplicate Aggregation'
|
163
|
-
#
|
164
|
-
# @aggregation = Aggregation.find(params[:id], :include => 'feeds')
|
165
|
-
# @new_aggregation = Aggregation.new
|
166
|
-
#
|
167
|
-
# @new_aggregation.title = @aggregation.title
|
168
|
-
# @new_aggregation.description = @aggregation.description
|
169
|
-
# @new_aggregation.user_id = current_user.id
|
170
|
-
#
|
171
|
-
# success = false
|
172
|
-
# if @new_aggregation.save
|
173
|
-
# @page_title = 'Added aggregation ' + @new_aggregation.title
|
174
|
-
# @aggregation.feeds.each do |feed|
|
175
|
-
# @new_aggregation.feeds << feed
|
176
|
-
# end
|
177
|
-
# success = true
|
178
|
-
# end
|
179
|
-
#
|
180
|
-
# respond_to do |format|
|
181
|
-
# if success
|
182
|
-
# flash[:notice] = "Successfully added the " + @new_aggregation.title + " to your aggregations"
|
183
|
-
# format.html { redirect_to(CGI::unescape(params[:return_page])) if params[:return_page] }
|
184
|
-
# format.xml { render :xml => @new_aggregation, :status => :created, :location => @new_aggregation }
|
185
|
-
# else
|
186
|
-
# flash[:notice] = "Some kind of bad thing happened when we tried to add the requested aggregation to your account. We'll look into it. If you want press the back button and try again. If that doesn't work yell at the computer for a bit, it always helps me feel better. Believe me we are just as upset about all this as you are."
|
187
|
-
# format.html
|
188
|
-
# format.xml { render :xml => @new_aggregation.errors }
|
189
|
-
# end
|
190
|
-
# end
|
191
|
-
# end
|
192
|
-
|
55
|
+
def preview
|
56
|
+
if params[:terms].blank?
|
57
|
+
flash[:error] = I18n.t('muck.raker.no_terms_error')
|
58
|
+
redirect_to new_polymorphic_url([@parent, :aggregation])
|
59
|
+
else
|
60
|
+
terms = params[:terms]
|
61
|
+
terms = terms.join(' ') if terms.is_a?(Array)
|
62
|
+
|
63
|
+
#@feeds = Service.build_feeds(terms, current_user, params[:service_ids])
|
64
|
+
|
65
|
+
@photo_feeds = Service.build_photo_feeds(terms, current_user)
|
66
|
+
@video_feeds = Service.build_video_feeds(terms, current_user)
|
67
|
+
@bookmark_feeds = Service.build_bookmark_feeds(terms, current_user)
|
68
|
+
@music_feeds = Service.build_music_feeds(terms, current_user)
|
69
|
+
@general_feeds = Service.build_general_feeds(terms, current_user)
|
70
|
+
|
71
|
+
@discovered_feeds = GoogleFeedRequest.find_feeds(terms)
|
72
|
+
@title = terms.titleize
|
73
|
+
@terms = terms
|
74
|
+
|
75
|
+
@aggregation = Aggregation.new(:title => @title, :terms => @terms)
|
76
|
+
|
77
|
+
respond_to do |format|
|
78
|
+
format.html { render :template => 'aggregations/preview' }
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
193
83
|
def new
|
194
84
|
@page_title = I18n.t('muck.raker.new_aggregation')
|
195
85
|
@service_categories = ServiceCategory.sorted.find(:all, :include => [:tag_services])
|
@@ -197,17 +87,14 @@ class Muck::AggregationsController < ApplicationController
|
|
197
87
|
format.html { render :template => 'aggregations/new' }
|
198
88
|
end
|
199
89
|
end
|
200
|
-
|
90
|
+
|
201
91
|
def create
|
202
|
-
@aggregation = Aggregation.
|
203
|
-
@
|
204
|
-
|
205
|
-
|
92
|
+
@aggregation = Aggregation.create(params[:aggregation])
|
93
|
+
@parent.aggregations << @aggregation if @parent # associate the parent if present
|
94
|
+
|
206
95
|
# build a list of feeds and associate them with the aggregation
|
207
96
|
@aggregation.add_feeds(current_user, params[:service_ids])
|
208
|
-
|
209
|
-
# associate the parent if present
|
210
|
-
@parent.aggregations << @aggregation if @parent
|
97
|
+
@aggregation.add_feeds_by_uri(current_user, params[:uris])
|
211
98
|
|
212
99
|
respond_to do |format|
|
213
100
|
flash[:notice] = I18n.t('muck.raker.add_feeds_to_aggregation', :title => @aggregation.title)
|
@@ -223,94 +110,79 @@ class Muck::AggregationsController < ApplicationController
|
|
223
110
|
end
|
224
111
|
|
225
112
|
def edit
|
226
|
-
|
227
|
-
@service_categories = ServiceCategory.sorted.find(:all, :include => [:tag_services])
|
228
|
-
@page_title = I18n.t('muck.raker.edit_aggregation_title', :title => @aggregation.title)
|
113
|
+
setup_edit
|
229
114
|
respond_to do |format|
|
230
115
|
format.html { render :template => 'aggregations/edit' }
|
231
116
|
end
|
232
117
|
end
|
233
118
|
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
119
|
+
def update
|
120
|
+
if params[:aggregation]
|
121
|
+
@aggregation.update_attributes!(params[:aggregation])
|
122
|
+
flash[:notice] = I18n.t('muck.raker.aggregation_updated')
|
123
|
+
end
|
124
|
+
@feeds = []
|
125
|
+
if params[:uri]
|
126
|
+
@feeds = Feed.feeds_from_uri(params[:uri], current_user)
|
127
|
+
@aggregation.safe_add_feeds(@feeds)
|
128
|
+
elsif params[:service_ids]
|
129
|
+
@aggregation.terms = @aggregation.terms + ",#{params[:terms]}"
|
130
|
+
@aggregation.save!
|
131
|
+
@feeds = @aggregation.add_feeds(current_user, params[:service_ids])
|
132
|
+
end
|
133
|
+
|
134
|
+
message = I18n.t('muck.raker.no_feeds_found') if @feeds.blank?
|
135
|
+
|
136
|
+
respond_to do |format|
|
137
|
+
format.html { redirect_to edit_polymorphic_url([@aggregation.ownable, @aggregation]) }
|
138
|
+
format.xml { head :ok }
|
139
|
+
format.json do
|
140
|
+
render :json => { :aggregation => @aggregation,
|
141
|
+
:feeds => @feeds,
|
142
|
+
:message => message,
|
143
|
+
:success => true,
|
144
|
+
:html => get_google_feed_html }.as_json
|
145
|
+
end
|
146
|
+
end
|
147
|
+
rescue ActiveRecord::RecordInvalid => ex
|
148
|
+
respond_to do |format|
|
149
|
+
format.html do
|
150
|
+
setup_edit
|
151
|
+
render :template => "aggregations/edit"
|
152
|
+
end
|
153
|
+
format.json { render :json => { :aggregation => @aggregation,
|
154
|
+
:feeds => @feeds,
|
155
|
+
:message => ex.to_s,
|
156
|
+
:success => false,
|
157
|
+
:html => '' }.as_json }
|
158
|
+
format.xml { render :xml => @aggregation.errors }
|
159
|
+
end
|
160
|
+
end
|
259
161
|
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
# else
|
270
|
-
# notice = @feed.title + ' is already a part of ' + @aggregation.title
|
271
|
-
# end
|
272
|
-
#
|
273
|
-
# respond_to do |format|
|
274
|
-
# if params[:search_terms]
|
275
|
-
# redirect_path = url_for({:controller => 'feeds', :action => 'search', :aggregation_id => @aggregation, :id => @feed, :search_terms => params[:search_terms]})
|
276
|
-
# else
|
277
|
-
# redirect_path = aggregation_feeds_url(@aggregation)
|
278
|
-
# end
|
279
|
-
#
|
280
|
-
# if @aggregation.save
|
281
|
-
# flash[:notice] = notice
|
282
|
-
# format.html { redirect_to(redirect_path) }
|
283
|
-
# format.xml { render :xml => @aggregation, :status => :added_feed, :location => @aggregation }
|
284
|
-
# else
|
285
|
-
# flash[:notice] = 'Could not add ' + @feed.title + ' to ' + @aggregation.title
|
286
|
-
# format.html { redirect_to(redirect_path) }
|
287
|
-
# format.xml { render :xml => @aggregation.errors }
|
288
|
-
# end
|
289
|
-
# end
|
290
|
-
# end
|
291
|
-
#
|
292
|
-
# #disassciates a feed from an aggregation
|
293
|
-
# def remove_feed
|
294
|
-
# @aggregation = Aggregation.find(params[:id])
|
295
|
-
# @feed = Feed.find(params[:feed_id])
|
296
|
-
# @aggregation.feeds.delete(@feed)
|
297
|
-
# respond_to do |format|
|
298
|
-
# if @aggregation.save
|
299
|
-
# flash[:notice] = @feed.title + ' was successfully removed from ' + @aggregation.title
|
300
|
-
# format.html { redirect_to(aggregation_feeds_path(@aggregation)) }
|
301
|
-
# format.xml { render :xml => @aggregation, :status => :removed_feed, :location => @aggregation }
|
302
|
-
# else
|
303
|
-
# flash[:notice] = 'Could not remove ' + @feed.title + ' from ' + @aggregation.title
|
304
|
-
# format.html { redirect_to(aggregation_feeds_path(@aggregation)) }
|
305
|
-
# format.xml { render :xml => @aggregation.errors }
|
306
|
-
# end
|
307
|
-
# end
|
308
|
-
# end
|
162
|
+
def destroy
|
163
|
+
@aggregation = Aggregation.find(params[:id])
|
164
|
+
@aggregation.destroy
|
165
|
+
respond_to do |format|
|
166
|
+
flash[:notice] = I18n.t('muck.raker.aggregation_deleted', :title => @aggregation.title)
|
167
|
+
format.html { redirect_to polymorphic_url([@aggregation.ownable, :aggregations]) }
|
168
|
+
format.xml { head :ok }
|
169
|
+
end
|
170
|
+
end
|
309
171
|
|
310
172
|
protected
|
311
173
|
|
174
|
+
def setup_edit
|
175
|
+
@feeds = @aggregation.all_feeds
|
176
|
+
setup_feed_display_variables
|
177
|
+
@service_categories = ServiceCategory.sorted.find(:all, :include => [:tag_services])
|
178
|
+
@page_title = I18n.t('muck.raker.edit_aggregation_title', :title => @aggregation.title)
|
179
|
+
end
|
180
|
+
|
312
181
|
def get_owner
|
313
182
|
@parent = get_parent
|
183
|
+
end
|
184
|
+
|
185
|
+
def check_user_permissions
|
314
186
|
unless has_permission?
|
315
187
|
permission_denied
|
316
188
|
end
|
@@ -340,5 +212,23 @@ class Muck::AggregationsController < ApplicationController
|
|
340
212
|
@parent.can_edit?(current_user)
|
341
213
|
end
|
342
214
|
end
|
215
|
+
|
216
|
+
def setup_feed_display_variables
|
217
|
+
@show_controls = show_controls?
|
218
|
+
@number_of_items = 4
|
219
|
+
@number_of_images = 6
|
220
|
+
@number_of_videos = 6
|
221
|
+
end
|
222
|
+
|
223
|
+
# determines whether or not to show admin controls (ie save aggregation)
|
224
|
+
def show_controls?
|
225
|
+
logged_in?
|
226
|
+
end
|
227
|
+
|
228
|
+
def get_google_feed_html
|
229
|
+
render_as_html do
|
230
|
+
render_to_string(:partial => 'aggregations/feeds')
|
231
|
+
end
|
232
|
+
end
|
343
233
|
|
344
234
|
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
class Muck::TopicsController < ApplicationController
|
2
|
+
unloadable
|
3
|
+
|
4
|
+
before_filter :adjust_format_for_iphone
|
5
|
+
before_filter :check_terms, :except => [:new]
|
6
|
+
before_filter :build_feeds, :only => [:show, :rss_discovery]
|
7
|
+
|
8
|
+
def show
|
9
|
+
respond_to do |format|
|
10
|
+
format.html do
|
11
|
+
@opml_path = topic_path(params[:id], :service_ids => params[:service_ids], :format => 'opml')
|
12
|
+
render :template => 'topics/show'
|
13
|
+
end
|
14
|
+
format.opml { render :template => 'topics/show' }
|
15
|
+
format.iphone { render :template => 'topics/show' }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def rss_discovery
|
20
|
+
render :template => 'aggregations/rss_discovery'
|
21
|
+
end
|
22
|
+
|
23
|
+
def photos
|
24
|
+
@terms = CGI.unescape(params[:id])
|
25
|
+
@page_title = @title = @terms.titleize
|
26
|
+
@photo_feeds = Service.build_photo_feeds(@terms, current_user, params[:service_ids])
|
27
|
+
@number_of_images = 36
|
28
|
+
respond_to do |format|
|
29
|
+
format.html do
|
30
|
+
render :template => 'topics/photos'
|
31
|
+
end
|
32
|
+
format.iphone { render :template => 'topics/photos' }
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def videos
|
37
|
+
@terms = CGI.unescape(params[:id])
|
38
|
+
@page_title = @title = @terms.titleize
|
39
|
+
@videos_feeds = Service.build_video_feeds(@terms, current_user, params[:service_ids])
|
40
|
+
@number_of_videos = 36
|
41
|
+
respond_to do |format|
|
42
|
+
format.html do
|
43
|
+
render :template => 'topics/videos'
|
44
|
+
end
|
45
|
+
format.iphone { render :template => 'topics/videos' }
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def new
|
50
|
+
@page_title = I18n.t('muck.raker.new_topic_title')
|
51
|
+
@service_categories = ServiceCategory.sorted.find(:all, :include => [:tag_services])
|
52
|
+
respond_to do |format|
|
53
|
+
format.html { render :template => 'topics/new' }
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def create
|
58
|
+
@terms = CGI.escape(params[:terms])
|
59
|
+
respond_to do |format|
|
60
|
+
format.html { redirect_to topic_path(@terms, :service_ids => params[:service_ids]) }
|
61
|
+
format.opml { redirect_to topic_path(@terms, :service_ids => params[:service_ids], :format => 'opml') }
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
protected
|
66
|
+
|
67
|
+
def check_terms
|
68
|
+
if params[:id].blank? && params[:terms].blank?
|
69
|
+
flash[:error] = I18n.t('muck.raker.no_terms_error')
|
70
|
+
redirect_to new_topic_path
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
def build_feeds
|
75
|
+
@terms = CGI.unescape(params[:id])
|
76
|
+
@page_title = @title = @terms.titleize
|
77
|
+
|
78
|
+
@photo_feeds = Service.build_photo_feeds(@terms, current_user, params[:service_ids])
|
79
|
+
@video_feeds = Service.build_video_feeds(@terms, current_user, params[:service_ids])
|
80
|
+
@bookmark_feeds = Service.build_bookmark_feeds(@terms, current_user, params[:service_ids])
|
81
|
+
@music_feeds = Service.build_music_feeds(@terms, current_user, params[:service_ids])
|
82
|
+
@general_feeds = Service.build_general_feeds(@terms, current_user, params[:service_ids])
|
83
|
+
|
84
|
+
@discovered_feeds = GoogleFeedRequest.find_feeds(@terms)
|
85
|
+
|
86
|
+
@feeds = @photo_feeds + @video_feeds + @bookmark_feeds + @music_feeds + @general_feeds + @discovered_feeds
|
87
|
+
|
88
|
+
@number_of_items = 6
|
89
|
+
@number_of_images = 12
|
90
|
+
@number_of_videos = 6
|
91
|
+
end
|
92
|
+
|
93
|
+
end
|
@@ -8,4 +8,25 @@ module MuckRakerAggregationsHelper
|
|
8
8
|
true
|
9
9
|
end
|
10
10
|
|
11
|
+
def feed_preview(feeds, discovered_feeds, related_title = nil, number_of_items = 5, number_of_images = 20, content_id = nil)
|
12
|
+
render :partial => 'topics/feed_preview', :locals => {:feeds => feeds,
|
13
|
+
:related_title => related_title,
|
14
|
+
:discovered_feeds => discovered_feeds,
|
15
|
+
:number_of_items => number_of_items,
|
16
|
+
:number_of_images => number_of_images,
|
17
|
+
:content_id => content_id }
|
18
|
+
end
|
19
|
+
|
20
|
+
def aggregation_parent_name(parent)
|
21
|
+
if @parent
|
22
|
+
"#{@parent.to_s.underscore}"
|
23
|
+
else
|
24
|
+
'Aggregation'
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def topics_form
|
29
|
+
render :partial => 'topics/form'
|
30
|
+
end
|
31
|
+
|
11
32
|
end
|
@@ -11,18 +11,6 @@ module MuckRakerFeedsHelper
|
|
11
11
|
feeds_path(options)
|
12
12
|
end
|
13
13
|
end
|
14
|
-
|
15
|
-
def new_aggregation_path_with_parent(parent, options = {})
|
16
|
-
if parent
|
17
|
-
aggregations_path(make_parent_params(parent).merge(options))
|
18
|
-
else
|
19
|
-
aggregations_path(options)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
def make_parent_params(parent)
|
24
|
-
{ :parent_id => parent.id, :parent_type => parent.class.to_s }
|
25
|
-
end
|
26
14
|
|
27
15
|
def feed_contributor_link(feed)
|
28
16
|
if feed.contributor_id.nil?
|