Browse files

extend basic mobile menu

  • Loading branch information...
1 parent c0379ea commit 2849d000381b53a890a3c16c3cce2900a26be175 @tardate committed Oct 23, 2011
View
16 app/views/dashboards/menu.mobile.haml
@@ -6,6 +6,22 @@
%li
%a
%img.icon.greenbox{ :src => "/images/mobile/tabs/flag.png" }
+ = t('stats.top_memes.title', :n => AppConstants.number_of_trending_memes)
+ %span.arrow
+ %li
+ %a
+ %img.icon.greenbox{ :src => "/images/mobile/tabs/aim.png" }
+ = t('memes.index.title')
+ %span.arrow
+ %li
+ %a
+ %img.icon.greenbox{ :src => "/images/mobile/tabs/note.png" }
+ = t('shows.index.title')
+ %span.arrow
+ %li
+ %a.touch_load{'data-url' => technoexperts_path}
+ %img.icon.greenbox{ :src => "/images/mobile/tabs/info.png" }
+ = t('pages.technoexperts.title')
%span.arrow
%h2= t('book_of_knowledge')
View
2 app/views/memes/_table.html.haml
@@ -14,7 +14,7 @@
%tbody
- unless ajax
- - for item in collection do
+ - collection.each do |item|
%tr
%td= item.name
%td= item.notes.count
View
43 app/views/pages/_technoexperts.html.haml
@@ -0,0 +1,43 @@
+.panel
+ .wrapper
+ %h2 TECHNO EXPERTS!!
+ %p
+ The NoAgenda Dashboard works best on late model Chrome/Firefox/Safari/IE browsers
+ It also works pretty darn good on the iPad. A special version for Android and iPhone devices
+ is in the works.
+ %p
+ We're currently only loading show details since show number
+ = AppConstants.earliest_show_to_load
+ but will add earlier shows when possible (it requires some figuring out of different shownote archive structures).
+ %p
+ If you have any issues with this app, or any suggestions to make, you can post them on the
+ %a{:href=>'https://github.com/tardate/noagenda_dashboard/issues', :target=>'_blank'}github project issues
+ page.
+ %p
+ The app is fully open-source. If you'd like to help with any design, development, or
+ internationalization (translations), you are most welcome. Come see the project on
+ %a{:href=>'https://github.com/tardate/noagenda_dashboard', :target=>'_blank'}Github
+
+ %h2 The API
+ %p
+ Yes, the app has a simple REST API to get at the underlying data: show, meme and shownotes data.
+ You are welcome to slurp on the API if you are building something else and want a dead simple way
+ of getting all the show details in an organized fashion.
+ %p
+ Here's a quick run down of some of the main data sets available.
+ These examples show requests for json format data.
+ You can get data in XML if you prefer - simply replace .json with .xml
+ %ul
+ %li http://noagendadashboard.com/shows.json - gets all the shows
+ %li http://noagendadashboard.com/shows/333.json - gets show number 333 (for example)
+ %li http://noagendadashboard.com/shows/333/memes.json - gets all the memes on show number 333
+ %li http://noagendadashboard.com/shows/333/notes.json - gets all the notes for show number 333
+ %li http://noagendadashboard.com/memes.json - gets all the memes
+ %li http://noagendadashboard.com/memes/1/notes.json - gets all the notes for meme #1
+ %li http://noagendadashboard.com/notes.json - gets all the notes
+ %p
+ There's more we can do with the API (e.g. searching), but currently incomplete and/or nodoc;-)
+ %p
+ If you need something more from the API, or there are any problems, then drop by the
+ %a{:href=>'https://github.com/tardate/noagenda_dashboard/issues', :target=>'_blank'}github project issues
+ page and we can discuss.
View
44 app/views/pages/technoexperts.html.haml
@@ -1,43 +1 @@
-.panel
- .wrapper
- %h2 TECHNO EXPERTS!!
- %p
- The NoAgenda Dashboard works best on late model Chrome/Firefox/Safari/IE browsers
- It also works pretty darn good on the iPad. A special version for Android and iPhone devices
- is in the works.
- %p
- We're currently only loading show details since show number
- = AppConstants.earliest_show_to_load
- but will add earlier shows when possible (it requires some figuring out of different shownote archive structures).
- %p
- If you have any issues with this app, or any suggestions to make, you can post them on the
- %a{:href=>'https://github.com/tardate/noagenda_dashboard/issues', :target=>'_blank'}github project issues
- page.
- %p
- The app is fully open-source. If you'd like to help with any design, development, or
- internationalization (translations), you are most welcome. Come see the project on
- %a{:href=>'https://github.com/tardate/noagenda_dashboard', :target=>'_blank'}Github
-
- %h2 The API
- %p
- Yes, the app has a simple REST API to get at the underlying data: show, meme and shownotes data.
- You are welcome to slurp on the API if you are building something else and want a dead simple way
- of getting all the show details in an organized fashion.
- %p
- Here's a quick run down of some of the main data sets available.
- These examples show requests for json format data.
- You can get data in XML if you prefer - simply replace .json with .xml
- %ul
- %li http://noagendadashboard.com/shows.json - gets all the shows
- %li http://noagendadashboard.com/shows/333.json - gets show number 333 (for example)
- %li http://noagendadashboard.com/shows/333/memes.json - gets all the memes on show number 333
- %li http://noagendadashboard.com/shows/333/notes.json - gets all the notes for show number 333
- %li http://noagendadashboard.com/memes.json - gets all the memes
- %li http://noagendadashboard.com/memes/1/notes.json - gets all the notes for meme #1
- %li http://noagendadashboard.com/notes.json - gets all the notes
- %p
- There's more we can do with the API (e.g. searching), but currently incomplete and/or nodoc;-)
- %p
- If you need something more from the API, or there are any problems, then drop by the
- %a{:href=>'https://github.com/tardate/noagenda_dashboard/issues', :target=>'_blank'}github project issues
- page and we can discuss.
+= render :partial => 'pages/technoexperts'
View
1 app/views/pages/technoexperts.mobile.haml
@@ -0,0 +1 @@
+= render :partial => 'pages/technoexperts.html'
View
4 app/views/shows/_table.html.haml
@@ -12,11 +12,9 @@
%th= resource_class.human_attribute_name :name
%th= resource_class.human_attribute_name :memes_count
%th= resource_class.human_attribute_name :notes_count
-
-
%tbody
- unless ajax
- - for item in collection do
+ - collection.each do |item|
%tr
%td= link_to(item.short_title, [item])
%td= item.name
View
5 config/locales/en.yml
@@ -44,6 +44,8 @@ en:
donor:
title: Be a Donor not a Boner!
memes:
+ index:
+ title: Memes
show:
title: '%{name}: Trend by Show (Hits in the Mouth)'
notes:
@@ -53,6 +55,9 @@ en:
technoexperts:
title: TECHNO EXPERTS
play: Play Now
+ shows:
+ index:
+ title: Shows
site:
title: NoAgenda Attack Vector Dashboard
show_title: NoAgenda Show
View
19 spec/controllers/dashboards/mobile_spec.rb
@@ -0,0 +1,19 @@
+require 'spec_helper'
+
+describe DashboardsController do
+ render_views
+ before do
+ Browser.any_instance.stub(:iphone?).and_return(true)
+ end
+
+ describe "GET show" do
+ subject { get :show }
+ it { should be_success }
+ end
+
+ describe "GET menu" do
+ subject { get :menu }
+ it { should be_success }
+ end
+
+end
View
22 spec/controllers/pages/mobile_spec.rb
@@ -0,0 +1,22 @@
+require 'spec_helper'
+
+describe PagesController do
+ render_views
+ before do
+ Browser.any_instance.stub(:iphone?).and_return(true)
+ end
+
+ [:technoexperts].each do |page|
+ describe page do
+ describe "GET" do
+ subject { get page }
+ it { should be_success }
+ end
+ describe "XHR GET" do
+ subject { xhr :get, page }
+ it { should be_success }
+ end
+ end
+ end
+
+end

0 comments on commit 2849d00

Please sign in to comment.