Skip to content

Commit

Permalink
cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
Marek Kreft committed Jul 15, 2009
0 parents commit 09dc4d6
Show file tree
Hide file tree
Showing 63 changed files with 1,665 additions and 0 deletions.
17 changes: 17 additions & 0 deletions COPYRIGHT.txt
@@ -0,0 +1,17 @@
Mail Configurator plugin enables two new options for mail configuration. In my_account section additional options allow to turn off sending mail option completely, or restrict it only for case in wich user is assigned to the issue.

Copyright (C) 2009 GOYELLO.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
339 changes: 339 additions & 0 deletions GPL.txt

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions README.markdown
@@ -0,0 +1,40 @@
## Redmine Mail Configuration plugin

The Mail Configuration plugin will add to Your Redmine 'My account' site two new checkboxes in 'Email notifications' area.
First option will allow sending mail notification only if user is assigned to the issue. Second will block sending mail completly.

## Getting the plugin

## Install

This plugin needs to be installed same as the Redmine instruction for plugins describes (http://www.redmine.org/wiki/1/Plugins).
You can skip 'rake' command as there are no database migration files.
You have to also rn the patch file from redmine_mail_configurator\patch\
It will only add two hooks in your source code, so the changes are insignificant, but still you should BACKUP Your Files.

## Features

The Mail Configuration plugin will add to Your Redmine 'My account' site two new checkboxes in 'Email notifications' area.
First option will allow sending mail notification only if user is assigned to the issue. Second will block sending mail completly.

Changes made by patch:

<redmine root>\app\controllers\my_controller.rb

@user.pref[:no_self_notified] = (params[:no_self_notified] == '1')

######++ call_hook(:my_controller_new_user_preferences, { :params => params, :user_pref => @user.pref })

if @user.save


<redmine root>\app\views\my\account.rhtml

<p><label><%= check_box_tag 'no_self_notified', 1, @user.pref[:no_self_notified] %> <%= l(:label_user_mail_no_self_notified) %></label></p>

######++<%= call_hook(:mail_configurator_options, { :user_pref => @user.pref }) %>

</div>


![Alt text](/path/to/img.jpg)
40 changes: 40 additions & 0 deletions README.rdoc
@@ -0,0 +1,40 @@
The Mail Configuration plugin will add to Your Redmine 'My account' site two new checkboxes in 'Email notifications' area.
First option will allow sending mail notification only if user is assigned to the issue. Second will block sending mail completly.

To install Mail Configutation plugin just copy its content to your <Redmine root>\vendors\plugins\

and (as the hooks for new feature haven't been added to the core of Redmine yet), there are two changes in core files needed to be made manually. Remember to backup files listed below firts. No, seriously, backup your files.

FIRST CHANGE IN:

<redmine root>\app\controllers\my_controller.rb

find line 59

@user.pref[:no_self_notified] = (params[:no_self_notified] == '1')

#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# after above line add:
call_hook(:my_controller_new_user_preferences, { :params => params, :user_pref => @user.pref })

# which should be before:
if @user.save



SECOND CHANGE IN:

<redmine root>\app\views\my\account.rhtml

find line 34

<p><label><%= check_box_tag 'no_self_notified', 1, @user.pref[:no_self_notified] %> <%= l(:label_user_mail_no_self_notified) %></label></p>

#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# after above line add:
<%= call_hook(:mail_configurator_options, { :user_pref => @user.pref }) %>
# which should be before line:
</div>


NOW THE PLUGIN IS FULL IMPLEMENTED AND SHOULD BE WORKING FINE.
40 changes: 40 additions & 0 deletions app/.svn/entries
@@ -0,0 +1,40 @@
9

dir
18
svn+ssh://dvirep/var/svn/repos/redmine/trunk/redmine/vendor/plugins/redmine_mail_configurator/app
svn+ssh://dvirep/var/svn/repos/redmine



2009-06-26T08:59:43.368122Z
6
mkreft


svn:special svn:externals svn:needs-lock











4fd30d62-d8fb-4443-b27a-b81486d77269

helpers
dir

models
dir

controllers
dir

views
dir

1 change: 1 addition & 0 deletions app/.svn/format
@@ -0,0 +1 @@
9
28 changes: 28 additions & 0 deletions app/controllers/.svn/entries
@@ -0,0 +1,28 @@
9

dir
18
svn+ssh://dvirep/var/svn/repos/redmine/trunk/redmine/vendor/plugins/redmine_mail_configurator/app/controllers
svn+ssh://dvirep/var/svn/repos/redmine



2009-06-26T08:59:43.368122Z
6
mkreft


svn:special svn:externals svn:needs-lock











4fd30d62-d8fb-4443-b27a-b81486d77269

1 change: 1 addition & 0 deletions app/controllers/.svn/format
@@ -0,0 +1 @@
9
28 changes: 28 additions & 0 deletions app/helpers/.svn/entries
@@ -0,0 +1,28 @@
9

dir
18
svn+ssh://dvirep/var/svn/repos/redmine/trunk/redmine/vendor/plugins/redmine_mail_configurator/app/helpers
svn+ssh://dvirep/var/svn/repos/redmine



2009-06-26T08:59:43.368122Z
6
mkreft


svn:special svn:externals svn:needs-lock











4fd30d62-d8fb-4443-b27a-b81486d77269

1 change: 1 addition & 0 deletions app/helpers/.svn/format
@@ -0,0 +1 @@
9
28 changes: 28 additions & 0 deletions app/models/.svn/entries
@@ -0,0 +1,28 @@
9

dir
18
svn+ssh://dvirep/var/svn/repos/redmine/trunk/redmine/vendor/plugins/redmine_mail_configurator/app/models
svn+ssh://dvirep/var/svn/repos/redmine



2009-06-26T08:59:43.368122Z
6
mkreft


svn:special svn:externals svn:needs-lock











4fd30d62-d8fb-4443-b27a-b81486d77269

1 change: 1 addition & 0 deletions app/models/.svn/format
@@ -0,0 +1 @@
9
28 changes: 28 additions & 0 deletions app/views/.svn/entries
@@ -0,0 +1,28 @@
9

dir
18
svn+ssh://dvirep/var/svn/repos/redmine/trunk/redmine/vendor/plugins/redmine_mail_configurator/app/views
svn+ssh://dvirep/var/svn/repos/redmine



2009-06-26T08:59:43.368122Z
6
mkreft


svn:special svn:externals svn:needs-lock











4fd30d62-d8fb-4443-b27a-b81486d77269

1 change: 1 addition & 0 deletions app/views/.svn/format
@@ -0,0 +1 @@
9
37 changes: 37 additions & 0 deletions assets/.svn/entries
@@ -0,0 +1,37 @@
9

dir
18
svn+ssh://dvirep/var/svn/repos/redmine/trunk/redmine/vendor/plugins/redmine_mail_configurator/assets
svn+ssh://dvirep/var/svn/repos/redmine



2009-06-26T08:59:43.368122Z
6
mkreft


svn:special svn:externals svn:needs-lock











4fd30d62-d8fb-4443-b27a-b81486d77269

images
dir

javascripts
dir

stylesheets
dir

1 change: 1 addition & 0 deletions assets/.svn/format
@@ -0,0 +1 @@
9
28 changes: 28 additions & 0 deletions assets/images/.svn/entries
@@ -0,0 +1,28 @@
9

dir
18
svn+ssh://dvirep/var/svn/repos/redmine/trunk/redmine/vendor/plugins/redmine_mail_configurator/assets/images
svn+ssh://dvirep/var/svn/repos/redmine



2009-06-26T08:59:43.368122Z
6
mkreft


svn:special svn:externals svn:needs-lock











4fd30d62-d8fb-4443-b27a-b81486d77269

1 change: 1 addition & 0 deletions assets/images/.svn/format
@@ -0,0 +1 @@
9
28 changes: 28 additions & 0 deletions assets/javascripts/.svn/entries
@@ -0,0 +1,28 @@
9

dir
18
svn+ssh://dvirep/var/svn/repos/redmine/trunk/redmine/vendor/plugins/redmine_mail_configurator/assets/javascripts
svn+ssh://dvirep/var/svn/repos/redmine



2009-06-26T08:59:43.368122Z
6
mkreft


svn:special svn:externals svn:needs-lock











4fd30d62-d8fb-4443-b27a-b81486d77269

1 change: 1 addition & 0 deletions assets/javascripts/.svn/format
@@ -0,0 +1 @@
9
28 changes: 28 additions & 0 deletions assets/stylesheets/.svn/entries
@@ -0,0 +1,28 @@
9

dir
18
svn+ssh://dvirep/var/svn/repos/redmine/trunk/redmine/vendor/plugins/redmine_mail_configurator/assets/stylesheets
svn+ssh://dvirep/var/svn/repos/redmine



2009-06-26T08:59:43.368122Z
6
mkreft


svn:special svn:externals svn:needs-lock











4fd30d62-d8fb-4443-b27a-b81486d77269

0 comments on commit 09dc4d6

Please sign in to comment.