calendar as separate gem, bluecloth integrated
This commit is contained in:
parent
66cba6bbc7
commit
17a85a5916
2
Gemfile
2
Gemfile
|
@ -6,3 +6,5 @@ gem 'mysql2' , '~>0.2.7'
|
||||||
gem 'will_paginate', '~> 3.0.beta'
|
gem 'will_paginate', '~> 3.0.beta'
|
||||||
gem 'themes_for_rails'
|
gem 'themes_for_rails'
|
||||||
gem "ezcrypto", "~> 0.7.2"
|
gem "ezcrypto", "~> 0.7.2"
|
||||||
|
gem "calendar_view", "~> 0.0.3"
|
||||||
|
gem 'bluecloth', '>= 2.0.0'
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
## Introduction
|
## 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.
|
**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.
|
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.
|
* Checkout the source code.
|
||||||
|
|
||||||
* Install all dependiences. Check if proper gems (sqlite3/mysql/postgresql) are defined in _Gemfile_ and installed. Use _bundler_ for that:
|
* Install all dependiences. Check if proper gems (sqlite3/mysql/postgresql) are defined in _Gemfile_ and installed. Use _bundler_ for that:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
@ -18,17 +17,12 @@ bundle install
|
||||||
```
|
```
|
||||||
|
|
||||||
* Check _config/defaults.yml_ for proper values.
|
* Check _config/defaults.yml_ for proper values.
|
||||||
|
|
||||||
* Prepare config/database.yml file (see _config/database.yml.example_).
|
* Prepare config/database.yml file (see _config/database.yml.example_).
|
||||||
|
|
||||||
* Migrate database (rake db:migrate)
|
* Migrate database (rake db:migrate)
|
||||||
|
|
||||||
* Start rails server if applicable
|
* Start rails server if applicable
|
||||||
|
|
||||||
* Point your browser to application URL:
|
* Point your browser to application URL:
|
||||||
For local access: http://localhost:3000
|
For local access: http://localhost:3000
|
||||||
For remote access: http://some_url/mailr
|
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:
|
* Using browser do basic setup. If You make a mistake delete all data from DB using rake task:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
@ -37,7 +31,7 @@ rake db:clear_data
|
||||||
|
|
||||||
* Use it.
|
* Use it.
|
||||||
|
|
||||||
### Specific configuration
|
## Specific configuration
|
||||||
|
|
||||||
For themes: if server sends files with no content in production mode comment out
|
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"
|
config.action_dispatch.x_sendfile_header = "X-Sendfile"
|
||||||
```
|
```
|
||||||
|
|
||||||
from _config/environments/production.rb_ file.
|
in _config/environments/production.rb_ file.
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
0.8.3
|
|
||||||
|
|
||||||
* export, imports of contact
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
version: 0.8.3
|
version: 0.8.4
|
||||||
|
|
||||||
theme: olive
|
theme: olive
|
||||||
locale: pl
|
locale: pl
|
||||||
|
@ -45,4 +45,4 @@ session_password: asDD3s2@sAdc983#
|
||||||
mailbox_max_parent_folder_depth: 3
|
mailbox_max_parent_folder_depth: 3
|
||||||
|
|
||||||
# array of logins which only can login to application, comment it to allow everyone to login
|
# 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]
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
|
@ -589,3 +589,22 @@ div.flash p.info {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-size: 10px;
|
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;
|
||||||
|
}
|
||||||
|
|
|
@ -7,21 +7,24 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="block" id="block-tables">
|
<div class="block" id="block-tables">
|
||||||
<div class="secondary-navigation">
|
<div class="secondary-navigation">
|
||||||
<%= raw single_navigation(:about,:internal) %>
|
<%= raw single_navigation(:about,:internal) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="actions-bar wat-cf">
|
<div class="actions-bar wat-cf">
|
||||||
<div class="header_info">
|
<div class="header_info">
|
||||||
<%= t(:current_version,:scope=>:internal) + ": " + $defaults["version"] %>
|
<%= t(:current_version,:scope=>:internal) + ": " + $defaults["version"] %>
|
||||||
</div></div>
|
</div></div>
|
||||||
<div class="render_text">
|
|
||||||
<pre>
|
<div class="md">
|
||||||
<%= render :file => 'config/about.txt' %>
|
<%= raw BlueCloth::new(render :file => 'README.markdown').to_html %>
|
||||||
<%= render :text => "To do:\n" %>
|
</div>
|
||||||
<%= render :file => 'config/todo.txt' %>
|
<div class="md">
|
||||||
</pre>
|
<%= raw BlueCloth::new(render :file => 'CHANGES').to_html %>
|
||||||
|
</div>
|
||||||
|
<div class="md">
|
||||||
|
<%= raw BlueCloth::new(render :file => 'TODO').to_html %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -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('base') %>
|
||||||
<%=stylesheet_link_tag current_theme_stylesheet_path('style') %>
|
<%=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-dialog') %>
|
||||||
<%=stylesheet_link_tag current_theme_stylesheet_path('jquery-ui-custom') %>
|
<%=stylesheet_link_tag current_theme_stylesheet_path('jquery-ui-custom') %>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
<div class="block">
|
<%= calendar_square(:month_delta=>-1) %>
|
||||||
<%= raw calendar_small %>
|
<%= calendar_square() %>
|
||||||
</div>
|
<%= calendar_square(:month_delta=>1) %>
|
||||||
|
|
||||||
|
|
20
vendor/plugins/calendar_view/MIT-LICENSE
vendored
20
vendor/plugins/calendar_view/MIT-LICENSE
vendored
|
@ -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.
|
|
13
vendor/plugins/calendar_view/README
vendored
13
vendor/plugins/calendar_view/README
vendored
|
@ -1,13 +0,0 @@
|
||||||
CalendarView
|
|
||||||
============
|
|
||||||
|
|
||||||
Introduction goes here.
|
|
||||||
|
|
||||||
|
|
||||||
Example
|
|
||||||
=======
|
|
||||||
|
|
||||||
Example goes here.
|
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2011 [name of plugin creator], released under the MIT license
|
|
23
vendor/plugins/calendar_view/Rakefile
vendored
23
vendor/plugins/calendar_view/Rakefile
vendored
|
@ -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
|
|
1
vendor/plugins/calendar_view/init.rb
vendored
1
vendor/plugins/calendar_view/init.rb
vendored
|
@ -1 +0,0 @@
|
||||||
require 'calendar_view'
|
|
1
vendor/plugins/calendar_view/install.rb
vendored
1
vendor/plugins/calendar_view/install.rb
vendored
|
@ -1 +0,0 @@
|
||||||
# Install hook code here
|
|
|
@ -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 = "<h3>"
|
|
||||||
html << t(:month_names,:scope=>:date)[now.month]
|
|
||||||
html << "</h3><div class=\"content\">"
|
|
||||||
html << "<table class=\"side_calendar width100\">"
|
|
||||||
|
|
||||||
html << "<tr><td></td>"
|
|
||||||
1.upto(6) do |i|
|
|
||||||
html << "<td class=\"wday\">#{t(:abbr_day_names,:scope=>:date)[i]}</td>"
|
|
||||||
end
|
|
||||||
html << "<td class=\"wday\">#{t(:abbr_day_names,:scope=>:date)[0]}</td>"
|
|
||||||
html << "</tr>"
|
|
||||||
|
|
||||||
|
|
||||||
html << "<tr>"
|
|
||||||
html << "<td class=\"week\">#{first.cweek}</td>"
|
|
||||||
|
|
||||||
(first.wday-1).downto(1) do |i|
|
|
||||||
prev = first - i
|
|
||||||
html << "<td class=\"off\">#{prev.day}</td>"
|
|
||||||
end
|
|
||||||
|
|
||||||
(first.day).upto(last.day) do |i|
|
|
||||||
curr = Date.new(now.year,now.month,i)
|
|
||||||
if curr.wday == 1
|
|
||||||
html << "</tr>"
|
|
||||||
html << "<tr>"
|
|
||||||
curr_week += 1
|
|
||||||
html << "<td class=\"week\">#{curr_week}</td>"
|
|
||||||
end
|
|
||||||
if now.day == i
|
|
||||||
html << "<td class=\"today\">#{i}</td>"
|
|
||||||
else
|
|
||||||
if curr.wday == 0 || curr.wday == 6
|
|
||||||
html << "<td class=\"weekend\">#{i}</td>"
|
|
||||||
else
|
|
||||||
html << "<td>#{i}</td>"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
1.upto(7-last.wday) do |i|
|
|
||||||
post = last + i
|
|
||||||
html << "<td class=\"off\">#{post.day}</td>"
|
|
||||||
end
|
|
||||||
|
|
||||||
html << "</tr>"
|
|
||||||
html << "</table></div>"
|
|
||||||
html
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,2 +0,0 @@
|
||||||
require File.join(File.dirname(__FILE__), 'app', 'helpers', 'calendar_view_helper')
|
|
||||||
ActionController::Base.helper(CalendarViewHelper)
|
|
|
@ -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
|
|
|
@ -1,3 +0,0 @@
|
||||||
require 'rubygems'
|
|
||||||
require 'test/unit'
|
|
||||||
require 'active_support'
|
|
1
vendor/plugins/calendar_view/uninstall.rb
vendored
1
vendor/plugins/calendar_view/uninstall.rb
vendored
|
@ -1 +0,0 @@
|
||||||
# Uninstall hook code here
|
|
Loading…
Reference in a new issue