Skip to content
Browse files

student mobile profile

  • Loading branch information...
1 parent 8993fc7 commit 03f9802bad35b00a00ccdc3012c033c3c4bdd5cd @croaky croaky committed
View
4 app/controllers/designers_controller.rb
@@ -2,4 +2,8 @@ class DesignersController < MobileController
def index
@designers = Registration.designers
end
+
+ def show
+ @designer = Registration.find(params[:id])
+ end
end
View
4 app/controllers/developers_controller.rb
@@ -2,4 +2,8 @@ class DevelopersController < MobileController
def index
@developers = Registration.developers
end
+
+ def show
+ @developer = Registration.find(params[:id])
+ end
end
View
2 app/views/designers/index.mobile.erb
@@ -5,7 +5,7 @@
<ul data-role="listview">
<% @designers.each do |designer| %>
- <li><%= designer.name %></li>
+ <li><%= link_to designer.name, designer_path(designer) %></li>
<% end %>
</ul>
</div>
View
12 app/views/designers/show.mobile.erb
@@ -0,0 +1,12 @@
+<div data-role="page">
+ <div data-role="header">
+ <h1><%= @designer.name %></h1>
+ </div>
+
+ <div data-role="content" class="ui-content" role="main">
+ <%= twitter_avatar @designer.twitter, 73 %>
+
+ <h3><%= @designer.role %></h3>
+ <h4><%= @designer.school_name %></h4>
+ </div>
+</div>
View
2 app/views/developers/index.mobile.erb
@@ -5,7 +5,7 @@
<ul data-role="listview">
<% @developers.each do |developer| %>
- <li><%= developer.name %></li>
+ <li><%= link_to developer.name, developer_path(developer) %></li>
<% end %>
</ul>
</div>
View
12 app/views/developers/show.mobile.erb
@@ -0,0 +1,12 @@
+<div data-role="page">
+ <div data-role="header">
+ <h1><%= @developer.name %></h1>
+ </div>
+
+ <div data-role="content" class="ui-content" role="main">
+ <%= twitter_avatar @developer.twitter, 73 %>
+
+ <h3><%= @developer.role %></h3>
+ <h4><%= @developer.school_name %></h4>
+ </div>
+</div>
View
4 config/routes.rb
@@ -3,8 +3,8 @@
resources :registrations, :only => [:index, :new]
resources :talks, :only => [:index, :show]
- resources :designers, :only => [:index]
- resources :developers, :only => [:index]
+ resources :designers, :only => [:index, :show]
+ resources :developers, :only => [:index, :show]
resources :startups, :only => [:index, :show]
resources :opportunities, :only => [:index]
resources :schools, :only => [:index]
View
6 public/stylesheets/mobile.css
@@ -71,3 +71,9 @@ ul .ui-btn-text {
.description-field, .partying-field {
clear: both; }
+
+div.avatar {
+ background: url("/images/default-avatar-lg.png") no-repeat;
+ display: inline-block;
+ height: 73px;
+ width: 73px; }
View
7 public/stylesheets/sass/mobile.scss
@@ -110,3 +110,10 @@ ul .ui-btn-text {
.description-field, .partying-field {
clear: both;
}
+
+div.avatar {
+ background: url('/images/default-avatar-lg.png') no-repeat;
+ display: inline-block;
+ height: 73px;
+ width: 73px;
+}

0 comments on commit 03f9802

Please sign in to comment.
Something went wrong with that request. Please try again.