Revision 1297:0a574315af3e .svn/pristine/82

View differences:

.svn/pristine/82/825c082112f8e7e45e2a90e193d0b7b64c7e8293.svn-base
1
<h2><%=l(:label_confirmation)%></h2>
2
<div class="warning">
3
<p><%= simple_format l(:text_account_destroy_confirmation)%></p>
4
<p>
5
    <%= form_tag({}) do %>
6
    <label><%= check_box_tag 'confirm', 1 %> <%= l(:general_text_Yes) %></label>
7
    <%= submit_tag l(:button_delete_my_account) %> |
8
		<%= link_to l(:button_cancel), :action => 'account' %>
9
    <% end %>
10
</p>
11
</div>
.svn/pristine/82/826fad9ae246e5eee2e8cb269734b189f7540f9c.svn-base
1
# Redmine - project management software
2
# Copyright (C) 2006-2012  Jean-Philippe Lang
3
#
4
# This program is free software; you can redistribute it and/or
5
# modify it under the terms of the GNU General Public License
6
# as published by the Free Software Foundation; either version 2
7
# of the License, or (at your option) any later version.
8
#
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License
15
# along with this program; if not, write to the Free Software
16
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17

  
18
class CustomFieldsController < ApplicationController
19
  layout 'admin'
20

  
21
  before_filter :require_admin
22
  before_filter :build_new_custom_field, :only => [:new, :create]
23
  before_filter :find_custom_field, :only => [:edit, :update, :destroy]
24

  
25
  def index
26
    @custom_fields_by_type = CustomField.find(:all).group_by {|f| f.class.name }
27
    @tab = params[:tab] || 'IssueCustomField'
28
  end
29

  
30
  def new
31
  end
32

  
33
  def create
34
    if request.post? and @custom_field.save
35
      flash[:notice] = l(:notice_successful_create)
36
      call_hook(:controller_custom_fields_new_after_save, :params => params, :custom_field => @custom_field)
37
      redirect_to :action => 'index', :tab => @custom_field.class.name
38
    else
39
      render :action => 'new'
40
    end
41
  end
42

  
43
  def edit
44
  end
45

  
46
  def update
47
    if request.put? and @custom_field.update_attributes(params[:custom_field])
48
      flash[:notice] = l(:notice_successful_update)
49
      call_hook(:controller_custom_fields_edit_after_save, :params => params, :custom_field => @custom_field)
50
      redirect_to :action => 'index', :tab => @custom_field.class.name
51
    else
52
      render :action => 'edit'
53
    end
54
  end
55

  
56
  def destroy
57
    @custom_field.destroy
58
    redirect_to :action => 'index', :tab => @custom_field.class.name
59
  rescue
60
    flash[:error] = l(:error_can_not_delete_custom_field)
61
    redirect_to :action => 'index'
62
  end
63

  
64
  private
65

  
66
  def build_new_custom_field
67
    @custom_field = CustomField.new_subclass_instance(params[:type], params[:custom_field])
68
    if @custom_field.nil?
69
      render_404
70
    end
71
  end
72

  
73
  def find_custom_field
74
    @custom_field = CustomField.find(params[:id])
75
  rescue ActiveRecord::RecordNotFound
76
    render_404
77
  end
78
end
.svn/pristine/82/82c6bbdbfd2897bbc1dc72bdef6311d7b52eda69.svn-base
1
Return-Path: <jsmith@somenet.foo>
2
Received: from osiris ([127.0.0.1])
3
	by OSIRIS
4
	with hMailServer ; Sun, 22 Jun 2008 12:28:07 +0200
5
Message-ID: <000501c8d452$a95cd7e0$0a00a8c0@osiris>
6
From: "John Smith" <jsmith@somenet.foo>
7
To: <redmine@somenet.foo>
8
Subject: New ticket with custom field values
9
Date: Sun, 22 Jun 2008 12:28:07 +0200
10
MIME-Version: 1.0
11
Content-Type: text/plain;
12
	format=flowed;
13
	charset="iso-8859-1";
14
	reply-type=original
15
Content-Transfer-Encoding: 7bit
16
X-Priority: 3
17
X-MSMail-Priority: Normal
18
X-Mailer: Microsoft Outlook Express 6.00.2900.2869
19
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
20

  
21
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas imperdiet 
22
turpis et odio. Integer eget pede vel dolor euismod varius. Phasellus 
23
blandit eleifend augue. Nulla facilisi. Duis id diam. Class aptent taciti 
24
sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In 
25
in urna sed tellus aliquet lobortis. Morbi scelerisque tortor in dolor. Cras 
26
sagittis odio eu lacus. Aliquam sem tortor, consequat sit amet, vestibulum 
27
id, iaculis at, lectus. Fusce tortor libero, congue ut, euismod nec, luctus 
28
eget, eros. Pellentesque tortor enim, feugiat in, dignissim eget, tristique 
29
sed, mauris. Pellentesque habitant morbi tristique senectus et netus et 
30
malesuada fames ac turpis egestas. Quisque sit amet libero. In hac habitasse 
31
platea dictumst.
32

  
33
Nulla et nunc. Duis pede. Donec et ipsum. Nam ut dui tincidunt neque 
34
sollicitudin iaculis. Duis vitae dolor. Vestibulum eget massa. Sed lorem. 
35
Nullam volutpat cursus erat. Cras felis dolor, lacinia quis, rutrum et, 
36
dictum et, ligula. Sed erat nibh, gravida in, accumsan non, placerat sed, 
37
massa. Sed sodales, ante fermentum ultricies sollicitudin, massa leo 
38
pulvinar dui, a gravida orci mi eget odio. Nunc a lacus.
39

  
40
category: Stock management
41
searchable field: Value for a custom field
42
Database:  postgresql

Also available in: Unified diff