Skip to content
Browse files

add datepicker, exercise, and date

  • Loading branch information...
1 parent 62bc3cd commit 341178fbc35a8aecfe775970c61d34d013ebd737 @panagiotis2011 committed
Showing with 974 additions and 156 deletions.
  1. +1 −0 .gitignore
  2. +4 −0 .gitignore~
  3. +4 −1 Gemfile
  4. +18 −0 Gemfile.lock
  5. +3 −2 Gemfile~
  6. +2 −1 app/controllers/admin_controller.rb
  7. +2 −9 app/controllers/admin_controller.rb~
  8. +1 −1 app/controllers/application_controller.rb
  9. +2 −2 app/controllers/application_controller.rb~
  10. +14 −3 app/controllers/exercises_controller.rb
  11. +15 −4 app/controllers/exercises_controller.rb~
  12. +1 −1 app/controllers/questions_controller.rb
  13. +3 −5 app/controllers/questions_controller.rb~
  14. +1 −0 app/controllers/users_controller.rb
  15. +11 −2 app/controllers/users_controller.rb~
  16. +58 −0 app/controllers/writings_controller.rb
  17. +58 −0 app/controllers/writings_controller.rb~
  18. +8 −0 app/helpers/writings_herlper.rb
  19. +8 −0 app/helpers/writings_herlper.rb~
  20. +9 −2 app/models/exercise.rb
  21. +9 −2 app/models/exercise.rb~
  22. +1 −1 app/models/user.rb
  23. +1 −1 app/models/user.rb~
  24. +1 −0 app/models/writing.rb
  25. +3 −0 app/models/writing.rb~
  26. +12 −0 app/views/admin/edit.html.erb
  27. 0 app/views/admin/edit.html.erb~
  28. +15 −6 app/views/admin/index.html.erb
  29. +11 −16 app/views/admin/index.html.erb~
  30. +11 −0 app/views/admin/show.html.erb
  31. +18 −0 app/views/admin/show.html.erb~
  32. +6 −5 app/views/exercises/_form.html.erb
  33. +6 −5 app/views/exercises/_form.html.erb~
  34. +2 −2 app/views/exercises/edit.html.erb
  35. +2 −2 app/views/exercises/edit.html.erb~
  36. +13 −12 app/views/exercises/index.html.erb
  37. +14 −13 app/views/exercises/index.html.erb~
  38. +29 −0 app/views/exercises/myexercises.html.erb
  39. 0 app/views/exercises/myexercises.html.erb~
  40. +1 −0 app/views/exercises/new.html.erb
  41. +3 −1 app/views/exercises/new.html.erb~
  42. +4 −1 app/views/exercises/show.html.erb
  43. +4 −1 app/views/exercises/show.html.erb~
  44. +4 −3 app/views/layouts/application.html.erb
  45. +4 −3 app/views/layouts/application.html.erb~
  46. +2 −2 app/views/questions/_form.html.erb
  47. +3 −4 app/views/questions/_form.html.erb~
  48. +5 −2 app/views/questions/show.html.erb
  49. +5 −2 app/views/questions/show.html.erb~
  50. +4 −4 app/views/users/registrations/edit.html.erb~
  51. +31 −0 app/views/writings/_form.html.erb
  52. +32 −0 app/views/writings/_form.html.erb~
  53. 0 app/views/writings/edit.html.erb
  54. +23 −0 app/views/writings/index.html.erb
  55. +23 −0 app/views/writings/index.html.erb~
  56. +7 −0 app/views/writings/new.html.erb
  57. +7 −0 app/views/writings/new.html.erb~
  58. +23 −0 app/views/writings/show.html.erb
  59. +23 −0 app/views/writings/show.html.erb~
  60. +1 −1 config/initializers/omniauth.rb
  61. +3 −2 config/initializers/omniauth.rb~
  62. +12 −12 config/locales/el.yml
  63. +4 −0 config/locales/el.yml~
  64. +6 −1 config/routes.rb
  65. +11 −3 config/routes.rb~
  66. +4 −0 config/s3.yml~
  67. +1 −0 db/migrate/20120514223800_create_writings.rb
  68. +16 −0 db/migrate/20120514223800_create_writings.rb~
  69. +15 −0 db/migrate/20120517142448_add_attachment_askisi_to_exercises.rb
  70. +6 −2 db/schema.rb
  71. BIN public/images/calendar.gif
  72. +10 −0 public/javascripts/application.js
  73. +13 −0 public/javascripts/application.js~
  74. +11 −0 public/javascripts/datepickers.js
  75. +11 −0 public/javascripts/datepickers.js~
  76. +26 −0 public/javascripts/jquery-ui.datepicker-el.js~
  77. +26 −0 public/javascripts/jquery-ui.datepicker-i18n.js~
  78. +24 −0 public/javascripts/jquery.ui.datepicker-el.js~
  79. +24 −0 public/javascripts/ui.datepicker-el.js
  80. +24 −0 public/javascripts/ui.datepicker-el.js~
  81. +67 −4 public/stylesheets/diplomatiki.css
  82. +67 −5 public/stylesheets/diplomatiki.css~
  83. BIN public/stylesheets/images/calendar.gif
  84. BIN public/system/exercises/askisis/000/000/002/medium/.png
  85. BIN public/system/exercises/askisis/000/000/002/original/.png
  86. BIN public/system/exercises/askisis/000/000/002/thumb/.png
  87. +6 −5 test/functional/exercises_controller_test.rb
  88. +1 −0 test/functional/exercises_controller_test.rb~
View
1 .gitignore
@@ -2,3 +2,4 @@
db/*.sqlite3
log/*.log
tmp/
+config/s3.yml
View
4 .gitignore~
@@ -0,0 +1,4 @@
+.bundle
+db/*.sqlite3
+log/*.log
+tmp/
View
5 Gemfile
@@ -3,13 +3,16 @@ source 'http://rubygems.org'
gem 'rails', '3.0.11'
gem 'pg'
gem 'devise'
-gem "recaptcha", :require => "recaptcha/rails"
+gem 'recaptcha', :require => 'recaptcha/rails'
gem 'sinatra'
gem 'mogli'
gem 'gravatar_image_tag', '1.0.0.pre2'
gem 'rails-i18n'
gem 'jquery-rails', '>= 1.0.12'
gem 'rails3-jquery-autocomplete'
+gem 'paperclip', '~> 3.0'
+gem 'aws-sdk', '~> 1.3.4'
+gem "watu_table_builder", :require => "table_builder"
gem 'will_paginate', '~> 3.0.pre2'
View
18 Gemfile.lock
@@ -34,8 +34,14 @@ GEM
addressable (2.2.7)
arel (2.0.10)
attr_required (0.0.5)
+ aws-sdk (1.3.9)
+ httparty (~> 0.7)
+ json (~> 1.4)
+ nokogiri (>= 1.4.4)
+ uuidtools (~> 2.1)
bcrypt-ruby (3.0.1)
builder (2.1.2)
+ cocaine (0.2.1)
coderay (1.0.5)
daemons (1.1.8)
dalli (1.1.5)
@@ -76,6 +82,7 @@ GEM
multi_json (1.1.0)
multi_xml (0.4.1)
multipart-post (1.1.5)
+ nokogiri (1.5.2)
oauth (0.4.5)
oauth2 (0.5.2)
faraday (~> 0.7)
@@ -100,6 +107,12 @@ GEM
omniauth-twitter (0.0.8)
omniauth-oauth (~> 1.0)
orm_adapter (0.0.6)
+ paperclip (3.0.3)
+ activemodel (>= 3.0.0)
+ activerecord (>= 3.0.0)
+ activesupport (>= 3.0.0)
+ cocaine (>= 0.0.2)
+ mime-types
pg (0.13.2)
polyglot (0.3.3)
rack (1.2.5)
@@ -154,10 +167,12 @@ GEM
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.32)
+ uuidtools (2.1.2)
validate_url (0.2.0)
activemodel (>= 3.0.0)
warden (1.1.1)
rack (>= 1.0)
+ watu_table_builder (0.3.0)
will_paginate (3.0.3)
PLATFORMS
@@ -166,6 +181,7 @@ PLATFORMS
DEPENDENCIES
RedCloth
acts-as-taggable-on (~> 2.2.2)
+ aws-sdk (~> 1.3.4)
coderay
dalli
devise
@@ -180,6 +196,7 @@ DEPENDENCIES
omniauth-github
omniauth-openid
omniauth-twitter
+ paperclip (~> 3.0)
pg
rails (= 3.0.11)
rails-i18n
@@ -189,4 +206,5 @@ DEPENDENCIES
sqlite3
thin
validate_url
+ watu_table_builder
will_paginate (~> 3.0.pre2)
View
5 Gemfile~
@@ -2,15 +2,16 @@ source 'http://rubygems.org'
gem 'rails', '3.0.11'
gem 'pg'
-gem 'sqlite3', '1.3.3'
gem 'devise'
-gem "recaptcha", :require => "recaptcha/rails"
+gem 'recaptcha', :require => 'recaptcha/rails'
gem 'sinatra'
gem 'mogli'
gem 'gravatar_image_tag', '1.0.0.pre2'
gem 'rails-i18n'
gem 'jquery-rails', '>= 1.0.12'
gem 'rails3-jquery-autocomplete'
+gem 'paperclip', '~> 3.0'
+gem 'aws-sdk', '~> 1.3.4'
gem 'will_paginate', '~> 3.0.pre2'
View
3 app/controllers/admin_controller.rb
@@ -17,6 +17,8 @@ def index
@num_users = User.all.count
@num_users_active30days = User.where('last_sign_in_at > ?', 30.days.ago).count
@num_users_created30days = User.where('created_at > ?', 30.days.ago).count
+ @current_user.attributes = {'exercise_ids' => []}.merge(params[:user] || {})
+
end
@@ -147,7 +149,6 @@ def users
@users = User.where(:user_kind => @user_kind).order(@order).paginate(:page => params[:page], :per_page => 10)
end
-
protected
def is_admin
if current_user
View
11 app/controllers/admin_controller.rb~
@@ -17,6 +17,8 @@ class AdminController < ApplicationController
@num_users = User.all.count
@num_users_active30days = User.where('last_sign_in_at > ?', 30.days.ago).count
@num_users_created30days = User.where('created_at > ?', 30.days.ago).count
+ @user.attributes = {'exercise_ids' => []}.merge(params[:user] || {})
+
end
@@ -126,14 +128,6 @@ class AdminController < ApplicationController
@questions = Question.where(:state => @state).order(@order)
end
- def exercises
- @exercises = Exercise.all
- @exercises = Exercise.paginate(:page => params[:page])
- respond_to do |format|
- format.html # index.html.erb
- format.xml { render :xml => @exercises }
- end
- end
# διαχείριση των χρηστών από τον διαχειριστή (user.id = 1)
def users
@@ -155,7 +149,6 @@ class AdminController < ApplicationController
@users = User.where(:user_kind => @user_kind).order(@order).paginate(:page => params[:page], :per_page => 10)
end
-
protected
def is_admin
if current_user
View
2 app/controllers/application_controller.rb
@@ -1,6 +1,6 @@
class ApplicationController < ActionController::Base
protect_from_forgery
- before_filter :authenticate_user!, :except => [:index, :all, :show, :about]
+ before_filter :authenticate_user!, :except => [:all, :show, :about]
before_filter :count_questions
def about
end
View
4 app/controllers/application_controller.rb~
@@ -1,6 +1,6 @@
class ApplicationController < ActionController::Base
protect_from_forgery
- before_filter :authenticate_user!, :except => [:index, :all, :show, :about]
+ before_filter :authenticate_user!, :except => [:all, :show, :about]
before_filter :count_questions
def about
end
@@ -9,7 +9,7 @@ class ApplicationController < ActionController::Base
def all
@questions = Question.where(:state => ['3', '4'])
respond_to do |format|
- format.html { render 'index' } # uses the same view as the default index
+ format.html { render 'index' } # χρήση του ίδιου view όπως το view index
format.xml { render :xml => @questions }
end
end
View
17 app/controllers/exercises_controller.rb
@@ -11,11 +11,21 @@ def index
end
end
+
+ def myexercises
+ @myexercises = current_user.exercises.all
+ @myexercises = current_user.exercise.order('created_at desc').paginate(:page => params[:page], :per_page => 10)
+ respond_to do |format|
+ format.html { render 'myexercises'}
+ format.xml { render :xml => @myexercises }
+ end
+ end
+
# GET /exercises/1
# GET /exercises/1.xml
def show
@exercise = Exercise.find(params[:id])
-
+ #@writings = Writing.find(all, :conditions => ["exercise_id = ?", @exercise.id]))
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @exercise }
@@ -25,7 +35,7 @@ def show
# GET /exercises/new
# GET /exercises/new.xml
def new
- @exercise = Exercise.new
+ @exercise = current_user.exercises.new
respond_to do |format|
format.html # new.html.erb
@@ -45,8 +55,9 @@ def create
respond_to do |format|
if @exercise.save
- format.html { redirect_to(@exercise, :notice => 'Η άσκση δημιουργήθηκε επιτυχώς.') }
+ format.html { redirect_to(@exercise, :notice => 'Η άσκηση δημιουργήθηκε επιτυχώς.') }
format.xml { render :xml => @exercise, :status => :created, :location => @exercise }
+ #format.xml { render :xml => @writing, :status => :created, :location => @writing }
else
format.html { render :action => "new" }
format.xml { render :xml => @exercise.errors, :status => :unprocessable_entity }
View
19 app/controllers/exercises_controller.rb~
@@ -4,18 +4,28 @@ class ExercisesController < ApplicationController
# GET /exercises.xml
def index
@exercises = Exercise.all
- @exercises = Exercise.order('created desc').paginate(:page => params[:page], :per_page => 10)
+ @exercises = Exercise.order('created_at desc').paginate(:page => params[:page], :per_page => 10)
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @exercises }
end
end
+
+ def myexercises
+ @myexercises = current_user.exercises.all
+ @myexercises = current_user.exercise.order('created_at desc').paginate(:page => params[:page], :per_page => 10)
+ respond_to do |format|
+ format.html { render 'myexercises'}
+ format.xml { render :xml => @myexercises }
+ end
+ end
+
# GET /exercises/1
# GET /exercises/1.xml
def show
@exercise = Exercise.find(params[:id])
-
+ @writings = Writing.find(all, :conditions => ["exercise_id = ?", @exercise.id]))
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @exercise }
@@ -25,7 +35,7 @@ class ExercisesController < ApplicationController
# GET /exercises/new
# GET /exercises/new.xml
def new
- @exercise = Exercise.new
+ @exercise = current_user.exercises.new
respond_to do |format|
format.html # new.html.erb
@@ -45,8 +55,9 @@ class ExercisesController < ApplicationController
respond_to do |format|
if @exercise.save
- format.html { redirect_to(@exercise, :notice => 'Η άσκση δημιουργήθηκε επιτυχώς.') }
+ format.html { redirect_to(@exercise, :notice => 'Η άσκηση δημιουργήθηκε επιτυχώς.') }
format.xml { render :xml => @exercise, :status => :created, :location => @exercise }
+ #format.xml { render :xml => @writing, :status => :created, :location => @writing }
else
format.html { render :action => "new" }
format.xml { render :xml => @exercise.errors, :status => :unprocessable_entity }
View
2 app/controllers/questions_controller.rb
@@ -3,7 +3,7 @@ class QuestionsController < ApplicationController
respond_to :json
autocomplete :tag, :name
# μόνο οι μέθοδοι index, all, about και show είναι προσβάσιμες από μη πιστοποιημένους χρήστες
- before_filter :authenticate_user!, :except => [:index, :all, :show, :about]
+ before_filter :authenticate_user!, :except => [:index, :all, :about]
rescue_from ActiveRecord::RecordNotFound, :with => :record_not_found
View
8 app/controllers/questions_controller.rb~
@@ -102,11 +102,6 @@ class QuestionsController < ApplicationController
end
- def edit
- @question = current_user.questions.find(params[:id])
- end
-
-
def postfacebook
@question = current_user.questions.find(params[:id])
begin
@@ -155,6 +150,9 @@ class QuestionsController < ApplicationController
end
end
+ def edit
+ @question = current_user.questions.find(params[:id])
+ end
def create
@question = current_user.questions.new(params[:question])
View
1 app/controllers/users_controller.rb
@@ -15,6 +15,7 @@ def update
end
end
+
def destroy
@user = User.find(params[:id])
if current_user.id < 2
View
13 app/controllers/users_controller.rb~
@@ -1,7 +1,7 @@
# encoding: utf-8
class UsersController < ApplicationController
-def update
+ def update
@user = User.find(params[:id])
respond_to do |format|
@@ -15,7 +15,16 @@ def update
end
end
-def destroy
+ def show
+ @user = User.find(params[:id])
+
+ respond_to do |format|
+ format.html { render 'index' }
+ format.xml { render :xml => @user }
+ end
+ end
+
+ def destroy
@user = User.find(params[:id])
if current_user.id < 2
@user.destroy
View
58 app/controllers/writings_controller.rb
@@ -0,0 +1,58 @@
+# encoding: utf-8
+class WritingsController < ApplicationController
+def create
+ @writing = current_user.writings.build(:exercise_id => params[:exercise_id], :writing_date => params[:writing][:writing_date])
+
+ if @writing.save
+ flash[:notice] = "Προστέθηκε η άσκηση."
+ redirect_to root_url
+ else
+ flash[:error] = "Δεν προστέθηκε η άσκηση."
+ redirect_to root_url
+ end
+end
+
+def new
+ @writing = current_user.writings.new
+ @exercise = Exercise.all
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.xml { render :xml => @writing }
+ end
+end
+
+def destroy
+ @writing = current_user.writings.find(params[:id])
+ @writing.destroy
+ flash[:notice] = "Αφαιρέθηκε η άσκηση."
+ redirect_to current_user
+end
+
+def index
+ @writings = Writing.find(:all)
+ @date = params[:month] ? Date.parse(params[:month]) : Date.today
+
+end
+
+ # DELETE /writings/1
+ # DELETE /writings/1.xml
+ def destroy
+ @writing = Writing.find(params[:id])
+ @writing.destroy
+
+ respond_to do |format|
+ format.html { redirect_to(writings_url) }
+ format.xml { head :ok }
+ end
+ end
+
+ def show
+ @writing = Writing.find(params[:id])
+ respond_to do |format|
+ format.html # show.html.erb
+ format.xml { render :xml => @writing }
+ end
+ end
+
+end
View
58 app/controllers/writings_controller.rb~
@@ -0,0 +1,58 @@
+# encoding: utf-8
+class WritingsController < ApplicationController
+def create
+ @writing = current_user.writings.build(:exercise_id => params[:exercise_id], :writing_date => params[:writing][:writing_date])
+
+ if @writing.save
+ flash[:notice] = "Προστέθηκε η άσκηση."
+ redirect_to root_url
+ else
+ flash[:error] = "Δεν προστέθηκε η άσκηση."
+ redirect_to root_url
+ end
+end
+
+def new
+ @writing = current_user.writings.new
+ @exercise = Exercise.all
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.xml { render :xml => @writing }
+ end
+end
+
+def destroy
+ @writing = current_user.writings.find(params[:id])
+ @writing.destroy
+ flash[:notice] = "Αφαιρέθηκε η άσκηση."
+ redirect_to current_user
+end
+
+def index
+ @writings = Writing.find(:all)
+ @date = params[:month] ? Date.parse(params[:month]) : Date.today
+ @exercise = Writing.exercises
+end
+
+ # DELETE /writings/1
+ # DELETE /writings/1.xml
+ def destroy
+ @writing = Writing.find(params[:id])
+ @writing.destroy
+
+ respond_to do |format|
+ format.html { redirect_to(writings_url) }
+ format.xml { head :ok }
+ end
+ end
+
+ def show
+ @writing = Writing.find(params[:id])
+ respond_to do |format|
+ format.html # show.html.erb
+ format.xml { render :xml => @writing }
+ end
+ end
+
+end
View
8 app/helpers/writings_herlper.rb
@@ -0,0 +1,8 @@
+module WritingsHelper
+
+ def datel
+ @exercise = Exercise.all
+ @d = @exercise.writings.last
+ @datel = @d.writing_date
+ end
+end
View
8 app/helpers/writings_herlper.rb~
@@ -0,0 +1,8 @@
+module WritingsHelper
+
+ def datel
+ @exercise = Exercise.find_by_id
+ @d = @exercise.writings.last
+ @datel = @d.writing_date
+ end
+end
View
11 app/models/exercise.rb
@@ -1,14 +1,21 @@
# encoding: utf-8
class Exercise < ActiveRecord::Base
+ has_attached_file :askisi,
+ :storage => :s3,
+ :url => ":s3_domain_url",
+ :s3_credentials => "#{RAILS_ROOT}/config/s3.yml",
+ :path => "/:style/:id/:filename"
has_many :users, :through => :writings
has_many :writings
- attr_accessible :etitle, :ebody, :average
+ attr_accessible :etitle, :ebody, :average, :askisi
- validates :etitle, :presence => true, :length => { :maximum => 20 }
+ validates :etitle, :presence => true, :length => { :maximum => 20 }, :uniqueness => true
validates :ebody, :presence => true
validates :average, :inclusion => { :in => 0..10, :message => " Πρέπει να είναι δεκαδικός αριθμός από 0 έως 10" }, :on => :update
validates :average, :presence => { :message => " δεν πρέπει να είναι κενό" }, :on => :update
validates :average, :numericality => { :message => " Πρέπει να είναι αριθμητική τιμή" }, :on => :update
+ validates_attachment_content_type :askisi, :content_type => "application/pdf"
+
end
View
11 app/models/exercise.rb~
@@ -1,14 +1,21 @@
# encoding: utf-8
class Exercise < ActiveRecord::Base
+ has_attached_file :askisi,
+ :storage => :s3,
+ :url => ":s3_domain_url",
+ :s3_credentials => "#{RAILS_ROOT}/config/s3.yml",
+ :path => "/:style/:id/:filename"
has_many :users, :through => :writings
has_many :writings
- attr_accessible :etitle, :ebody, :average
+ attr_accessible :etitle, :ebody, :average, :askisi
- validates :etitle, :presence => true, :length => { :maximum => 80 }
+ validates :etitle, :presence => true, :length => { :maximum => 20 }
validates :ebody, :presence => true
validates :average, :inclusion => { :in => 0..10, :message => " Πρέπει να είναι δεκαδικός αριθμός από 0 έως 10" }, :on => :update
validates :average, :presence => { :message => " δεν πρέπει να είναι κενό" }, :on => :update
validates :average, :numericality => { :message => " Πρέπει να είναι αριθμητική τιμή" }, :on => :update
+ validates_attachment_content_type :askisi, :content_type => "application/pdf"
+
end
View
2 app/models/user.rb
@@ -15,7 +15,7 @@ class User < ActiveRecord::Base
belongs_to :lesson
# Setup accessible (or protected) attributes for your model
- attr_accessible :email, :password, :password_confirmation, :remember_me, :fullname, :shortbio, :weburl, :lesson_id, :user_kind
+ attr_accessible :email, :password, :password_confirmation, :remember_me, :fullname, :shortbio, :weburl, :lesson_id
validates :weburl, :url => {:allow_blank => true}, :length => { :maximum => 50 }
validates :fullname, :length => { :maximum => 40 }
validates :shortbio, :length => { :maximum => 500 }
View
2 app/models/user.rb~
@@ -15,7 +15,7 @@ class User < ActiveRecord::Base
belongs_to :lesson
# Setup accessible (or protected) attributes for your model
- attr_accessible :email, :password, :password_confirmation, :remember_me, :fullname, :shortbio, :weburl, :lesson_id, :user_kind
+ attr_accessible :email, :password, :password_confirmation, :remember_me, :fullname, :shortbio, :weburl, :lesson_id, :user_id
validates :weburl, :url => {:allow_blank => true}, :length => { :maximum => 50 }
validates :fullname, :length => { :maximum => 40 }
validates :shortbio, :length => { :maximum => 500 }
View
1 app/models/writing.rb
@@ -1,4 +1,5 @@
class Writing < ActiveRecord::Base
belongs_to :user
belongs_to :exercise
+ attr_accessible :writing_date, :exercise_id
end
View
3 app/models/writing.rb~
@@ -1,2 +1,5 @@
class Writing < ActiveRecord::Base
+ belongs_to :user
+ belongs_to :exercise
+ attr_accessible :writing_date, :exercise_id
end
View
12 app/views/admin/edit.html.erb
@@ -0,0 +1,12 @@
+<h1>User <%= @user.id -%></h1>
+
+<h2>Ασκήσεις χρήστη</h2>
+<% form_for @user do -%>
+ <% Exercise.all.each do |exercise| -%>
+ <div>
+ <%= check_box_tag :exercise_ids, exercise.id, @user.exercises.include?(exercise), :name => 'user[exercise_ids][]' -%>
+ <%= label_tag :exercise_ids, exercise.id -%>
+ </div>
+ <% end -%>
+ <%= submit_tag -%>
+<% end -%>
View
0 app/views/admin/edit.html.erb~
No changes.
View
21 app/views/admin/index.html.erb
@@ -1,6 +1,17 @@
# encoding: utf-8
<section id = "admin">
<h2>Διαχειριστής: Πίνακας ελέγχου</h2>
+ <h3>Ασκήσεις</h3>
+ <p>
+ Στατιστικά: </p>
+ <p>
+ <%= link_to pluralize(@num_state5, "Άσκηση"), exercises_path %>
+ </p>
+
+<h3>Προγραμματισμός ύλης</h3>
+
+ <%= link_to "Ημερομηνία παράδοσης άσκησης", new_writing_path, :method => :get, :class => "awesome custom red" %>
+
<h3>Ερωτήσεις</h3>
<p>
@@ -19,12 +30,6 @@
<% end %>
</p>
- <h3>Ασκήσεις</h3>
- <p>
- Στατιστικά: </p>
- <p>
- <%= link_to pluralize(@num_state5, "Άσκηση"), exercises_path %>,
- </p>
<% if (admin_signed_in and current_user.id == 1) %>
<h3>Χρήστες</h3>
@@ -54,4 +59,8 @@
<% end %>
+
+
+
+
</section>
View
27 app/views/admin/index.html.erb~
@@ -23,22 +23,13 @@
<p>
Στατιστικά: </p>
<p>
- <%= link_to pluralize(@num_state5, "Άσκηση"), exercises_path %>,
- </p>
- <th>Τίτλος</th>
- <th>Κείμενο</th>
- <th>Μέσος Όρος</th>
- <th></th>
- <th></th>
- <th></th>
- <% @exercises.each do |exercise| %>
- <td><%= exercise.etitle %></td>
- <td><%= exercise.ebody %></td>
- <td><%= exercise.average %></td>
- <td><%= link_to 'Εμφάνισε', exercise %></td>
- <td><%= link_to 'Βαθμολόγησε', edit_exercise_path(exercise) %></td>
- <td><%= link_to 'Διέγραψε', exercise, :confirm => 'Είσαι σίγουρος?', :method => :delete %></td>
- <% end %>
+ <%= link_to pluralize(@num_state5, "Άσκηση"), exercises_path %>
+ </p>
+
+<h3>Προγραμματισμός ύλης</h3>
+
+ <%= link_to "Ημερομηνία παράδοσης άσκησης", new_writing_path, :method => :get, :class => "awesome custom red" %>
+
<% if (admin_signed_in and current_user.id == 1) %>
<h3>Χρήστες</h3>
@@ -68,4 +59,8 @@
<% end %>
+
+
+
+
</section>
View
11 app/views/admin/show.html.erb
@@ -0,0 +1,11 @@
+<h2>Ασκήσεις μου</h2>
+<ul>
+ <% for writing in @user.writings %>
+ <li>
+ <%=h writing.exercise.etitle %>
+ (<%= link_to "remove", writing, :method => :delete %>)
+ </li>
+ <% end %>
+</ul>
+
+<p><%= link_to "Προσθήκη ασκήσεων", users_path %></p>
View
18 app/views/admin/show.html.erb~
@@ -0,0 +1,18 @@
+<h2>Ασκήσεις μου</h2>
+<ul>
+ <% for writing in @user.writings %>
+ <li>
+ <%=h writing.exercise.etitle %>
+ (<%= link_to "remove", writing, :method => :delete %>)
+ </li>
+ <% end %>
+</ul>
+
+<p><%= link_to "Προσθήκη ασκήσεων", users_path %></p>
+
+<h2>Friended by Users</h2>
+<ul>
+ <% for user in @user.inverse_exercises %>
+ <li><%=h user.username %></li>
+ <% end %>
+</ul>
View
11 app/views/exercises/_form.html.erb
@@ -1,7 +1,7 @@
-<%= form_for(@exercise) do |f| %>
+<%= form_for(@exercise, :html => { :multipart => true }) do |f| %>
<% if @exercise.errors.any? %>
<div id="error_explanation">
- <h2><%= pluralize(@exercise.errors.count, "error") %> και έτσι δεν επιτρέπεται η αποθήκευση της άσκησης</h2>
+ <h2><%= pluralize(@exercise.errors.count, "σφάλμα") %> και έτσι δεν επιτρέπεται η αποθήκευση της άσκησης</h2>
<ul>
<% @exercise.errors.full_messages.each do |msg| %>
@@ -11,7 +11,6 @@
</div>
<% end %>
-
<div class="field">
<label for="exercise_etitle">Τίτλος άσκησης </label><br />
<%= f.text_field :etitle, :size => "100%", :class => "fullwidth" %>
@@ -22,10 +21,12 @@
<%= f.text_area :ebody, :size => "100%x10", :class => "fullwidth" %>
</div>
-
+ <div class="field">
+ <%= f.file_field :askisi %>
+ </div>
<div class="actions">
- <%= f.submit :class => "awesome custom red" %>
+ <%= f.submit "Δημιουργία άσκησης", :class => "awesome custom red" %>
<%= link_to 'Εμφάνιση αυτής της άσκησης', @exercise, :class => "awesome custom red" %>
<%= link_to 'Επιστροφή στις ασκήσεις', exercises_path, :class => "awesome custom red" %>
</div>
View
11 app/views/exercises/_form.html.erb~
@@ -1,7 +1,7 @@
-<%= form_for(@exercise) do |f| %>
+<%= form_for(@exercise, :html => { :multipart => true }) do |f| %>
<% if @exercise.errors.any? %>
<div id="error_explanation">
- <h2><%= pluralize(@exercise.errors.count, "error") %> και έτσι δεν επιτρέπεται η αποθήκευση της άσκησης</h2>
+ <h2><%= pluralize(@exercise.errors.count, "σφάλμα") %> και έτσι δεν επιτρέπεται η αποθήκευση της άσκησης</h2>
<ul>
<% @exercise.errors.full_messages.each do |msg| %>
@@ -22,11 +22,12 @@
<%= f.text_area :ebody, :size => "100%x10", :class => "fullwidth" %>
</div>
- <div class="field">
- <label for="exercise_average">Βαθμολογία (Μέσος όρος) </label><br />
- <%= f.text_field :average %>
+<div class="field">
+ <%= f.file_field :askisi %>
</div>
+
+
<div class="actions">
<%= f.submit :class => "awesome custom red" %>
<%= link_to 'Εμφάνιση αυτής της άσκησης', @exercise, :class => "awesome custom red" %>
View
4 app/views/exercises/edit.html.erb
@@ -1,7 +1,7 @@
<h1>Βαθμολόγηση άσκησης</h1>
<% if @exercise.errors.any? %>
<div id="error_explanation">
- <h2><%= pluralize(@exercise.errors.count, "error") %> και έτσι δεν επιτρέπεται η αποθήκευση της άσκησης</h2>
+ <h2><%= pluralize(@exercise.errors.count, "σφάλμα") %> και έτσι δεν επιτρέπεται η βαθμολόγηση της άσκησης</h2>
<ul>
<% @exercise.errors.full_messages.each do |msg| %>
@@ -19,7 +19,7 @@
</div>
<div class="actions">
- <%= f.submit :class => "awesome custom red" %>
+ <%= f.submit "Βαθμολόγηση", :class => "awesome custom red" %>
<%= link_to 'Επιστροφή στις ασκήσεις', exercises_path, :class => "awesome custom red" %>
</div>
View
4 app/views/exercises/edit.html.erb~
@@ -1,7 +1,7 @@
<h1>Βαθμολόγηση άσκησης</h1>
<% if @exercise.errors.any? %>
<div id="error_explanation">
- <h2><%= pluralize(@exercise.errors.count, "error") %> και έτσι δεν επιτρέπεται η αποθήκευση της άσκησης</h2>
+ <h2><%= pluralize(@exercise.errors.count, "σφάλμα") %> και έτσι δεν επιτρέπεται η βαθμολόγηση της άσκησης</h2>
<ul>
<% @exercise.errors.full_messages.each do |msg| %>
@@ -15,7 +15,7 @@
<div class="field">
<label for="exercise_average">Βαθμολογία (Μέσος όρος) </label><br />
- <%= f.text_field :average, number_with_precision :precision => 3, number_with_scale :scale =>1 %>
+ <%= f.text_field :average, :precision => 3, :scale =>1 %>
</div>
<div class="actions">
View
25 app/views/exercises/index.html.erb
@@ -1,37 +1,38 @@
<% if admin_signed_in %>
<table border="1">
- <th>Τίτλος </th>
- <th>Μέσος Όρος</th>
+ <th>Τίτλος της άσκησης</th>
+ <th>Μέσος Όρος βαθμολογίας</th>
+ <th>Download της άσκησης από Amazon s3</th>
+
<% @exercises.each do |exercise| %>
<tr>
- <td align="center"><%= exercise.etitle %></td>
+ <td align="center"><%= exercise.etitle %></td>
<th><%= exercise.average %></td>
- <td><%= link_to 'Εμφάνισε', exercise %></td>
- <td><%= link_to 'Βαθμολόγησε', edit_exercise_path(exercise) %></td>
- <td><%= link_to 'Διέγραψε', exercise, :confirm => 'Είσαι σίγουρος?', :method => :delete %></td>
+ <th><%= exercise.writings %></td>
+ <td><%= link_to 'Εμφάνιση', exercise %></td>
+ <td><%= link_to 'Βαθμολόγηση', edit_exercise_path(exercise) %></td>
+ <td><%= link_to 'Διαγραφή', exercise, :confirm => 'Είσαι σίγουρος?', :method => :delete %></td>
</tr>
+
+
<% end %>
</table>
<div class='pagination'>
<%= will_paginate @exercises %>
</div>
+
<br />
<%= link_to 'Νέα άσκηση', new_exercise_path, :class => "awesome custom red" %>
<% else %>
-
-
-
-
<table>
<tr>
- <h1> </h1>
- <section id = "exercises">
+ <section id = "exercises">
<% @exercises.each do |exercise| %>
<exercise class="exercise">
<div class = "etitle"><%= link_to exercise.etitle, exercise %></div>
View
27 app/views/exercises/index.html.erb~
@@ -1,37 +1,38 @@
<% if admin_signed_in %>
<table border="1">
- <th>Τίτλος </th>
- <th>Μέσος Όρος</th>
+ <th>Τίτλος της άσκησης</th>
+ <th>Μέσος Όρος βαθμολογίας</th>
+ <th>Download της άσκησης από Amazon s3</th>
+
<% @exercises.each do |exercise| %>
<tr>
- <td align="center"><%= exercise.etitle %></td>
- <th onclick><%= exercise.average %></td>
- <td><%= link_to 'Εμφάνισε', exercise %></td>
- <td><%= link_to 'Βαθμολόγησε', edit_exercise_path(exercise) %></td>
- <td><%= link_to 'Διέγραψε', exercise, :confirm => 'Είσαι σίγουρος?', :method => :delete %></td>
+ <td align="center"><%= exercise.etitle %></td>
+ <th><%= exercise.average %></td>
+ <th><%= exercise.writings.last %></td>
+ <td><%= link_to 'Εμφάνιση', exercise %></td>
+ <td><%= link_to 'Βαθμολόγηση', edit_exercise_path(exercise) %></td>
+ <td><%= link_to 'Διαγραφή', exercise, :confirm => 'Είσαι σίγουρος?', :method => :delete %></td>
</tr>
+
+
<% end %>
</table>
<div class='pagination'>
<%= will_paginate @exercises %>
</div>
+
<br />
<%= link_to 'Νέα άσκηση', new_exercise_path, :class => "awesome custom red" %>
<% else %>
-
-
-
-
<table>
<tr>
- <h1> </h1>
- <section id = "exercises">
+ <section id = "exercises">
<% @exercises.each do |exercise| %>
<exercise class="exercise">
<div class = "etitle"><%= link_to exercise.etitle, exercise %></div>
View
29 app/views/exercises/myexercises.html.erb
@@ -0,0 +1,29 @@
+<% if admin_signed_in %>
+
+<table border="1">
+ <th>Τίτλος </th>
+ <th>Μέσος Όρος</th>
+
+
+ <% @exercises.each do |exercise| %>
+ <tr>
+
+ <td align="center"><%= exercise.etitle %></td>
+ <th><%= exercise.average %></td>
+ <td><%= link_to 'Εμφάνιση', exercise %></td>
+ <td><%= link_to 'Βαθμολόγηση', edit_exercise_path(exercise) %></td>
+ <td><%= link_to 'Διαγραφή', exercise, :confirm => 'Είσαι σίγουρος?', :method => :delete %></td>
+ </tr>
+
+
+ <% end %>
+
+ </table>
+ <div class='pagination'>
+ <%= will_paginate @exercises %>
+ </div>
+
+ <br />
+ <%= link_to 'Νέα άσκηση', new_exercise_path, :class => "awesome custom red" %>
+
+ <% end %>
View
0 app/views/exercises/myexercises.html.erb~
No changes.
View
1 app/views/exercises/new.html.erb
@@ -3,4 +3,5 @@
<%= render 'form' %>
+
</section>
View
4 app/views/exercises/new.html.erb~
@@ -1,5 +1,7 @@
+<section id="exercises">
<h1>Νέα άσκηση</h1>
<%= render 'form' %>
+ <%= link_to "Προσθήκη άσκησης", writings_path(:exercise_id => :exercise_id), :method => :post, :class => "awesome custom red" %>
-<%= link_to 'Πίσω', exercises_path %>
+</section>
View
5 app/views/exercises/show.html.erb
@@ -7,7 +7,7 @@
</p>
<p>
- <b>Κείμενο:</b>
+ <b>Οδηγίες:</b>
<%= @exercise.ebody %>
</p>
@@ -16,6 +16,9 @@
<%= @exercise.average %>
</p>
+<p>
+<%= link_to "Άσκηση download", @exercise.askisi.url %>
+</p>
<%= link_to 'Επιστροφή στις ασκήσεις', exercises_path, :class => "awesome custom red" %>
View
5 app/views/exercises/show.html.erb~
@@ -16,7 +16,10 @@
<%= @exercise.average %>
</p>
+<p>
+<%= link_to "Άσκηση download", @exercise.askisi.url %>
+</p>
-<%= link_to 'Επιστροφή στις ασκήσεις', exercises_path %>
+<%= link_to 'Επιστροφή στις ασκήσεις', exercises_path, :class => "awesome custom red" %>
</section>
View
7 app/views/layouts/application.html.erb
@@ -1,10 +1,11 @@
<!DOCTYPE html>
<html>
<head>
+ <meta charset="utf-8">
<title>Diplomatiki</title>
<%= stylesheet_link_tag :all %>
<%= javascript_include_tag :defaults %>
- <%= javascript_include_tag 'jquery-1.7.2.min.js', 'jquery-ui-1.8.20.custom.min.js', 'autocomplete-rails.js', 'rails.js' %>
+ <%= javascript_include_tag 'jquery-1.7.2.min.js', 'jquery-ui-1.8.20.custom.min.js', 'autocomplete-rails.js', 'rails.js', 'ui.datepicker-el.js' %>
<%= stylesheet_link_tag 'jquery-ui-1.8.20.custom.css' %>
<%= csrf_meta_tag %>
</head>
@@ -34,7 +35,7 @@
</nav>
<div id="page_title">
<h1><span>Χώρος </span>Συζήτησης Ενημέρωσης</h1>
- <h2><%=link_to (image_tag "facebook_32.png", :size => "32x32"),{},:title=>'Facebook',:target=>'_blank',:href=>'http://www.facebook.com'%>οιτητών <span> EAΠ και </span>διδασκόν<%= link_to (image_tag "twitter_32.png", :size => "32x32"),{},:title=>'Twitter',:target=>'_blank',:href=>'http://www.twitter.com'
+ <h2><%= link_to (image_tag "facebook_32.png", :size => "32x32"),{},:title=>'Facebook',:target=>'_blank',:href=>'http://www.facebook.com' %>οιτητών <span> EAΠ και </span>διδασκόν<%= link_to (image_tag "twitter_32.png", :size => "32x32"),{},:title=>'Twitter',:target=>'_blank',:href=>'http://www.twitter.com'
%>ων <span><%= l(Time.now, :format => :default) %></span> </p></h2>
</div>
</header>
@@ -46,7 +47,7 @@
<%= request.path == all_questions_path ? raw("<li class='selected'>") : raw("<li>") %>
<li><%= link_to "Όλες οι ερωτήσεις", all_questions_path %></li>
<%= request.path == about_questions_path ? raw("<li class='selected'>") : raw("<li>") %>
- <li><%= link_to "Οδηγός χρήσης", about_questions_path %></li>
+ <li><%= link_to "Ημερολόγιο", writings_path %></li>
<li id="listsearch">
<%= form_tag all_questions_path, :method => 'get' do %>
<%= text_field_tag :search, params[:search] %>
View
7 app/views/layouts/application.html.erb~
@@ -1,10 +1,11 @@
<!DOCTYPE html>
<html>
<head>
+ <meta charset="utf-8">
<title>Diplomatiki</title>
<%= stylesheet_link_tag :all %>
<%= javascript_include_tag :defaults %>
- <%= javascript_include_tag 'jquery-1.7.2.min.js', 'jquery-ui-1.8.20.custom.min.js', 'autocomplete-rails.js', 'rails.js' %>
+ <%= javascript_include_tag 'jquery-1.7.2.min.js', 'jquery-ui-1.8.20.custom.min.js', 'autocomplete-rails.js', 'rails.js', 'ui.datepicker-el.js' %>
<%= stylesheet_link_tag 'jquery-ui-1.8.20.custom.css' %>
<%= csrf_meta_tag %>
</head>
@@ -34,7 +35,7 @@
</nav>
<div id="page_title">
<h1><span>Χώρος </span>Συζήτησης Ενημέρωσης</h1>
- <h2><%=link_to (image_tag "facebook_32.png", :size => "32x32"),{},:title=>'Facebook',:target=>'_blank',:href=>'http://www.facebook.com'%>οιτητών <span> EAΠ και </span>διδασκόν<%= link_to (image_tag "twitter_32.png", :size => "32x32"),{},:title=>'Twitter',:target=>'_blank',:href=>'http://www.twitter.com'
+ <h2><%= link_to (image_tag "facebook_32.png", :size => "32x32"),{},:title=>'Facebook',:target=>'_blank',:href=>'http://www.facebook.com' %>οιτητών <span> EAΠ και </span>διδασκόν<%= link_to (image_tag "twitter_32.png", :size => "32x32"),{},:title=>'Twitter',:target=>'_blank',:href=>'http://www.twitter.com'
%>ων <span><%= l(Time.now, :format => :default) %></span> </p></h2>
</div>
</header>
@@ -50,7 +51,7 @@
<li id="listsearch">
<%= form_tag all_questions_path, :method => 'get' do %>
<%= text_field_tag :search, params[:search] %>
- <%= submit_tag "Αναζήτηση", :name => nil, :class => "awesome search red" %>
+ <li> <%= submit_tag "Αναζήτηση", :name => nil, :class => "awesome search red" %> </li>
<li><%= link_to "Ασκήσεις", exercises_path %></li>
<% end %>
</li>
View
4 app/views/questions/_form.html.erb
@@ -1,7 +1,7 @@
<%= form_for(@question) do |f| %>
<% if @question.errors.any? %>
<div id="error_explanation">
- <h2><%= pluralize(@question.errors.count, "error") %>: και έτσι δεν επιτρέπεται η αποθήκευση της ερώτησης</h2>
+ <h2><%= pluralize(@question.errors.count, "σφάλμα") %> και έτσι δεν επιτρέπεται η αποθήκευση της ερώτησης</h2>
<ul>
<% @question.errors.full_messages.each do |msg| %>
@@ -36,7 +36,7 @@
</div>
<div class="actions">
- <%= f.submit :class => "awesome custom red" %>
+ <%= f.submit "Δημιουργία ερώτησης", :class => "awesome custom red" %>
<%= link_to 'Εμφάνιση αυτής της ερώτησης', @question, :class => "awesome custom red" %>
<%= link_to 'Επιστροφή στις ερωτήσεις μου', myquestions_questions_path, :class => "awesome custom red" %>
</div>
View
7 app/views/questions/_form.html.erb~
@@ -1,7 +1,7 @@
-<%= form_for(@question) do |f| %>
++<%= form_for(@question) do |f| %>
<% if @question.errors.any? %>
<div id="error_explanation">
- <h2><%= pluralize(@question.errors.count, "error") %>: και έτσι δεν επιτρέπεται η αποθήκευση της ερώτησης</h2>
+ <h2><%= pluralize(@question.errors.count, "σφάλμα") %> και έτσι δεν επιτρέπεται η αποθήκευση της ερώτησης</h2>
<ul>
<% @question.errors.full_messages.each do |msg| %>
@@ -12,7 +12,6 @@
<% end %>
-
<% # Ο τίτλος του άρθρου δεν μπορεί να αλλάξει εφόσον το άρθρο γίνει αποδεκτό %>
<% if @question.state < 3 %>
<div class="field">
@@ -37,7 +36,7 @@
</div>
<div class="actions">
- <%= f.submit :class => "awesome custom red" %>
+ <%= f.submit "Δημιουργία ερώτησης", :class => "awesome custom red" %>
<%= link_to 'Εμφάνιση αυτής της ερώτησης', @question, :class => "awesome custom red" %>
<%= link_to 'Επιστροφή στις ερωτήσεις μου', myquestions_questions_path, :class => "awesome custom red" %>
</div>
View
7 app/views/questions/show.html.erb
@@ -8,7 +8,9 @@
</h2>
- <div class="byline">Γράφτηκε από: <%= link_to @question.user.fullname, "" %></div>
+ <div class="byline">Γράφτηκε από: <%= @question.user.fullname %>, Θεματική ενότητα: <%= @question.user.lesson.name %></div>
+ <div class="byline">Προσωπική ιστοσελίδα: <%= link_to @question.user.weburl, url_for(@question.user.weburl) %></div>
+ <div class="byline">Σύντομο βιογραφικό: <%= @question.user.shortbio %></div>
<div class="avatar"><%= image_tag gravatar(@question.user.email, 64) %></div>
@@ -52,7 +54,8 @@
<div class="avatar"><%= image_tag gravatar(comment.user.email, 48) %></div>
<div class="commentbody">
<div class="commenthead">
- <%= comment.user.fullname %> - <%=time_ago_in_words(comment.created_at)%> πριν
+ <%= link_to comment.user.fullname, url_for(comment.user.weburl) %>, <%= @current_user.lesson.name %>, - <%=time_ago_in_words(comment.created_at)%> πριν
+
<% # display delete link only for comments written by this particular user %>
<% if user_signed_in? and comment.user_id == current_user.id %>
<span><%= link_to 'Διαγραφή', question_comment_path(@question, comment), :confirm => 'Are you sure?', :method => :delete, :class => "" %></span>
View
7 app/views/questions/show.html.erb~
@@ -8,7 +8,9 @@
</h2>
- <div class="byline">Γράφτηκε από: <%= link_to @question.user.fullname, "" %></div>
+ <div class="byline">Γράφτηκε από: <%= @question.user.fullname %>, Θεματική ενότητα: <%= @question.user.lesson.name %></div>
+ <div class="byline">Προσωπική ιστοσελίδα: <%= link_to @question.user.weburl, url_for(@question.user.weburl) %></div>
+ <div class="byline">Σύντομο βιογραφικό: <%= @question.user.shortbio %></div>
<div class="avatar"><%= image_tag gravatar(@question.user.email, 64) %></div>
@@ -52,7 +54,8 @@
<div class="avatar"><%= image_tag gravatar(comment.user.email, 48) %></div>
<div class="commentbody">
<div class="commenthead">
- <%= comment.user.fullname %> - <%=time_ago_in_words(comment.created_at)%> πριν
+ <%= link_to comment.user.fullname %>, <%= @current_user.lesson.name %>, - <%=time_ago_in_words(comment.created_at)%> πριν
+
<% # display delete link only for comments written by this particular user %>
<% if user_signed_in? and comment.user_id == current_user.id %>
<span><%= link_to 'Διαγραφή', question_comment_path(@question, comment), :confirm => 'Are you sure?', :method => :delete, :class => "" %></span>
View
8 app/views/users/registrations/edit.html.erb~
@@ -10,16 +10,16 @@
<p>Ο Χώρος συζήτησης ενημέρωσης χρησιμοποιεί την υπηρεσία Gravatar και σε συνδυασμό με την ηλεκτρονική σας διεύθυνση εμφανίζει την avatar εικόνα σας. Μπορείτε να ρυθμίσετε το avatar σας στο <%= link_to 'Gravatar', 'http://www.gravatar.com' %>.<br />
- <p><%= f.label 'name', 'Όνομα Επίθετο' %><span>(Θα εμφανίζεται στις ερωτήσειςα / σχόλια)</span><br />
+ <p><%= f.label 'name', 'Όνομα Επίθετο' %><span>(Θα εμφανίζεται στις ερωτήσεις / σχόλια)</span><br />
<%= f.text_field :fullname %></p>
- <p><%= f.label 'lesson', 'Θεματική ενότητα' %><span> (Θα εμφανίζεται στις ερωτήσειςα / σχόλια)</span><br />
+ <p><%= f.label 'lesson', 'Θεματική ενότητα' %>><br />
<%= f.select :lesson_id, @lessons %></p>
- <p><%= f.label 'about', 'Σχετικά με εμένα' %><span> (Θα εμφανίζεται στις ερωτήσεις)</span><br />
+ <p><%= f.label 'about', 'Σχετικά με εμένα' %><br />
<%= f.text_area :shortbio, :size => "90%x5", :class => "fullwidth" %></p>
- <p><%= f.label 'url', 'Η προσωπική σας ιστοσελίδα' %><span> (Θα εμφανίζεται στις ερωτήσειςα / σχόλια)</span><br />
+ <p><%= f.label 'url', 'Η προσωπική σας ιστοσελίδα' %><span> (Θα εμφανίζεται στις ερωτήσεις / σχόλια)</span><br />
<%= f.url_field :weburl %></p>
<p><%= f.label :password %> <span> (Εάν δεν θέλεις να το αλλάξεις άφησέ το κενό)</span><br />
View
31 app/views/writings/_form.html.erb
@@ -0,0 +1,31 @@
+<%= form_for(@writing) do |f| %>
+ <% if @writing.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@writing.errors.count, "σφάλμα") %> και έτσι δεν επιτρέπεται η αποθήκευση της άσκησης</h2>
+
+ <ul>
+ <% @writing.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+
+
+ <div class="field">
+ <p> Επιλογή της άσκησης
+ <%= select_tag :exercise_id, options_for_select(@exercise.collect{ |e| [e.etitle, e.id] }) %>
+ </div>
+</p>
+
+ <div class="field">
+ <p> Επιλογή της ημερομηνίας
+ <%= f.text_field :writing_date %>
+ </div>
+ </p>
+
+ <div class="actions">
+ <%= f.submit "Προγραμματισμός", :class => "awesome custom red" %>
+ </div>
+
+<% end %>
View
32 app/views/writings/_form.html.erb~
@@ -0,0 +1,32 @@
+<%= form_for(@writing) do |f| %>
+ <% if @writing.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@writing.errors.count, "σφάλμα") %> και έτσι δεν επιτρέπεται η αποθήκευση της άσκησης</h2>
+
+ <ul>
+ <% @writing.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+
+
+ <div class="field">
+ <p> Επιλογή της άσκησης
+ <%= select_tag :exercise_id, options_for_select(@exercise.collect{ |e| [e.etitle, e.id] }) %>
+ </div>
+</p>
+
+ <div class="field">
+ <p> Επιλογή της ημερομηνίας
+ <%= f.text_field :writing_date %>
+ <%= f.text_field :writing_date %>
+ </div>
+ </p>
+
+ <div class="actions">
+ <%= f.submit "Προγραμματισμός", :class => "awesome custom red" %>
+ </div>
+
+<% end %>
View
0 app/views/writings/edit.html.erb
No changes.
View
23 app/views/writings/index.html.erb
@@ -0,0 +1,23 @@
+<div id="page_title">
+<div id="calendar">
+ <h1 id="month">
+ <%= link_to "<", :month => (@date.beginning_of_month-1).strftime("%Y-%m-01") %>
+ <span><%= I18n.localize(@date, :format => '%B %Y') %></span>
+ <%= link_to ">", :month => (@date.end_of_month+1).strftime("%Y-%m-01") %>
+ </h1>
+ <% calendar_for @writings, :year => @date.year, :month => @date.month do |calendar| %>
+ <%= calendar.head('Κυριακή', 'Δευτέρα', 'Τρίτη', 'Τετάρτη', 'Πέμπτη', 'Παρασκευή', 'Σάββατο') %>
+ <% calendar.day(:day_method => :writing_date) do |date, writings| %>
+ <%= date.day %>
+ <ul>
+ <% for writing in writings %>
+ <li><%= link_to (writing.exercise.etitle), writing %></li>
+ <% if admin_signed_in %>
+ <li><%= link_to 'Διαγραφή', writing, :confirm => 'Είσαι σίγουρος?', :method => :delete %></li>
+ <% end %>
+ <% end %>
+ </ul>
+ <% end %>
+ <% end %>
+</div>
+</div>
View
23 app/views/writings/index.html.erb~
@@ -0,0 +1,23 @@
+<div id="page_title">
+<div id="calendar">
+ <h1 id="month">
+ <%= link_to "<", :month => (@date.beginning_of_month-1).strftime("%Y-%m-01") %>
+ <span><%= I18n.localize(@date, :format => '%B %Y') %></span>
+ <%= link_to ">", :month => (@date.end_of_month+1).strftime("%Y-%m-01") %>
+ </h1>
+ <% calendar_for @writings, :year => @date.year, :month => @date.month do |calendar| %>
+ <%= calendar.head('Κυριακή', 'Δευτέρα', 'Τρίτη', 'Τετάρτη', 'Πέμπτη', 'Παρασκευή', 'Σάββατο') %>
+ <% calendar.day(:day_method => :writing_date) do |date, writings| %>
+ <%= date.day %>
+ <ul>
+ <% for writing in writings %>
+ <li><%= link_to (writing.exercise.etitle), writing_path %></li>
+ <% if admin_signed_in %>
+ <li><%= link_to 'Διαγραφή', writing, :confirm => 'Είσαι σίγουρος?', :method => :delete %></li>
+ <% end %>
+ <% end %>
+ </ul>
+ <% end %>
+ <% end %>
+</div>
+</div>
View
7 app/views/writings/new.html.erb
@@ -0,0 +1,7 @@
+<section id="mywritings">
+ <h2>Ορισμός ημερομηνίας παράδοσης της άσκησης</h2>
+
+ <%= render 'form' %>
+
+
+</section>
View
7 app/views/writings/new.html.erb~
@@ -0,0 +1,7 @@
+<section id="mywritings">
+ <h2>Ορισμός τελικής ημερομηνίας παράδοσης της άσκησης</h2>
+
+ <%= render 'form' %>
+
+
+</section>
View
23 app/views/writings/show.html.erb
@@ -0,0 +1,23 @@
+<section id="writings">
+
+
+<p>
+ <b>Ημερομηνία:</b>
+ <%= l(@writing.writing_date, :format => :long) %>
+</p>
+
+<p>
+ <b>Τίτλος άσκησης:</b>
+ <%= @writing.exercise.etitle %>
+</p>
+
+<p>
+ <b>Οδηγίες επίλυσης:</b>
+ <%= @writing.exercise.ebody %>
+</p>
+
+<p>
+<%= link_to "Ημερολόγιο", writings_path, :class => "awesome custom red" %>
+</p>
+
+</section>
View
23 app/views/writings/show.html.erb~
@@ -0,0 +1,23 @@
+<section id="writings">
+
+
+<p>
+ <b>Ημερομηνία:</b>
+ <%= l(@writing.writing_date, :format => :default) %>
+</p>
+
+<p>
+ <b>Τίτλος άσκησης:</b>
+ <%= @writing.exercise.etitle %>
+</p>
+
+<p>
+ <b>Οδηγίες επίλυσης:</b>
+ <%= @writing.exercise.ebody %>
+</p>
+
+<p>
+<%= link_to "Ημερολόγιο", writings_path, :class => "awesome custom red" %>
+</p>
+
+</section>
View
2 config/initializers/omniauth.rb
@@ -12,7 +12,7 @@
elsif Rails.env.development?
provider :twitter, 'HWeGxTH2ysMmPnQUhbsQg', 'ud2YQ1u9PByzQsfGE2OF2khrC3vR4RIw6Oxpju5b948'
- provider :facebook, '241098305977064', '3da066f5216ff5833ee821d9c8764fb8', {:scope => 'user_about_me,friends_about_me,user_activities,friends_activities,user_birthday,friends_birthday,user_checkins,friends_checkins,user_education_history,friends_education_history,user_events,friends_events,user_groups,friends_groups,user_hometown,friends_hometown,user_interests,friends_interests,user_likes,friends_likes,user_location,friends_location,user_notes,friends_notes,user_online_presence,friends_online_presence,user_photo_video_tags,friends_photo_video_tags,user_photos,friends_photos,user_questions,friends_questions,user_relationships,friends_relationships,user_relationship_details,friends_relationship_details,user_religion_politics,friends_religion_politics,user_status,friends_status,user_videos,friends_videos,user_website,friends_website,user_work_history,friends_work_history,email,read_friendlists,read_insights,read_mailbox,read_requests,read_stream,xmpp_login,ads_management,create_event,manage_friendlists,manage_notifications,offline_access,publish_checkins,publish_stream,rsvp_event,publish_actions,manage_pages,user_subscriptions', :client_options => {:ssl => {:ca_file => "/usr/lib/ssl/certs/ca-certificates.crt"}}}
+ provider :facebook, '241098305977064', '3da066f5216ff5833ee821d9c8764fb8', {:scope => 'manage_notifications,offline_access,publish_checkins,publish_stream,rsvp_event,publish_actions,manage_pages,user_subscriptions', :client_options => {:ssl => {:ca_file => "/usr/lib/ssl/certs/ca-certificates.crt"}}}
# {:scope => 'PERMISSION_1, PERMISSION_2, PERMISSION_3...', :client_options => {:ssl => {:ca_file => '/usr/lib/ssl/certs/ca-certificates.crt'}}}
end
end
View
5 config/initializers/omniauth.rb~
@@ -8,10 +8,11 @@ require 'openid/store/filesystem'
if Rails.env.production?
provider :twitter, 'M3IMKhfAI2AdHx8ZQ5GXw', 'eWEAdm1uBneZgr4zHGCm04ywgzqMVTonkySZU1JiDLI'
- provider :facebook, '303767306344343', '11193324352b3c009165ca20030e3ae2', {:scope => 'user_about_me,friends_about_me,user_activities,friends_activities,user_birthday,friends_birthday,user_checkins,friends_checkins,user_education_history,friends_education_history,user_events,friends_events,user_groups,friends_groups,user_hometown,friends_hometown,user_interests,friends_interests,user_likes,friends_likes,user_location,friends_location,user_notes,friends_notes,user_online_presence,friends_online_presence,user_photo_video_tags,friends_photo_video_tags,user_photos,friends_photos,user_questions,friends_questions,user_relationships,friends_relationships,user_relationship_details,friends_relationship_details,user_religion_politics,friends_religion_politics,user_status,friends_status,user_videos,friends_videos,user_website,friends_website,user_work_history,friends_work_history,email,read_friendlists,read_insights,read_mailbox,read_requests,read_stream,xmpp_login,ads_management,create_event,manage_friendlists,manage_notifications,offline_access,publish_checkins,publish_stream,rsvp_event,publish_actions,manage_pages,user_subscriptions', :client_options => {:ssl => {:ca_file => "/usr/lib/ssl/certs/ca-certificates.crt"}}}
+ provider :facebook, '303767306344343', '11193324352b3c009165ca20030e3ae2', :scope => 'offline_access,publish_stream,manage_pages,user_about_me,friends_about_me,user_activities,friends_activities,user_birthday,friends_birthday,user_checkins,friends_checkins,user_education_history,friends_education_history,user_events,friends_events,user_groups,friends_groups,user_hometown,friends_hometown,user_interests,friends_interests,user_likes,friends_likes,user_location,friends_location,user_notes,friends_notes,user_online_presence,friends_online_presence,user_photo_video_tags,friends_photo_video_tags,user_photos,friends_photos,user_questions,friends_questions,user_relationships,friends_relationships,user_relationship_details,friends_relationship_details,user_religion_politics,friends_religion_politics,user_status,friends_status,user_videos,friends_videos,user_website,friends_website,user_work_history,friends_work_history,email,read_friendlists,read_insights,read_mailbox,read_requests,read_stream,xmpp_login,ads_management,create_event,manage_friendlists,manage_notifications,publish_checkins,rsvp_event,publish_actions,user_subscriptions', :client_options => {:ssl => {:ca_file => "/etc/ssl/certs"}}
+
elsif Rails.env.development?
provider :twitter, 'HWeGxTH2ysMmPnQUhbsQg', 'ud2YQ1u9PByzQsfGE2OF2khrC3vR4RIw6Oxpju5b948'
- provider :facebook, '241098305977064', '3da066f5216ff5833ee821d9c8764fb8', :scope => 'offline_access,publish_stream,manage_pages,user_about_me,friends_about_me,user_activities,friends_activities,user_birthday,friends_birthday,user_checkins,friends_checkins,user_education_history,friends_education_history,user_events,friends_events,user_groups,friends_groups,user_hometown,friends_hometown,user_interests,friends_interests,user_likes,friends_likes,user_location,friends_location,user_notes,friends_notes,user_online_presence,friends_online_presence,user_photo_video_tags,friends_photo_video_tags,user_photos,friends_photos,user_questions,friends_questions,user_relationships,friends_relationships,user_relationship_details,friends_relationship_details,user_religion_politics,friends_religion_politics,user_status,friends_status,user_videos,friends_videos,user_website,friends_website,user_work_history,friends_work_history,email,read_friendlists,read_insights,read_mailbox,read_requests,read_stream,xmpp_login,ads_management,create_event,manage_friendlists,manage_notifications,publish_checkins,rsvp_event,publish_actions,user_subscriptions', :client_options => {:ssl => {:ca_file => "/etc/ssl/certs"}}
+ provider :facebook, '241098305977064', '3da066f5216ff5833ee821d9c8764fb8', {:scope => 'user_about_me,friends_about_me,user_activities,friends_activities,user_birthday,friends_birthday,user_checkins,friends_checkins,user_education_history,friends_education_history,user_events,friends_events,user_groups,friends_groups,user_hometown,friends_hometown,user_interests,friends_interests,user_likes,friends_likes,user_location,friends_location,user_notes,friends_notes,user_online_presence,friends_online_presence,user_photo_video_tags,friends_photo_video_tags,user_photos,friends_photos,user_questions,friends_questions,user_relationships,friends_relationships,user_relationship_details,friends_relationship_details,user_religion_politics,friends_religion_politics,user_status,friends_status,user_videos,friends_videos,user_website,friends_website,user_work_history,friends_work_history,email,read_friendlists,read_insights,read_mailbox,read_requests,read_stream,xmpp_login,ads_management,create_event,manage_friendlists,manage_notifications,offline_access,publish_checkins,publish_stream,rsvp_event,publish_actions,manage_pages,user_subscriptions', :client_options => {:ssl => {:ca_file => "/usr/lib/ssl/certs/ca-certificates.crt"}}}
# {:scope => 'PERMISSION_1, PERMISSION_2, PERMISSION_3...', :client_options => {:ssl => {:ca_file => '/usr/lib/ssl/certs/ca-certificates.crt'}}}
end
end
View
24 config/locales/el.yml
@@ -40,18 +40,18 @@ el:
short: ! '%d %b'
month_names:
-
- - Ιανουαρίου
- - Φεβρουαρίου
- - Μαρτίου
- - Απριλίου
- - Μαΐου
- - Ιουνίου
- - Ιουλίου
- - Αυγούστου
- - Σεπτεμβρίου
- - Οκτωβρίου
- - Νοεμβρίου
- - Δεκεμβρίου
+ - Ιανουάριος
+ - Φεβρουάριος
+ - Μάρτιος
+ - Απρίλιος
+ - Μάιος
+ - Ιούνιος
+ - Ιούλιος
+ - Αύγουστος
+ - Σεπτέμβριος
+ - Οκτώβριος
+ - Νοέμβριος
+ - Δεκέμβριος
order:
- :day
- :month
View
4 config/locales/el.yml~
@@ -1,4 +1,8 @@
el:
+ will_paginate:
+ next_label: επόμενη σελίδα
+ previous_label: προηγούμενη σελίδα
+
date:
abbr_day_names:
- Κυρ
View
7 config/routes.rb
@@ -1,11 +1,16 @@
Diplomatiki::Application.routes.draw do
- resources :exercises
+ resources :exercises do
+ collection do
+ get 'myexercises'
+ end
+ end
devise_for :users, :controllers => { :registrations => "users/registrations" }
match '/auth/:provider/callback' => 'services#create'
match '/auth/twitter', :as => :auth_twitter
+ resources :writings
resources :services, :only => [:index, :create, :destroy]
View
14 config/routes.rb~
@@ -1,12 +1,20 @@
Diplomatiki::Application.routes.draw do
- resources :exercises
+ resources :exercises do
+ collection do
+ get 'myexercises'
+ end
+ end
devise_for :users, :controllers => { :registrations => "users/registrations" }
match '/auth/:provider/callback' => 'services#create'
match '/auth/twitter', :as => :auth_twitter
-
+ resources :writings do
+ collection do
+ get 'autocomplete_tag_name'
+ end
+ end
resources :services, :only => [:index, :create, :destroy]
resources :admin, :only => [:index, :delete] do
@@ -38,7 +46,7 @@ Diplomatiki::Application.routes.draw do
get 'postfacebook'
end
- resources :comments, :only => [:create, :edit, :update, :destroy]
+ resources :comments, :only => [:create, :destroy]
resources :ratings, :only => [:create, :update, :destroy]
end
View
4 config/s3.yml~
@@ -0,0 +1,4 @@
+#development:
+ #bucket: diplomatiki-dev
+ #access_key_id: AKIAILCVVRSCL2BKISRQ
+ #secret_access_key: 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
View
1 db/migrate/20120514223800_create_writings.rb
@@ -7,6 +7,7 @@ def self.up
t.timestamps
end
+ #scope :exercised, lambda { |exercise_id| where("exercise_id = ?", exercise_id)}
end
def self.down
View
16 db/migrate/20120514223800_create_writings.rb~
@@ -0,0 +1,16 @@
+class CreateWritings < ActiveRecord::Migration
+ def self.up
+ create_table :writings do |t|
+ t.integer :user_id
+ t.integer :exercise_id
+ t.date :writing_date
+
+ t.timestamps
+ end
+ scope :exercised, lambda { |exercise_id| where("exercise_id = ?", exercise_id)}
+ end
+
+ def self.down
+ drop_table :writings
+ end
+end
View
15 db/migrate/20120517142448_add_attachment_askisi_to_exercises.rb
@@ -0,0 +1,15 @@
+class AddAttachmentAskisiToExercises < ActiveRecord::Migration
+ def self.up
+ add_column :exercises, :askisi_file_name, :string
+ add_column :exercises, :askisi_content_type, :string
+ add_column :exercises, :askisi_file_size, :integer
+ add_column :exercises, :askisi_updated_at, :datetime
+ end
+
+ def self.down
+ remove_column :exercises, :askisi_file_name
+ remove_column :exercises, :askisi_content_type
+ remove_column :exercises, :askisi_file_size
+ remove_column :exercises, :askisi_updated_at
+ end
+end
View
8 db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20120514223800) do
+ActiveRecord::Schema.define(:version => 20120517142448) do
create_table "comments", :force => true do |t|
t.integer "user_id"
@@ -26,9 +26,13 @@
create_table "exercises", :force => true do |t|
t.string "etitle"
t.text "ebody"
- t.decimal "average", :precision => 3, :scale => 1
+ t.decimal "average", :precision => 3, :scale => 1
t.datetime "created_at"
t.datetime "updated_at"
+ t.string "askisi_file_name"
+ t.string "askisi_content_type"
+ t.integer "askisi_file_size"
+ t.datetime "askisi_updated_at"
end
create_table "lessons", :force => true do |t|
View
BIN public/images/calendar.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
10 public/javascripts/application.js
@@ -1,2 +1,12 @@
// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
+$(function() {
+ $( "#writing_writing_date" ).datepicker({
+ dateFormat: "yy/mm/dd",
+ numberOfMonths: 2,
+ showButtonPanel: true,
+ showOn: "button",
+ buttonText: "Εμφάνιση ημερολογίου",
+ },
+ $.datepicker.regional["el"]);
+ });
View
13 public/javascripts/application.js~
@@ -0,0 +1,13 @@
+// Place your application-specific JavaScript functions and classes here
+// This file is automatically included by javascript_include_tag :defaults
+$(function() {
+ $( "#writing_writing_date" ).datepicker({
+ dateFormat: "yy/mm/dd",
+ numberOfMonths: 2,
+ showButtonPanel: true,
+ showOn: "button",
+ buttonImage: "public/images/calendar.gif",
+ buttonImageOnly: true
+ },
+ $.datepicker.regional["el"]);
+ });
View
11 public/javascripts/datepickers.js
@@ -0,0 +1,11 @@
+function getUserLanguage()
+{
+ var locale = (navigator.userLanguage == undefined) ? navigator.language : navigator.userLanguage;
+ var locale_str = locale.toLowerCase().split('-');
+
+ return locale_str[0];
+}
+
+$(document).ready(function() {
+ $("#writing_writing_date").datepicker($.datepicker.regional[getUserLanguage()]);
+});
View
11 public/javascripts/datepickers.js~
@@ -0,0 +1,11 @@
+function getUserLanguage()
+{
+ var locale = (navigator.userLanguage == undefined) ? navigator.language : navigator.userLanguage;
+ var locale_str = locale.toLowerCase().split('-');
+
+ return locale_str[0];
+}
+
+$(document).ready(function() {
+ $("#post_date").datepicker($.datepicker.regional[getUserLanguage()]);
+});
View
26 public/javascripts/jquery-ui.datepicker-el.js~
@@ -0,0 +1,26 @@
+/* Greek (el) initialisation for the jQuery UI date picker plugin. */
+/* Written by Alex Cicovic (http://www.alexcicovic.com) */
+jQuery(function($){
+ $.datepicker.regional["en"] = {}, //datepicker defaults are in English!
+
+ $.datepicker.regional["el"] = {
+ closeText: "Κλείσιμο",
+ prevText: "Προηγούμενος",
+ nextText: "Επόμενος",
+ currentText: "Τρέχων Μήνας",
+ monthNames: ["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος",
+ "Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],
+ monthNamesShort: ["Ιαν","Φεβ","Μαρ","Απρ","Μαι","Ιουν",
+ "Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],
+ dayNames: ["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],
+ dayNamesShort: ["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],
+ dayNamesMin: ["Κυ","Δε","Τρ","Τε","Πε","Πα","Σα"],
+ dateFormat: "dd/mm/yy",
+ firstDay: 1,
+ weekHeader: "Εβδ",
+ isRTL: !1,
+ showMonthAfterYear: !1,
+ yearSuffix: ""
+ };
+ $.datepicker.setDefaults($.datepicker.regional["el"]);
+});
View
26 public/javascripts/jquery-ui.datepicker-i18n.js~
@@ -0,0 +1,26 @@
+/* Greek (el) initialisation for the jQuery UI date picker plugin. */
+/* Written by Alex Cicovic (http://www.alexcicovic.com) */
+jQuery(function(){
+ $.datepicker.regional["en"] = {}, //datepicker defaults are in English!
+
+ $.datepicker.regional['el'] = {
+ closeText: "Κλείσιμο",
+ prevText: "Προηγούμενος",
+ nextText: "Επόμενος",
+ currentText: "Τρέχων Μήνας",
+ monthNames: ["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος",
+ "Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],
+ monthNamesShort: ["Ιαν","Φεβ","Μαρ","Απρ","Μαι","Ιουν",
+ "Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],
+ dayNames: ["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],
+ dayNamesShort: ["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],
+ dayNamesMin: ["Κυ","Δε","Τρ","Τε","Πε","Πα","Σα"],
+ dateFormat: "dd/mm/yy",
+ firstDay: 1,
+ weekHeader: "Εβδ",
+ isRTL: !1,
+ showMonthAfterYear: !1,
+ yearSuffix: ""
+ };
+ $.datepicker.setDefaults($.datepicker.regional["el"]);
+});
View
24 public/javascripts/jquery.ui.datepicker-el.js~
@@ -0,0 +1,24 @@
+/* Greek (el) initialisation for the jQuery UI date picker plugin. */
+/* Written by Alex Cicovic (http://www.alexcicovic.com) */
+jQuery(function($){
+ $.datepicker.regional['el'] = {
+ closeText: 'Κλείσιμο',
+ prevText: 'Προηγούμενος',
+ nextText: 'Επόμενος',
+ currentText: 'Τρέχων Μήνας',
+ monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος',
+ 'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'],
+ monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν',
+ 'Ιουλ','Αυγ','Σεπ','Οκτ','Νοε','Δεκ'],
+ dayNames: ['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'],
+ dayNamesShort: ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'],
+ dayNamesMin: ['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'],
+ weekHeader: 'Εβδ',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $(selector).datepicker($.datepicker.regional['fr']);
+
+});
View
24 public/javascripts/ui.datepicker-el.js
@@ -0,0 +1,24 @@
+/* Greek (el) initialisation for the jQuery UI date picker plugin. */
+/* Written by Alex Cicovic (http://www.alexcicovic.com) */
+jQuery(function($){
+ $.datepicker.regional["el"] = {
+ closeText: "Κλείσιμο",
+ prevText: "Προηγούμενος",
+ nextText: "Επόμενος",
+ currentText: "Σήμερα",
+ monthNames: ["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος",
+ "Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],
+ monthNamesShort: ["Ιαν","Φεβ","Μαρ","Απρ","Μαι","Ιουν",
+ "Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],
+ dayNames: ["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],
+ dayNamesShort: ["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],
+ dayNamesMin: ["Κυ","Δε","Τρ","Τε","Πε","Πα","Σα"],
+ dateFormat: "dd/mm/yy",
+ firstDay: 1,
+ weekHeader: "Εβδ",
+ isRTL: !1,
+ showMonthAfterYear: !1,
+ yearSuffix: ""
+ };
+ $.datepicker.setDefaults($.datepicker.regional["el"]);
+});
View
24 public/javascripts/ui.datepicker-el.js~
@@ -0,0 +1,24 @@
+/* Greek (el) initialisation for the jQuery UI date picker plugin. */
+/* Written by Alex Cicovic (http://www.alexcicovic.com) */
+jQuery(function($){
+ $.datepicker.regional["el"] = {
+ closeText: "Κλείσιμο",
+ prevText: "Προηγούμενος",
+ nextText: "Επόμενος",
+ currentText: "Τρέχων Μήνας",
+ monthNames: ["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος",
+ "Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],
+ monthNamesShort: ["Ιαν","Φεβ","Μαρ","Απρ","Μαι","Ιουν",
+ "Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],
+ dayNames: ["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],
+ dayNamesShort: ["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],
+ dayNamesMin: ["Κυ","Δε","Τρ","Τε","Πε","Πα","Σα"],
+ dateFormat: "dd/mm/yy",
+ firstDay: 1,
+ weekHeader: "Εβδ",