Skip to content

Commit

Permalink
Merge pull request #5 from optikfluffel/city-selection
Browse files Browse the repository at this point in the history
City selection
  • Loading branch information
birtona committed Nov 16, 2013
2 parents a4ff8ec + 7845ce0 commit 0b8d663
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 50 deletions.
5 changes: 1 addition & 4 deletions app/controllers/home_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ def index
def role_model
end

def search
end

def thanks
end

def already
end
end

def about
end
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/oauth_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ def sign_up
session[:secret] = request_token.secret
# print request_token
redirect_to request_token.authorize_url
end
end

def callback
request_token = OAuth::RequestToken.new(@consumer, session[:token], session[:secret])
access_token = request_token.get_access_token(:oauth_verifier => params[:oauth_verifier])
access_token = request_token.get_access_token(:oauth_verifier => params[:oauth_verifier])

result = access_token.request(:get, "https://api.xing.com/v1/users/me")
user = JSON.parse(result.body)
Expand Down Expand Up @@ -46,5 +46,5 @@ def set_consumer
:access_token_path => "/v1/access_token"
})
end

end
8 changes: 4 additions & 4 deletions app/views/home/about.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@

<div class="col-md-12 col-sm-12 col-xs-12">
<p>
„Rent a Role Model“ verbindet LehrerInnen mit weiblichen Vorbildern aus der IT-Branche. Lehrerinnen ohne Netzwerk in der IT-Branche finden hier Frauen, die gerne an Schulen über ihren Berufsalltag erzählen würden. Die Role Models sollen Schüler und Schülerinnen zu einer Karriere in der IT inspirieren. Die Vorbilder sind weiblich, um vor allen den Mädchen die Angst vor technischen Berufen zu nehmen.
„Rent a Role Model“ verbindet LehrerInnen mit weiblichen Vorbildern aus der IT-Branche. Lehrerinnen ohne Netzwerk in der IT-Branche finden hier Frauen, die gerne an Schulen über ihren Berufsalltag erzählen würden. Die Role Models sollen Schüler und Schülerinnen zu einer Karriere in der IT inspirieren. Die Vorbilder sind weiblich, um vor allen den Mädchen die Angst vor technischen Berufen zu nehmen.
</p>

<p>
Die Idee für „Rent a Role Model” stammt von <%= link_to "Birte Goldt", "https://twitter.com/birtona" %>. Im Rahmen des Berlin Geekettes All Women-Hackathon im Oktober 2013 haben wir – <%= link_to "Debora Blass", "https://twitter.com/bumbledebee" %>, <%= link_to "Bettina Shzu-Juraschek", "https://twitter.com/ThatBettina" %>, <%= link_to "Joan Wolkerstorfer", "https://twitter.com/joanwolk" %>, und <%= link_to "Kathrin Kaufmann", "https://twitter.com/kommanderkat" %> – gemeinsam mit Birte die vorliegende Alpha-Version umgesetzt.
Die Idee für „Rent a Role Model” stammt von <%= link_to "Birte Goldt", "https://twitter.com/birtona" %>. Im Rahmen des Berlin Geekettes All Women-Hackathon im Oktober 2013 haben wir – <%= link_to "Debora Blass", "https://twitter.com/bumbledebee" %>, <%= link_to "Bettina Shzu-Juraschek", "https://twitter.com/ThatBettina" %>, <%= link_to "Joan Wolkerstorfer", "https://twitter.com/joanwolk" %>, und <%= link_to "Kathrin Kaufmann", "https://twitter.com/kommanderkat" %> – gemeinsam mit Birte die vorliegende Alpha-Version umgesetzt.
</p>

<p>
Wer Interesse hat, an der Weiterentwicklung von „Rent a Role Model” mitzuarbeiten, findet uns <%= link_to "auf Github", "https://github.com/birtona/rent-a-role-model" %>.
Wer Interesse hat, an der Weiterentwicklung von „Rent a Role Model” mitzuarbeiten, findet uns <%= link_to "auf Github", "https://github.com/birtona/rent-a-role-model" %>.
</p>

</p>
</div>

Expand Down
6 changes: 3 additions & 3 deletions app/views/home/already.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="container col-md-12">
<h1 class="text-center">

<%= link_to "Wir finden es wirklich cool, dich in unserer Datenbank zu haben !", home_search_path, class: 'btn btn-primary btn-block' %>
<%= link_to "Wir finden es wirklich cool, dich in unserer Datenbank zu haben !", users_path, class: 'btn btn-primary btn-block' %>

<%= link_to "Sieh dir andere Role Models an", home_search_path, class: 'btn btn-primary btn-block' %>
</div>
<%= link_to "Sieh dir andere Role Models an", users_path, class: 'btn btn-primary btn-block' %>
</div>
3 changes: 1 addition & 2 deletions app/views/home/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<p class="justified">
Du unterrichtest in der Oberstufe und suchst nach Frauen in Tech-Berufen als Vorbild für deine Schülerinnen? Mit „Rent a Role Model” kannst du nach Frauen in deiner Stadt suchen, die Schülerinnen bei der Berufsorientierung unterstützen möchten.
</p>
<%= link_to "Ich suche ein Role Model", home_search_path, class: 'btn btn-primary btn-block' %>
<%= link_to "Ich suche ein Role Model", users_path, class: 'btn btn-primary btn-block' %>

</div>

Expand Down Expand Up @@ -40,4 +40,3 @@
</div>
</div>
</div>

2 changes: 1 addition & 1 deletion app/views/home/role_model.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
<div class="col-md-3">
</div>
</div>
</div>
</div>
22 changes: 0 additions & 22 deletions app/views/home/search.html.erb

This file was deleted.

9 changes: 3 additions & 6 deletions app/views/home/thanks.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@



<div class="container col-md-12">
<h1 class="text-center">

<%= link_to "Danke für deine Anmeldung!", home_search_path, class: 'btn btn-primary btn-block' %>
<%= link_to "Danke für deine Anmeldung!", users_path, class: 'btn btn-primary btn-block' %>

<%= link_to "Sieh dir andere Role Models an", home_search_path, class: 'btn btn-primary btn-block' %>
</div>
<%= link_to "Sieh dir andere Role Models an", users_path, class: 'btn btn-primary btn-block' %>
</div>
27 changes: 26 additions & 1 deletion app/views/users/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
<div class="container user-index">
<h1 class="text-center"><%= @city %> Role Models</h1>
<h1 class="text-center">
<% if @city.nil? %>
Suche nach einem Role Model in deiner Stadt!
<% else %>
<%= @city %> Role Models
<% end %>
</h1>

<% if @city.nil? %>
<div class="row">
<div class="col-md-6 col-sm-6 col-xs-12 padded-bottom">
<%= link_to "Role Models in Berlin",
users_path(city: "Berlin"),
class: "btn btn-primary btn-block"
%>
</div>

<div class="col-md-6 col-sm-6 col-xs-12 padded-bottom">
<%= link_to "Role Models in Hamburg",
users_path(city: "Hamburg"),
class: "btn btn-primary btn-block"
%>
</div>
</div>
<% end %>

<% @users.each do |user| %>
<div class="role-model pull-left clearfix col-md-2">
<%= link_to user_path(user) do %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/users/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<p class="profile" > <%= @user.job %>
<br>
<%= @user.city %> </p>
<br>
<%=link_to @user.xing_profile, class: "btn btn-default btn-lg white_button" do %>
<br>
<%=link_to @user.xing_profile, class: "btn btn-default btn-lg white_button" do %>
<%= image_tag('https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQD1lCGSiROaXVJyx1h1CfkuZsiO80_RMyEo1GXCulFXQmUFDGi', width: 20) %> Xing-Profil ansehen
<% end %>
<br>
Expand Down
3 changes: 1 addition & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
get "home/index"
get "home/role_model"
get "home/thanks"
get "home/search"
get "home/already"
get "home/about", as: :about
# The priority is based upon order of creation: first created -> highest priority.
Expand Down Expand Up @@ -47,7 +46,7 @@
# get 'recent', on: :collection
# end
# end

# Example resource route with concerns:
# concern :toggleable do
# post 'toggle'
Expand Down

0 comments on commit 0b8d663

Please sign in to comment.