Permalink
Browse files

Ok with all

  • Loading branch information...
1 parent 75a560e commit 828b8d9f214ec57ce092235ee67291ba2691c60a @panagiotis2011 committed Apr 23, 2012
@@ -14,7 +14,7 @@ def coderay_dressed(text)
def gravatar(email, size)
gravatar_id = Digest::MD5::hexdigest(email).downcase
- "http://gravatar.com/avatar/#{gravatar_id}.png?s=#{size}&d=mm"
+ "http://gravatar.com/avatar/#{gravatar_id}.png?s=#{size}&d=identicon"
end
def auth_path
@@ -14,7 +14,11 @@ module ApplicationHelper
def gravatar(email, size)
gravatar_id = Digest::MD5::hexdigest(email).downcase
- "http://gravatar.com/avatar/#{gravatar_id}.png?s=#{size}&d=mm"
+ "http://gravatar.com/avatar/#{gravatar_id}.png?s=#{size}&d=http%3A%2F%2Fexample.com%2Fimages%2Favatar.jpg"
+ end
+
+ def auth_path
+ '/auth/twitter'
end
end
View
@@ -1,4 +1,4 @@
class Service < ActiveRecord::Base
belongs_to :student
- attr_accessible :provider, :uid, :uname, :uemail
+ attr_accessible :provider, :uid, :uname, :uemail, :token
end
@@ -29,7 +29,7 @@
<div class="field">
<label for="article_body">Το άρθρο σας (Μετατρέψτε το απλό κείμενο σε html - <%= link_to "Περισσότερα εδώ!", 'http://redcloth.org' %>)</label><br />
- <%= f.text_area :body, :size => "100%x40", :class => "fullwidth" %>
+ <%= f.text_area :body, :size => "100%x15", :class => "fullwidth" %>
</div>
<div class="field">
@@ -29,7 +29,7 @@
<div class="field">
<label for="article_body">Το άρθρο σας (Μετατρέψτε το απλό κείμενο σε html - <%= link_to "Περισσότερα εδώ!", 'http://redcloth.org' %>)</label><br />
- <%= f.text_area :body, :size => "100%x40", :class => "fullwidth" %>
+ <%= f.text_area :body, :size => "100%x20", :class => "fullwidth" %>
</div>
<div class="field">
@@ -40,7 +40,6 @@
<div class="actions">
<%= f.submit :class => "awesome custom red" %>
<%= link_to 'Εμφάνιση αυτού του άρθρου', @article, :class => "awesome custom black" %>
- <span class="Δημοσίευση"><%= link_to 'Δημοσίευση στο Facebook', article, :class => "awesome custom red" %></span>
<%= link_to 'Επιστροφή στα άρθρα μου', myarticles_articles_path, :class => "awesome custom black" %>
</div>
@@ -1,8 +1,4 @@
-
-
<section id = "articles">
-
-
<% @articles.each do |article| %>
<article class="article">
<ul class="stars floatstars">
@@ -78,7 +78,7 @@
</div>
<div>
<%= form_for [@article, current_student.comments.new] do |f| %>
- <%= f.text_area :body, :size => "100%x20", :class => "fullwidth" %>
+ <%= f.text_area :body, :size => "100%x10", :class => "fullwidth" %>
<%= f.submit "Πρόσθεσε σχόλιο", :class => "awesome custom red" %>
<% end %>
</div>
@@ -9,7 +9,7 @@
<div class="byline">Γράφτηκε από: <%= link_to @article.student.fullname, "" %></div>
- <div class="byline">Γράφτηκε από: <%= @student.lesson.name %></div>
+
<div class="avatar"><%= image_tag gravatar(@article.student.email, 64) %></div>
@@ -1,5 +1,5 @@
<section id="deviseauth">
-<h2>Είσοδος</h2>
+<h2>Είσοδος χρήστη</h2>
<div id="local" class="box">
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
<div><%= f.label :email %><br />
@@ -1,42 +1,31 @@
<section id="deviseauth">
-
<h2>Είσοδος</h2>
-
-
-
- <div id="local" class="box">
-<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
- <div><%= f.label :email %><br />
- <%= f.email_field :email %></div>
-
- <div><%= f.label :password %><br />
- <%= f.password_field :password %></div>
-
- <% if devise_mapping.rememberable? -%>
- <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
- <% end %>
-
- <div><%= f.submit "Είσοδος" %></div>
-<% end %>
- </div>
-
- <div id="remote">
- <div id="terms" class="box">
- <%= link_to "Υπηρεσίες δικτύωσης", "#" %>
- </div>
- <div id="services" class="box">
- <a href="/auth/facebook" class="services"><%= image_tag "facebook_64.png", :size => "64x64", :alt => "Facebook" %>Facebook</a>
- <a href="/auth/twitter" class="services"><%= image_tag "twitter_64.png", :size => "64x64", :alt => "Twitter" %>Twitter</a>
- <a href="/auth/google" class="services"><%= image_tag "google_64.png", :size => "64x64", :alt => "Google" %>Google</a>
- <a href="/auth/linkedIn" class="services"><%= image_tag "linkedin_64.png", :size => "64x64", :alt => "LinkedIn" %>LinkedIn</a>
- <a href="/auth/yahoo" class="services"><%= image_tag "yahoo_64.png", :size => "64x64", :alt => "Yahoo" %>Yahoo</a>
- <a href="/auth/github" class="services"><%= image_tag "github_64.png", :size => "64x64", :alt => "Github" %>Github</a>
-
-
- </div>
- </div>
-
- <div id="devise_links">
- <%= render :partial => "devise/shared/links" %>
- </div>
+<div id="local" class="box">
+ <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
+ <div><%= f.label :email %><br />
+ <%= f.email_field :email %></div>
+ <div><%= f.label :password %><br />
+ <%= f.password_field :password %></div>
+ <% if devise_mapping.rememberable? -%>
+ <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
+ <% end %>
+ <div><%= f.submit "Είσοδος" %></div>
+ <% end %>
+</div>
+<div id="remote">
+ <div id="terms" class="box">
+ <%= link_to "Υπηρεσίες δικτύωσης", "#" %>
+ </div>
+ <div id="services" class="box">
+ <a href="/auth/facebook" class="services"><%= image_tag "facebook_64.png", :size => "64x64", :alt => "Facebook" %>Facebook</a>
+ <a href="/auth/twitter" class="services"><%= image_tag "twitter_64.png", :size => "64x64", :alt => "Twitter" %>Twitter</a>
+ <a href="/auth/google" class="services"><%= image_tag "google_64.png", :size => "64x64", :alt => "Google" %>Google</a>
+ <a href="/auth/linkedIn" class="services"><%= image_tag "linkedin_64.png", :size => "64x64", :alt => "LinkedIn" %>LinkedIn</a>
+ <a href="/auth/yahoo" class="services"><%= image_tag "yahoo_64.png", :size => "64x64", :alt => "Yahoo" %>Yahoo</a>
+ <a href="/auth/github" class="services"><%= image_tag "github_64.png", :size => "64x64", :alt => "Github" %>Github</a>
+ </div>
+</div>
+<div id="devise_links">
+ <%= render :partial => "devise/shared/links" %>
+</div>
</section>
@@ -7,7 +7,7 @@
<p><%= f.label :email %><span> (Δεν εμφανίζεται ποτέ)</span><br />
<%= f.email_field :email %></p>
<%= image_tag gravatar(resource.email, 30) %></p>
- <p>Ο Χώρος συζήτησης ενημέρωσης χρησιμοποιεί την υπηρεσία Gravatar και σε συνδυασμό με την ηλεκτρονική σας διεύθυνση εμφανίζει την avatar εικόνα σας. Μπορείτε να ρυθμίσεται το avatar σας στο <%= link_to 'Gravatar', 'http://www.gravatar.com' %>.<br />
+ <p>Ο Χώρος συζήτησης ενημέρωσης χρησιμοποιεί την υπηρεσία Gravatar και σε συνδυασμό με την ηλεκτρονική σας διεύθυνση εμφανίζει την avatar εικόνα σας. Μπορείτε να ρυθμίσετε το avatar σας στο <%= link_to 'Gravatar', 'http://www.gravatar.com' %>.<br />
<p><%= f.label 'name', 'Όνομα Επίθετο' %><span>(Θα εμφανίζεται στα άρθρα / σχόλια)</span><br />
@@ -14,7 +14,7 @@
<%= f.text_field :fullname %></p>
<p><%= f.label 'lesson', 'Θεματική ενότητα' %><span> (Θα εμφανίζεται στα άρθρα / σχόλια)</span><br />
- <%= f.select :lesson_id, @lesson %></p>
+ <%= f.select :lesson_id, @lessons %></p>
<p><%= f.label 'about', 'Σχετικά με εμένα' %><span> (Θα εμφανίζεται στα άρθρα)</span><br />
<%= f.text_area :shortbio, :size => "90%x5", :class => "fullwidth" %></p>
@@ -1,5 +1,5 @@
<section id="deviseauth">
- <h2>Εγγραφή</h2>
+ <h2>Εγγραφή χρήστη</h2>
<div id="local2" class="box">
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
@@ -25,9 +25,9 @@
<%= link_to "Υπηρεσίες δικτύωσης", "#" %>
</div>
<div id="services" class="box">
- <a href="/auth/facebook" class="services2"><%= image_tag "facebook_64.png", :size => "64x64", :alt => "Facebook" %>Facebook</a>
- <a href="/auth/twitter" class="services2"><%= image_tag "twitter_64.png", :size => "64x64", :alt => "Twitter" %>Twitter</a>
- <a href="/auth/google" class="services2"><%= image_tag "google_64.png", :size => "64x64", :alt => "Google" %>Google</a>
+ <a href="/auth/facebook" class="services"><%= image_tag "facebook_64.png", :size => "64x64", :alt => "Facebook" %>Facebook</a>
+ <a href="/auth/twitter" class="services"><%= image_tag "twitter_64.png", :size => "64x64", :alt => "Twitter" %>Twitter</a>
+ <a href="/auth/google" class="services"><%= image_tag "google_64.png", :size => "64x64", :alt => "Google" %>Google</a>
<a href="/auth/linkedIn" class="services"><%= image_tag "linkedin_64.png", :size => "64x64", :alt => "LinkedIn" %>LinkedIn</a>
<a href="/auth/yahoo" class="services"><%= image_tag "yahoo_64.png", :size => "64x64", :alt => "Yahoo" %>Yahoo</a>
<a href="/auth/github" class="services"><%= image_tag "github_64.png", :size => "64x64", :alt => "Github" %>Github*</a>
@@ -5,7 +5,7 @@ def self.up
t.recoverable
t.rememberable
t.trackable
- ##t.encryptable
+ #t.encryptable
t.confirmable
t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :time
# t.token_authenticatable
@@ -7,7 +7,7 @@ class DeviseCreateStudents < ActiveRecord::Migration
t.trackable
##t.encryptable
t.confirmable
- t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
+ t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :time
# t.token_authenticatable
t.string :fullname

0 comments on commit 828b8d9

Please sign in to comment.