Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
extend basic mobile menu
Browse files Browse the repository at this point in the history
  • Loading branch information
tardate committed Oct 23, 2011
1 parent c0379ea commit 2849d00
Show file tree
Hide file tree
Showing 9 changed files with 109 additions and 47 deletions.
16 changes: 16 additions & 0 deletions app/views/dashboards/menu.mobile.haml
Expand Up @@ -6,6 +6,22 @@
%li %li
%a %a
%img.icon.greenbox{ :src => "/images/mobile/tabs/flag.png" } %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 %span.arrow


%h2= t('book_of_knowledge') %h2= t('book_of_knowledge')
Expand Down
2 changes: 1 addition & 1 deletion app/views/memes/_table.html.haml
Expand Up @@ -14,7 +14,7 @@


%tbody %tbody
- unless ajax - unless ajax
- for item in collection do - collection.each do |item|
%tr %tr
%td= item.name %td= item.name
%td= item.notes.count %td= item.notes.count
43 changes: 43 additions & 0 deletions 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.
44 changes: 1 addition & 43 deletions app/views/pages/technoexperts.html.haml
@@ -1,43 +1 @@
.panel = render :partial => 'pages/technoexperts'
.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.
1 change: 1 addition & 0 deletions app/views/pages/technoexperts.mobile.haml
@@ -0,0 +1 @@
= render :partial => 'pages/technoexperts.html'
4 changes: 1 addition & 3 deletions app/views/shows/_table.html.haml
Expand Up @@ -12,11 +12,9 @@
%th= resource_class.human_attribute_name :name %th= resource_class.human_attribute_name :name
%th= resource_class.human_attribute_name :memes_count %th= resource_class.human_attribute_name :memes_count
%th= resource_class.human_attribute_name :notes_count %th= resource_class.human_attribute_name :notes_count


%tbody %tbody
- unless ajax - unless ajax
- for item in collection do - collection.each do |item|
%tr %tr
%td= link_to(item.short_title, [item]) %td= link_to(item.short_title, [item])
%td= item.name %td= item.name
Expand Down
5 changes: 5 additions & 0 deletions config/locales/en.yml
Expand Up @@ -44,6 +44,8 @@ en:
donor: donor:
title: Be a Donor not a Boner! title: Be a Donor not a Boner!
memes: memes:
index:
title: Memes
show: show:
title: '%{name}: Trend by Show (Hits in the Mouth)' title: '%{name}: Trend by Show (Hits in the Mouth)'
notes: notes:
Expand All @@ -53,6 +55,9 @@ en:
technoexperts: technoexperts:
title: TECHNO EXPERTS title: TECHNO EXPERTS
play: Play Now play: Play Now
shows:
index:
title: Shows
site: site:
title: NoAgenda Attack Vector Dashboard title: NoAgenda Attack Vector Dashboard
show_title: NoAgenda Show show_title: NoAgenda Show
Expand Down
19 changes: 19 additions & 0 deletions 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
22 changes: 22 additions & 0 deletions 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.