diff --git a/Gemfile b/Gemfile
index c7be26d..449a132 100755
--- a/Gemfile
+++ b/Gemfile
@@ -6,3 +6,5 @@ gem 'mysql2' , '~>0.2.7'
gem 'will_paginate', '~> 3.0.beta'
gem 'themes_for_rails'
gem "ezcrypto", "~> 0.7.2"
+gem "calendar_view", "~> 0.0.3"
+gem 'bluecloth', '>= 2.0.0'
diff --git a/README.markdown b/README.markdown
index d810ce2..6dcff2b 100755
--- a/README.markdown
+++ b/README.markdown
@@ -1,16 +1,15 @@
## Introduction
-_Mailr_ is a IMAP mail client based on _Ruby on Rails_ platform.
+_MailR_ is a IMAP mail client based on _Ruby on Rails_ platform.
**NOTE** All path and filenames are based on _Rails.root_ directory.
-### Requirements
+## Requirements
In _Rails 3_ all dependencies should be defined in file _Gemfile_. All needed gems can be installed using bundler.
-### Installation procedure
+## Installation procedure
* Checkout the source code.
-
* Install all dependiences. Check if proper gems (sqlite3/mysql/postgresql) are defined in _Gemfile_ and installed. Use _bundler_ for that:
```shell
@@ -18,17 +17,12 @@ bundle install
```
* Check _config/defaults.yml_ for proper values.
-
* Prepare config/database.yml file (see _config/database.yml.example_).
-
* Migrate database (rake db:migrate)
-
* Start rails server if applicable
-
* Point your browser to application URL:
For local access: http://localhost:3000
For remote access: http://some_url/mailr
-
* Using browser do basic setup. If You make a mistake delete all data from DB using rake task:
```shell
@@ -37,7 +31,7 @@ rake db:clear_data
* Use it.
-### Specific configuration
+## Specific configuration
For themes: if server sends files with no content in production mode comment out
@@ -45,4 +39,4 @@ For themes: if server sends files with no content in production mode comment out
config.action_dispatch.x_sendfile_header = "X-Sendfile"
```
-from _config/environments/production.rb_ file.
+in _config/environments/production.rb_ file.
diff --git a/config/about.txt b/config/about.txt
deleted file mode 100755
index 1d544fe..0000000
--- a/config/about.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-0.8.3
-
-* export, imports of contact
-
diff --git a/config/defaults.yml b/config/defaults.yml
index ddc3076..526280e 100755
--- a/config/defaults.yml
+++ b/config/defaults.yml
@@ -1,4 +1,4 @@
-version: 0.8.3
+version: 0.8.4
theme: olive
locale: pl
@@ -45,4 +45,4 @@ session_password: asDD3s2@sAdc983#
mailbox_max_parent_folder_depth: 3
# array of logins which only can login to application, comment it to allow everyone to login
-only_can_logins: [wojciech@todryk.pl]
+only_can_logins: [soldier]
diff --git a/config/todo.txt b/config/todo.txt
deleted file mode 100755
index 5d99a19..0000000
--- a/config/todo.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-app/controllers/folders_controller.rb:
- * [ 30] [TODO] recreate local copy of folders
- * [ 99] [TODO] save system folders
-
-app/controllers/messages_controller.rb:
- * [101] [FIXME] missing fields and support arrays
-
-app/controllers/messages_ops_controller.rb:
- * [128] [FIXME] check if uploads directory exists
- * [176] [FIXME] check if domain is set
- * [192] [TODO] check if email address is valid if not get address from contacts
- * [259] [FIXME] edit does not support attachments
-
-app/models/prefs.rb:
- * [ 19] [TODO] move refresh to prefs and make refresh page with messages
-
diff --git a/themes/olive/stylesheets/style.css b/themes/olive/stylesheets/style.css
index 33c6f50..a7658a2 100755
--- a/themes/olive/stylesheets/style.css
+++ b/themes/olive/stylesheets/style.css
@@ -589,3 +589,22 @@ div.flash p.info {
text-align: left;
font-size: 10px;
}
+
+div.md {
+ padding: 10px;
+ margin-bottom: 5px;
+}
+
+div.md ul {
+ margin-left:20px;
+}
+div.md code {
+ background-color: #EEEEEE;
+ border: 1px solid #DDDDDD;
+ border-radius: 3px 3px 3px 3px;
+ color: #444444;
+ font-size: 12px;
+ margin: 1em 0;
+ overflow: auto;
+ padding: 5px;
+}
diff --git a/themes/olive/views/internal/about.html.erb b/themes/olive/views/internal/about.html.erb
index 19336c1..8ab45e3 100755
--- a/themes/olive/views/internal/about.html.erb
+++ b/themes/olive/views/internal/about.html.erb
@@ -7,21 +7,24 @@
<% end %>
-
- <%= raw single_navigation(:about,:internal) %>
-
-
+
+<%= raw single_navigation(:about,:internal) %>
+
+
-
-
-<%= render :file => 'config/about.txt' %>
-<%= render :text => "To do:\n" %>
-<%= render :file => 'config/todo.txt' %>
-
+
+
+<%= raw BlueCloth::new(render :file => 'README.markdown').to_html %>
+
+
+<%= raw BlueCloth::new(render :file => 'CHANGES').to_html %>
+
+
+<%= raw BlueCloth::new(render :file => 'TODO').to_html %>
+
-
diff --git a/themes/olive/views/layouts/application.html.erb b/themes/olive/views/layouts/application.html.erb
index 1605793..b2a03ab 100755
--- a/themes/olive/views/layouts/application.html.erb
+++ b/themes/olive/views/layouts/application.html.erb
@@ -11,6 +11,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<%=stylesheet_link_tag current_theme_stylesheet_path('base') %>
<%=stylesheet_link_tag current_theme_stylesheet_path('style') %>
+ <%=stylesheet_link_tag current_theme_stylesheet_path('calendar_olive') %>
<%=stylesheet_link_tag current_theme_stylesheet_path('jquery-ui-dialog') %>
<%=stylesheet_link_tag current_theme_stylesheet_path('jquery-ui-custom') %>
diff --git a/themes/olive/views/sidebar/_calendar_view.html.erb b/themes/olive/views/sidebar/_calendar_view.html.erb
index 6b5cc10..3a5f5db 100755
--- a/themes/olive/views/sidebar/_calendar_view.html.erb
+++ b/themes/olive/views/sidebar/_calendar_view.html.erb
@@ -1,3 +1,4 @@
-
- <%= raw calendar_small %>
-
+<%= calendar_square(:month_delta=>-1) %>
+<%= calendar_square() %>
+<%= calendar_square(:month_delta=>1) %>
+
diff --git a/vendor/plugins/calendar_view/MIT-LICENSE b/vendor/plugins/calendar_view/MIT-LICENSE
deleted file mode 100755
index bfe9381..0000000
--- a/vendor/plugins/calendar_view/MIT-LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2011 [name of plugin creator]
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/plugins/calendar_view/README b/vendor/plugins/calendar_view/README
deleted file mode 100755
index d23ccd9..0000000
--- a/vendor/plugins/calendar_view/README
+++ /dev/null
@@ -1,13 +0,0 @@
-CalendarView
-============
-
-Introduction goes here.
-
-
-Example
-=======
-
-Example goes here.
-
-
-Copyright (c) 2011 [name of plugin creator], released under the MIT license
diff --git a/vendor/plugins/calendar_view/Rakefile b/vendor/plugins/calendar_view/Rakefile
deleted file mode 100755
index 441a5c7..0000000
--- a/vendor/plugins/calendar_view/Rakefile
+++ /dev/null
@@ -1,23 +0,0 @@
-require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
-
-desc 'Default: run unit tests.'
-task :default => :test
-
-desc 'Test the calendar_view plugin.'
-Rake::TestTask.new(:test) do |t|
- t.libs << 'lib'
- t.libs << 'test'
- t.pattern = 'test/**/*_test.rb'
- t.verbose = true
-end
-
-desc 'Generate documentation for the calendar_view plugin.'
-Rake::RDocTask.new(:rdoc) do |rdoc|
- rdoc.rdoc_dir = 'rdoc'
- rdoc.title = 'CalendarView'
- rdoc.options << '--line-numbers' << '--inline-source'
- rdoc.rdoc_files.include('README')
- rdoc.rdoc_files.include('lib/**/*.rb')
-end
\ No newline at end of file
diff --git a/vendor/plugins/calendar_view/init.rb b/vendor/plugins/calendar_view/init.rb
deleted file mode 100755
index 46003ef..0000000
--- a/vendor/plugins/calendar_view/init.rb
+++ /dev/null
@@ -1 +0,0 @@
-require 'calendar_view'
diff --git a/vendor/plugins/calendar_view/install.rb b/vendor/plugins/calendar_view/install.rb
deleted file mode 100755
index f7732d3..0000000
--- a/vendor/plugins/calendar_view/install.rb
+++ /dev/null
@@ -1 +0,0 @@
-# Install hook code here
diff --git a/vendor/plugins/calendar_view/lib/app/helpers/calendar_view_helper.rb b/vendor/plugins/calendar_view/lib/app/helpers/calendar_view_helper.rb
deleted file mode 100755
index fe3c7c4..0000000
--- a/vendor/plugins/calendar_view/lib/app/helpers/calendar_view_helper.rb
+++ /dev/null
@@ -1,56 +0,0 @@
-module CalendarViewHelper
- def calendar_small(options={})
- now = DateTime.now
- first = Date.new(now.year,now.month,1)
- last = Date.new(now.year,now.month,-1)
- curr_week = first.cweek
- html = "
"
- html << t(:month_names,:scope=>:date)[now.month]
- html << "
"
- html << "
"
-
- html << " | "
- 1.upto(6) do |i|
- html << "#{t(:abbr_day_names,:scope=>:date)[i]} | "
- end
- html << "#{t(:abbr_day_names,:scope=>:date)[0]} | "
- html << "
"
-
-
- html << ""
- html << "#{first.cweek} | "
-
- (first.wday-1).downto(1) do |i|
- prev = first - i
- html << "#{prev.day} | "
- end
-
- (first.day).upto(last.day) do |i|
- curr = Date.new(now.year,now.month,i)
- if curr.wday == 1
- html << "
"
- html << ""
- curr_week += 1
- html << "#{curr_week} | "
- end
- if now.day == i
- html << "#{i} | "
- else
- if curr.wday == 0 || curr.wday == 6
- html << "#{i} | "
- else
- html << "#{i} | "
- end
- end
- end
-
- 1.upto(7-last.wday) do |i|
- post = last + i
- html << "#{post.day} | "
- end
-
- html << "
"
- html << "
"
- html
- end
-end
diff --git a/vendor/plugins/calendar_view/lib/calendar_view.rb b/vendor/plugins/calendar_view/lib/calendar_view.rb
deleted file mode 100755
index 6dbc90a..0000000
--- a/vendor/plugins/calendar_view/lib/calendar_view.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-require File.join(File.dirname(__FILE__), 'app', 'helpers', 'calendar_view_helper')
-ActionController::Base.helper(CalendarViewHelper)
diff --git a/vendor/plugins/calendar_view/test/calendar_view_test.rb b/vendor/plugins/calendar_view/test/calendar_view_test.rb
deleted file mode 100755
index 35edf62..0000000
--- a/vendor/plugins/calendar_view/test/calendar_view_test.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-require 'test_helper'
-
-class CalendarViewTest < ActiveSupport::TestCase
- # Replace this with your real tests.
- test "the truth" do
- assert true
- end
-end
diff --git a/vendor/plugins/calendar_view/test/test_helper.rb b/vendor/plugins/calendar_view/test/test_helper.rb
deleted file mode 100755
index 2ca36a1..0000000
--- a/vendor/plugins/calendar_view/test/test_helper.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-require 'rubygems'
-require 'test/unit'
-require 'active_support'
diff --git a/vendor/plugins/calendar_view/uninstall.rb b/vendor/plugins/calendar_view/uninstall.rb
deleted file mode 100755
index 9738333..0000000
--- a/vendor/plugins/calendar_view/uninstall.rb
+++ /dev/null
@@ -1 +0,0 @@
-# Uninstall hook code here