Revision 1298:4f746d8966dd .svn/pristine/14

View differences:

.svn/pristine/14/141194219711b0b953dd51beb008d5ce7e421ba0.svn-base
1
/* ***** BEGIN LICENSE BLOCK *****
2
 * This file is part of DotClear.
3
 * Copyright (c) 2005 Nicolas Martin & Olivier Meunier and contributors. All
4
 * rights reserved.
5
 *
6
 * DotClear is free software; you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation; either version 2 of the License, or
9
 * (at your option) any later version.
10
 * 
11
 * DotClear is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 * 
16
 * You should have received a copy of the GNU General Public License
17
 * along with DotClear; if not, write to the Free Software
18
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
 *
20
 * ***** END LICENSE BLOCK *****
21
*/
22

  
23
/* Modified by JP LANG for textile formatting */
24

  
25
// strong
26
jsToolBar.prototype.elements.strong = {
27
	type: 'button',
28
	title: 'Strong',
29
	fn: {
30
		wiki: function() { this.singleTag('*') }
31
	}
32
}
33

  
34
// em
35
jsToolBar.prototype.elements.em = {
36
	type: 'button',
37
	title: 'Italic',
38
	fn: {
39
		wiki: function() { this.singleTag("_") }
40
	}
41
}
42

  
43
// ins
44
jsToolBar.prototype.elements.ins = {
45
	type: 'button',
46
	title: 'Underline',
47
	fn: {
48
		wiki: function() { this.singleTag('+') }
49
	}
50
}
51

  
52
// del
53
jsToolBar.prototype.elements.del = {
54
	type: 'button',
55
	title: 'Deleted',
56
	fn: {
57
		wiki: function() { this.singleTag('-') }
58
	}
59
}
60

  
61
// code
62
jsToolBar.prototype.elements.code = {
63
	type: 'button',
64
	title: 'Code',
65
	fn: {
66
		wiki: function() { this.singleTag('@') }
67
	}
68
}
69

  
70
// spacer
71
jsToolBar.prototype.elements.space1 = {type: 'space'}
72

  
73
// headings
74
jsToolBar.prototype.elements.h1 = {
75
	type: 'button',
76
	title: 'Heading 1',
77
	fn: {
78
		wiki: function() { 
79
		  this.encloseLineSelection('h1. ', '',function(str) {
80
		    str = str.replace(/^h\d+\.\s+/, '')
81
		    return str;
82
		  });
83
		}
84
	}
85
}
86
jsToolBar.prototype.elements.h2 = {
87
	type: 'button',
88
	title: 'Heading 2',
89
	fn: {
90
		wiki: function() { 
91
		  this.encloseLineSelection('h2. ', '',function(str) {
92
		    str = str.replace(/^h\d+\.\s+/, '')
93
		    return str;
94
		  });
95
		}
96
	}
97
}
98
jsToolBar.prototype.elements.h3 = {
99
	type: 'button',
100
	title: 'Heading 3',
101
	fn: {
102
		wiki: function() { 
103
		  this.encloseLineSelection('h3. ', '',function(str) {
104
		    str = str.replace(/^h\d+\.\s+/, '')
105
		    return str;
106
		  });
107
		}
108
	}
109
}
110

  
111
// spacer
112
jsToolBar.prototype.elements.space2 = {type: 'space'}
113

  
114
// ul
115
jsToolBar.prototype.elements.ul = {
116
	type: 'button',
117
	title: 'Unordered list',
118
	fn: {
119
		wiki: function() {
120
			this.encloseLineSelection('','',function(str) {
121
				str = str.replace(/\r/g,'');
122
				return str.replace(/(\n|^)[#-]?\s*/g,"$1* ");
123
			});
124
		}
125
	}
126
}
127

  
128
// ol
129
jsToolBar.prototype.elements.ol = {
130
	type: 'button',
131
	title: 'Ordered list',
132
	fn: {
133
		wiki: function() {
134
			this.encloseLineSelection('','',function(str) {
135
				str = str.replace(/\r/g,'');
136
				return str.replace(/(\n|^)[*-]?\s*/g,"$1# ");
137
			});
138
		}
139
	}
140
}
141

  
142
// spacer
143
jsToolBar.prototype.elements.space3 = {type: 'space'}
144

  
145
// bq
146
jsToolBar.prototype.elements.bq = {
147
	type: 'button',
148
	title: 'Quote',
149
	fn: {
150
		wiki: function() {
151
			this.encloseLineSelection('','',function(str) {
152
				str = str.replace(/\r/g,'');
153
				return str.replace(/(\n|^) *([^\n]*)/g,"$1> $2");
154
			});
155
		}
156
	}
157
}
158

  
159
// unbq
160
jsToolBar.prototype.elements.unbq = {
161
	type: 'button',
162
	title: 'Unquote',
163
	fn: {
164
		wiki: function() {
165
			this.encloseLineSelection('','',function(str) {
166
				str = str.replace(/\r/g,'');
167
				return str.replace(/(\n|^) *[>]? *([^\n]*)/g,"$1$2");
168
			});
169
		}
170
	}
171
}
172

  
173
// pre
174
jsToolBar.prototype.elements.pre = {
175
	type: 'button',
176
	title: 'Preformatted text',
177
	fn: {
178
		wiki: function() { this.encloseLineSelection('<pre>\n', '\n</pre>') }
179
	}
180
}
181

  
182
// spacer
183
jsToolBar.prototype.elements.space4 = {type: 'space'}
184

  
185
// wiki page
186
jsToolBar.prototype.elements.link = {
187
	type: 'button',
188
	title: 'Wiki link',
189
	fn: {
190
		wiki: function() { this.encloseSelection("[[", "]]") }
191
	}
192
}
193
// image
194
jsToolBar.prototype.elements.img = {
195
	type: 'button',
196
	title: 'Image',
197
	fn: {
198
		wiki: function() { this.encloseSelection("!", "!") }
199
	}
200
}
201

  
202
// spacer
203
jsToolBar.prototype.elements.space5 = {type: 'space'}
204
// help
205
jsToolBar.prototype.elements.help = {
206
	type: 'button',
207
	title: 'Help',
208
	fn: {
209
		wiki: function() { window.open(this.help_link, '', 'resizable=yes, location=no, width=300, height=640, menubar=no, status=no, scrollbars=yes') }
210
	}
211
}
.svn/pristine/14/1416b352c6fb64d06513cc44f62b6e1f359f63c7.svn-base
1
<%= error_messages_for 'board' %>
2

  
3
<!--[form:board]-->
4
<div class="box">
5
<p><%= f.text_field :name, :required => true %></p>
6
<p><%= f.text_field :description, :required => true, :size => 80 %></p>
7
</div>
8
<!--[eoform:board]-->
.svn/pristine/14/14189ddfaeae5a33a107c23246aa22c4efcabc20.svn-base
1
--- 
2
users_004: 
3
  created_on: 2006-07-19 19:34:07 +02:00
4
  status: 1
5
  last_login_on: 
6
  language: en
7
  # password = foo
8
  salt: 3126f764c3c5ac61cbfc103f25f934cf
9
  hashed_password: 9e4dd7eeb172c12a0691a6d9d3a269f7e9fe671b
10
  updated_on: 2006-07-19 19:34:07 +02:00
11
  admin: false
12
  mail: rhill@somenet.foo
13
  lastname: Hill
14
  firstname: Robert
15
  id: 4
16
  auth_source_id: 
17
  mail_notification: all
18
  login: rhill
19
  type: User
20
users_001: 
21
  created_on: 2006-07-19 19:12:21 +02:00
22
  status: 1
23
  last_login_on: 2006-07-19 22:57:52 +02:00
24
  language: en
25
  # password = admin
26
  salt: 82090c953c4a0000a7db253b0691a6b4
27
  hashed_password: b5b6ff9543bf1387374cdfa27a54c96d236a7150
28
  updated_on: 2006-07-19 22:57:52 +02:00
29
  admin: true
30
  mail: admin@somenet.foo
31
  lastname: Admin
32
  firstname: Redmine
33
  id: 1
34
  auth_source_id: 
35
  mail_notification: all
36
  login: admin
37
  type: User
38
users_002: 
39
  created_on: 2006-07-19 19:32:09 +02:00
40
  status: 1
41
  last_login_on: 2006-07-19 22:42:15 +02:00
42
  language: en
43
  # password = jsmith
44
  salt: 67eb4732624d5a7753dcea7ce0bb7d7d
45
  hashed_password: bfbe06043353a677d0215b26a5800d128d5413bc
46
  updated_on: 2006-07-19 22:42:15 +02:00
47
  admin: false
48
  mail: jsmith@somenet.foo
49
  lastname: Smith
50
  firstname: John
51
  id: 2
52
  auth_source_id: 
53
  mail_notification: all
54
  login: jsmith
55
  type: User
56
users_003: 
57
  created_on: 2006-07-19 19:33:19 +02:00
58
  status: 1
59
  last_login_on: 
60
  language: en
61
  # password = foo
62
  salt: 7599f9963ec07b5a3b55b354407120c0
63
  hashed_password: 8f659c8d7c072f189374edacfa90d6abbc26d8ed
64
  updated_on: 2006-07-19 19:33:19 +02:00
65
  admin: false
66
  mail: dlopper@somenet.foo
67
  lastname: Lopper
68
  firstname: Dave
69
  id: 3
70
  auth_source_id: 
71
  mail_notification: all
72
  login: dlopper
73
  type: User
74
users_005: 
75
  id: 5
76
  created_on: 2006-07-19 19:33:19 +02:00
77
  # Locked
78
  status: 3
79
  last_login_on: 
80
  language: en
81
  hashed_password: 1
82
  updated_on: 2006-07-19 19:33:19 +02:00
83
  admin: false
84
  mail: dlopper2@somenet.foo
85
  lastname: Lopper2
86
  firstname: Dave2
87
  auth_source_id: 
88
  mail_notification: all
89
  login: dlopper2
90
  type: User
91
users_006: 
92
  id: 6
93
  created_on: 2006-07-19 19:33:19 +02:00
94
  status: 0
95
  last_login_on: 
96
  language: ''
97
  hashed_password: 1
98
  updated_on: 2006-07-19 19:33:19 +02:00
99
  admin: false
100
  mail: ''
101
  lastname: Anonymous
102
  firstname: ''
103
  auth_source_id: 
104
  mail_notification: only_my_events
105
  login: ''
106
  type: AnonymousUser
107
users_007: 
108
  # A user who does not belong to any project
109
  id: 7
110
  created_on: 2006-07-19 19:33:19 +02:00
111
  status: 1
112
  last_login_on: 
113
  language: 'en'
114
  # password = foo
115
  salt: 7599f9963ec07b5a3b55b354407120c0
116
  hashed_password: 8f659c8d7c072f189374edacfa90d6abbc26d8ed
117
  updated_on: 2006-07-19 19:33:19 +02:00
118
  admin: false
119
  mail: someone@foo.bar
120
  lastname: One
121
  firstname: Some
122
  auth_source_id: 
123
  mail_notification: only_my_events
124
  login: someone
125
  type: User
126
users_008: 
127
  id: 8
128
  created_on: 2006-07-19 19:33:19 +02:00
129
  status: 1
130
  last_login_on: 
131
  language: 'it'
132
  # password = foo
133
  salt: 7599f9963ec07b5a3b55b354407120c0
134
  hashed_password: 8f659c8d7c072f189374edacfa90d6abbc26d8ed
135
  updated_on: 2006-07-19 19:33:19 +02:00
136
  admin: false
137
  mail: miscuser8@foo.bar
138
  lastname: Misc
139
  firstname: User
140
  auth_source_id: 
141
  mail_notification: only_my_events
142
  login: miscuser8
143
  type: User
144
users_009: 
145
  id: 9
146
  created_on: 2006-07-19 19:33:19 +02:00
147
  status: 1
148
  last_login_on: 
149
  language: 'it'
150
  hashed_password: 1
151
  updated_on: 2006-07-19 19:33:19 +02:00
152
  admin: false
153
  mail: miscuser9@foo.bar
154
  lastname: Misc
155
  firstname: User
156
  auth_source_id: 
157
  mail_notification: only_my_events
158
  login: miscuser9
159
  type: User
160
groups_010: 
161
  id: 10
162
  lastname: A Team
163
  type: Group
164
groups_011: 
165
  id: 11
166
  lastname: B Team
167
  type: Group
168

  
169
  
.svn/pristine/14/142eda77e7e23817ff1c9eecae08c12f33882ae4.svn-base
1
en:
2
  hello: "Hello from beta"
3
  plugin: "beta"
.svn/pristine/14/147267197c59e4171e424ec83498747a79bcc270.svn-base
1
# Redmine - project management software
2
# Copyright (C) 2006-2011  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
require File.expand_path('../../test_helper', __FILE__)
19

  
20
class WikiRedirectTest < ActiveSupport::TestCase
21
  fixtures :projects, :wikis, :wiki_pages
22

  
23
  def setup
24
    @wiki = Wiki.find(1)
25
    @original = WikiPage.create(:wiki => @wiki, :title => 'Original title')
26
  end
27

  
28
  def test_create_redirect
29
    @original.title = 'New title'
30
    assert @original.save
31
    @original.reload
32

  
33
    assert_equal 'New_title', @original.title
34
    assert @wiki.redirects.find_by_title('Original_title')
35
    assert @wiki.find_page('Original title')
36
    assert @wiki.find_page('ORIGINAL title')
37
  end
38

  
39
  def test_update_redirect
40
    # create a redirect that point to this page
41
    assert WikiRedirect.create(:wiki => @wiki, :title => 'An_old_page', :redirects_to => 'Original_title')
42

  
43
    @original.title = 'New title'
44
    @original.save
45
    # make sure the old page now points to the new page
46
    assert_equal 'New_title', @wiki.find_page('An old page').title
47
  end
48

  
49
  def test_reverse_rename
50
    # create a redirect that point to this page
51
    assert WikiRedirect.create(:wiki => @wiki, :title => 'An_old_page', :redirects_to => 'Original_title')
52

  
53
    @original.title = 'An old page'
54
    @original.save
55
    assert !@wiki.redirects.find_by_title_and_redirects_to('An_old_page', 'An_old_page')
56
    assert @wiki.redirects.find_by_title_and_redirects_to('Original_title', 'An_old_page')
57
  end
58

  
59
  def test_rename_to_already_redirected
60
    assert WikiRedirect.create(:wiki => @wiki, :title => 'An_old_page', :redirects_to => 'Other_page')
61

  
62
    @original.title = 'An old page'
63
    @original.save
64
    # this redirect have to be removed since 'An old page' page now exists
65
    assert !@wiki.redirects.find_by_title_and_redirects_to('An_old_page', 'Other_page')
66
  end
67

  
68
  def test_redirects_removed_when_deleting_page
69
    assert WikiRedirect.create(:wiki => @wiki, :title => 'An_old_page', :redirects_to => 'Original_title')
70

  
71
    @original.destroy
72
    assert !@wiki.redirects.find(:first)
73
  end
74
end
.svn/pristine/14/148dc94f440c0c6c1fdf948749c8c6f100698d2e.svn-base
1
module OpenIdAuthentication
2
  class Nonce < ActiveRecord::Base
3
    set_table_name :open_id_authentication_nonces
4
  end
5
end
.svn/pristine/14/149151b89e5659b8d56fd85ed72924a5e1708683.svn-base
1
<% changesets.each do |changeset| %>
2
    <div class="changeset <%= cycle('odd', 'even') %>">
3
    <p><%= link_to_revision(changeset, changeset.project,
4
                            :text => "#{l(:label_revision)} #{changeset.format_identifier}") %><br />
5
        <span class="author"><%= authoring(changeset.committed_on, changeset.author) %></span></p>
6
    <div class="wiki">
7
        <%= textilizable(changeset, :comments) %>
8
    </div>
9
    </div>
10
<% end %>
.svn/pristine/14/14ee5b2fb5a9f9c39e2c17ac2573da976e834e55.svn-base
1
<% fields_for :pref, @user.pref, :builder => TabularFormBuilder, :lang => current_language do |pref_fields| %>
2
<p><%= pref_fields.check_box :hide_mail %></p>
3
<p><%= pref_fields.select :time_zone, ActiveSupport::TimeZone.all.collect {|z| [ z.to_s, z.name ]}, :include_blank => true %></p>
4
<p><%= pref_fields.select :comments_sorting, [[l(:label_chronological_order), 'asc'], [l(:label_reverse_chronological_order), 'desc']] %></p>
5
<p><%= pref_fields.check_box :warn_on_leaving_unsaved %></p>
6
<% end %>
7

  
.svn/pristine/14/14f249183ef33935d6a7aa11b5f44b945eb0da01.svn-base
1
<%= error_messages_for 'document' %>
2
<div class="box">
3
<!--[form:document]-->
4
<p><label for="document_category_id"><%=l(:field_category)%></label>
5
<%= select('document', 'category_id', DocumentCategory.active.collect {|c| [c.name, c.id]}) %></p>
6

  
7
<p><label for="document_title"><%=l(:field_title)%> <span class="required">*</span></label>
8
<%= text_field 'document', 'title', :size => 60 %></p>
9

  
10
<p><label for="document_description"><%=l(:field_description)%></label>
11
<%= text_area 'document', 'description', :cols => 60, :rows => 15, :class => 'wiki-edit' %></p>
12
<!--[eoform:document]-->
13
</div>
14

  
15
<%= wikitoolbar_for 'document_description' %>

Also available in: Unified diff