olelo 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +4 -0
- data/Rakefile +6 -12
- data/bin/olelo +13 -8
- data/config.ru +21 -15
- data/config/aspects.rb +45 -32
- data/config/config.yml.default +1 -0
- data/config/initializers/00-mime_types.rb +22 -17
- data/config/initializers/01-slim.rb +2 -2
- data/lib/olelo.rb +1 -8
- data/lib/olelo/application.rb +33 -34
- data/lib/olelo/attributes.rb +4 -4
- data/lib/olelo/extensions.rb +0 -7
- data/lib/olelo/helper.rb +13 -25
- data/lib/olelo/html_safe.rb +0 -4
- data/lib/olelo/locale.yml +6 -3
- data/lib/olelo/menu.rb +1 -1
- data/lib/olelo/page.rb +21 -18
- data/lib/olelo/version.rb +1 -1
- data/olelo.gemspec +5 -3
- data/plugins/aspects/changelog.rb +5 -5
- data/plugins/aspects/documentbrowser.rb +5 -5
- data/plugins/{gallery → aspects/gallery}/gallery.css +0 -0
- data/plugins/{gallery → aspects/gallery}/gallery.scss +0 -0
- data/plugins/{gallery → aspects/gallery}/main.rb +3 -3
- data/plugins/aspects/highlight.rb +1 -1
- data/plugins/aspects/image.rb +1 -1
- data/plugins/aspects/imageinfo.rb +3 -3
- data/plugins/aspects/main.rb +21 -21
- data/plugins/aspects/pageinfo.rb +2 -2
- data/plugins/aspects/source.rb +1 -1
- data/plugins/aspects/subpages.rb +7 -7
- data/plugins/aspects/text.rb +1 -1
- data/plugins/authentication/portal.rb +2 -2
- data/plugins/authentication/yamlfile.rb +1 -1
- data/plugins/blog/main.rb +10 -10
- data/plugins/editor/preview.rb +3 -3
- data/plugins/filters/creole.rb +1 -1
- data/plugins/filters/editsection.rb +2 -2
- data/plugins/filters/html2xml.rb +6 -0
- data/plugins/filters/main.rb +1 -1
- data/plugins/filters/remind/main.rb +15 -0
- data/plugins/filters/remind/rem2html +562 -0
- data/plugins/filters/s5/main.rb +1 -1
- data/plugins/login/persistent.rb +1 -1
- data/plugins/misc/system.rb +4 -0
- data/plugins/misc/variables.rb +1 -1
- data/plugins/misc/webdav.rb +10 -10
- data/plugins/repositories/git_grep.rb +2 -2
- data/plugins/repositories/gitrb_repository.rb +10 -10
- data/plugins/repositories/rugged_repository.rb +7 -7
- data/plugins/tags/code.rb +1 -1
- data/plugins/tags/footnotes.rb +4 -3
- data/plugins/tags/gist.rb +2 -2
- data/plugins/tags/html.rb +11 -11
- data/plugins/tags/include.rb +6 -6
- data/plugins/tags/main.rb +10 -10
- data/plugins/tags/math.rb +2 -2
- data/plugins/tags/redirect.rb +3 -3
- data/plugins/tags/scripting.rb +12 -12
- data/plugins/tags/sort.rb +1 -1
- data/plugins/tags/tabs.rb +1 -1
- data/plugins/treeview/main.rb +3 -3
- data/plugins/treeview/script.js +5 -5
- data/plugins/treeview/script/00-jquery.treeview.js +6 -6
- data/plugins/treeview/script/init.js +1 -1
- data/plugins/utils/assets.rb +4 -4
- data/plugins/utils/cache.rb +10 -6
- data/plugins/utils/store.rb +4 -4
- data/static/script.js +124 -126
- data/static/script/{02-jquery.js → 01-jquery.js} +0 -0
- data/static/script/02-olelo.storage.js +54 -0
- data/static/script/10-olelo.historytable.js +2 -2
- data/static/script/13-olelo.tabwidget.js +2 -2
- data/test/helper.rb +5 -4
- data/test/page_test.rb +1 -1
- data/test/request_test.rb +42 -38
- data/test/string_extensions_test.rb +0 -6
- data/test/templates_test.rb +1 -1
- data/test/util_test.rb +1 -1
- data/views/changes.slim +2 -2
- data/views/compare.slim +4 -4
- data/views/delete.slim +2 -2
- data/views/deleted.slim +1 -1
- data/views/edit.slim +31 -26
- data/views/history.slim +5 -5
- data/views/layout.slim +1 -1
- data/views/login.slim +30 -32
- data/views/move.slim +3 -3
- data/views/profile.slim +2 -2
- data/views/show.slim +1 -1
- metadata +43 -104
- data/static/script/01-jstorage.js +0 -217
File without changes
|
@@ -0,0 +1,54 @@
|
|
1
|
+
// Simple storage plugin
|
2
|
+
// Written by Daniel Mendler
|
3
|
+
(function($) {
|
4
|
+
var storage = {}, data = {};
|
5
|
+
try {
|
6
|
+
if (window.localStorage) {
|
7
|
+
storage = window.localStorage;
|
8
|
+
}
|
9
|
+
if (storage.oleloStorage) {
|
10
|
+
data = JSON.parse(storage.oleloStorage);
|
11
|
+
}
|
12
|
+
} catch (e) {
|
13
|
+
// Firefox fails when touching localStorage/globalStorage and cookies are disabled
|
14
|
+
}
|
15
|
+
|
16
|
+
function checkKey(key) {
|
17
|
+
if (typeof(key) != 'string' && typeof(key) != 'number') {
|
18
|
+
throw new TypeError('Key name must be string or numeric');
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
function save() {
|
23
|
+
try {
|
24
|
+
storage.oleloStorage = JSON.stringify(data);
|
25
|
+
} catch (e) {
|
26
|
+
// probably cache is full, nothing is saved this way
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
$.storage = {
|
31
|
+
set: function(key, value){
|
32
|
+
checkKey(key);
|
33
|
+
data[key] = value;
|
34
|
+
save();
|
35
|
+
return value;
|
36
|
+
},
|
37
|
+
get: function(key, def){
|
38
|
+
checkKey(key);
|
39
|
+
if (key in data) {
|
40
|
+
return data[key];
|
41
|
+
}
|
42
|
+
return typeof(def) == 'undefined' ? null : def;
|
43
|
+
},
|
44
|
+
remove: function(key){
|
45
|
+
checkKey(key);
|
46
|
+
if (key in data){
|
47
|
+
delete data[key];
|
48
|
+
save();
|
49
|
+
return true;
|
50
|
+
}
|
51
|
+
return false;
|
52
|
+
}
|
53
|
+
};
|
54
|
+
})(jQuery);
|
@@ -5,7 +5,7 @@
|
|
5
5
|
var version = $(this).attr('id').substr(8);
|
6
6
|
$(this).prepend('<td class="compare"><input type="checkbox" name="' + version + '"/></td>');
|
7
7
|
});
|
8
|
-
var versions =
|
8
|
+
var versions = $.storage.get('historyTable');
|
9
9
|
if (versions) {
|
10
10
|
for (var i = 0; i < versions.length; ++i)
|
11
11
|
$('input[name=' + versions[i] + ']').attr('checked', 'checked');
|
@@ -25,7 +25,7 @@
|
|
25
25
|
var button = $('th button', this);
|
26
26
|
button.click(function() {
|
27
27
|
var versions = getSelectedVersions();
|
28
|
-
|
28
|
+
$.storage.set('historyTable', versions);
|
29
29
|
location.href = location.pathname.replace('/history', '/compare/' + versions[versions.length-1] + '...' + versions[0]);
|
30
30
|
});
|
31
31
|
|
@@ -19,14 +19,14 @@
|
|
19
19
|
selected.data('tab').show();
|
20
20
|
selected.parent().addClass('selected');
|
21
21
|
if (store) {
|
22
|
-
|
22
|
+
$.storage.set(store, selected.data('tab').attr('id'));
|
23
23
|
}
|
24
24
|
return false;
|
25
25
|
});
|
26
26
|
|
27
27
|
// Get selected tab from store
|
28
28
|
if (store) {
|
29
|
-
var name =
|
29
|
+
var name = $.storage.get(store);
|
30
30
|
if (name) {
|
31
31
|
selected = $("> a[href='#" + name + "']", this);
|
32
32
|
}
|
data/test/helper.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'rack/olelo_patches'
|
2
1
|
require 'olelo'
|
3
2
|
require 'bacon'
|
4
3
|
require 'rack/test'
|
@@ -11,16 +10,18 @@ module TestHelper
|
|
11
10
|
end
|
12
11
|
|
13
12
|
def create_repository
|
14
|
-
|
13
|
+
Thread.current[:olelo_repository] = nil
|
14
|
+
Olelo::User.current = Olelo::User.new('anonymous', 'anonymous@localhost')
|
15
|
+
load_plugin('repositories/rugged_repository')
|
15
16
|
Olelo::Config.instance['repository.type'] = 'git'
|
16
17
|
Olelo::Config.instance['repository.git.path'] = File.expand_path(File.join(File.dirname(__FILE__), '.test'))
|
17
18
|
Olelo::Config.instance['repository.git.bare'] = true
|
18
|
-
load_plugin('repositories/git')
|
19
19
|
end
|
20
20
|
|
21
21
|
def destroy_repository
|
22
|
-
Olelo::Repository.instance = nil
|
23
22
|
FileUtils.rm_rf(Olelo::Config['repository.git.path'])
|
23
|
+
Thread.current[:olelo_repository] = nil
|
24
|
+
Olelo::User.current = nil
|
24
25
|
end
|
25
26
|
|
26
27
|
def create_page(name, content = 'content')
|
data/test/page_test.rb
CHANGED
@@ -122,7 +122,7 @@ describe 'Olelo::Page' do
|
|
122
122
|
tree.previous_version.should.equal old_tree.tree_version
|
123
123
|
old_tree.tree_version.should.equal old_tree.children[0].tree_version
|
124
124
|
old_tree.tree_version.should.equal old_tree.children[1].tree_version
|
125
|
-
old_tree.
|
125
|
+
old_tree.children[2].should.equal nil
|
126
126
|
old_tree.children[0].tree_version.should.not.be.head
|
127
127
|
end
|
128
128
|
|
data/test/request_test.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
require 'helper'
|
2
2
|
require 'olelo/middleware/flash'
|
3
3
|
require 'olelo/middleware/force_encoding'
|
4
|
+
require 'olelo/middleware/degrade_mime_type'
|
5
|
+
require 'rack/relative_redirect'
|
4
6
|
require 'rack/session/pool'
|
5
7
|
|
6
|
-
Rack::MockRequest::DEFAULT_ENV['REMOTE_ADDR'] = 'localhorst'
|
7
|
-
|
8
8
|
class Bacon::Context
|
9
9
|
include Rack::Test::Methods
|
10
10
|
include Olelo::Util
|
@@ -18,61 +18,65 @@ describe 'requests' do
|
|
18
18
|
@app_path = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
19
19
|
|
20
20
|
default_config = {
|
21
|
-
:
|
22
|
-
:
|
23
|
-
:
|
24
|
-
:
|
25
|
-
:
|
26
|
-
:
|
27
|
-
:
|
28
|
-
:
|
29
|
-
:
|
30
|
-
:
|
31
|
-
:
|
32
|
-
:
|
21
|
+
title: 'Olelo',
|
22
|
+
app_path: @app_path,
|
23
|
+
plugins_path: File.join(@app_path, 'plugins'),
|
24
|
+
config_path: File.join(@app_path, 'config'),
|
25
|
+
initializers_path: File.join(@app_path, 'config', 'initializers'),
|
26
|
+
views_path: File.join(@app_path, 'views'),
|
27
|
+
themes_path: File.join(@app_path, 'static', 'themes'),
|
28
|
+
theme: 'atlantis',
|
29
|
+
cache_store: {
|
30
|
+
type: 'file',
|
31
|
+
file: {
|
32
|
+
root: File.join(@test_path, 'cache')
|
33
33
|
}
|
34
34
|
},
|
35
|
-
:
|
36
|
-
:
|
37
|
-
:
|
38
|
-
:
|
39
|
-
:
|
40
|
-
|
41
|
-
:
|
42
|
-
:
|
43
|
-
:
|
35
|
+
base_path: '/',
|
36
|
+
production: true,
|
37
|
+
locale: 'en_US',
|
38
|
+
sidebar_page: 'Sidebar',
|
39
|
+
authentication: {
|
40
|
+
service: :yamlfile,
|
41
|
+
enable_signup: true,
|
42
|
+
yamlfile: {
|
43
|
+
store: File.join(@test_path, 'users.yml'),
|
44
44
|
},
|
45
45
|
},
|
46
|
-
:
|
46
|
+
mime: [
|
47
47
|
'extension',
|
48
48
|
'content',
|
49
49
|
'text/x-creole',
|
50
50
|
],
|
51
|
-
:
|
52
|
-
:
|
51
|
+
math_renderer: 'mathjax',
|
52
|
+
mime_suggestions: [],
|
53
|
+
disabled_plugins: [
|
53
54
|
'security/readonly_wiki',
|
54
55
|
'security/private_wiki',
|
55
|
-
'editor/
|
56
|
+
'editor/recaptcha',
|
56
57
|
],
|
57
|
-
:
|
58
|
-
:
|
59
|
-
:
|
60
|
-
:
|
61
|
-
:
|
58
|
+
repository: {
|
59
|
+
type: 'git',
|
60
|
+
git: {
|
61
|
+
path: File.join(@test_path, 'repository'),
|
62
|
+
bare: true,
|
62
63
|
},
|
63
64
|
}
|
64
65
|
}
|
65
66
|
|
66
67
|
Olelo::Config.instance.update(default_config)
|
67
|
-
|
68
|
+
Thread.current[:olelo_repository] = nil
|
68
69
|
|
69
70
|
logger = Logger.new(File.join(@app_path, 'test.log'))
|
71
|
+
Olelo::Initializer.initialize(logger)
|
70
72
|
|
71
73
|
@app = Rack::Builder.new do
|
72
|
-
use Olelo::Middleware::ForceEncoding
|
73
74
|
use Rack::Session::Pool
|
74
|
-
use
|
75
|
-
Olelo::
|
75
|
+
use Rack::MethodOverride
|
76
|
+
use Olelo::Middleware::ForceEncoding
|
77
|
+
use Olelo::Middleware::DegradeMimeType
|
78
|
+
use Olelo::Middleware::Flash, set_accessors: %w(error warn info)
|
79
|
+
#use Rack::RelativeRedirect
|
76
80
|
run Olelo::Application.new
|
77
81
|
end
|
78
82
|
end
|
@@ -90,8 +94,8 @@ describe 'requests' do
|
|
90
94
|
it 'should show login page' do
|
91
95
|
get '/login'
|
92
96
|
last_response.should.be.ok
|
93
|
-
last_response.body.should.include '<form action="
|
94
|
-
last_response.body.should.include '<form action="
|
97
|
+
last_response.body.should.include '<form action="/signup" method="post">'
|
98
|
+
last_response.body.should.include '<form action="/login" method="post">'
|
95
99
|
end
|
96
100
|
|
97
101
|
it 'should show to /new' do
|
@@ -1,12 +1,6 @@
|
|
1
1
|
require 'olelo/extensions'
|
2
2
|
|
3
3
|
describe 'String extensions' do
|
4
|
-
it 'should have unindent' do
|
5
|
-
%{a
|
6
|
-
b
|
7
|
-
c}.unindent.should.equal "a\nb\nc"
|
8
|
-
end
|
9
|
-
|
10
4
|
it 'should have #starts_with?' do
|
11
5
|
'123456789'.starts_with?('12').should.equal true
|
12
6
|
'123456789'.starts_with?('23').should.not.equal true
|
data/test/templates_test.rb
CHANGED
@@ -27,7 +27,7 @@ describe 'Olelo::Templates' do
|
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'should have #render' do
|
30
|
-
render(:test, :
|
30
|
+
render(:test, locals: {text: 'Hello, World!'}).should.equal "<h1>Hello, World!</h1>"
|
31
31
|
Olelo::Templates.cache.size.should.equal 1
|
32
32
|
end
|
33
33
|
end
|
data/test/util_test.rb
CHANGED
@@ -48,7 +48,7 @@ describe 'Olelo::Util' do
|
|
48
48
|
end
|
49
49
|
|
50
50
|
it 'should have #build_query' do
|
51
|
-
Olelo::Util.build_query(:
|
51
|
+
Olelo::Util.build_query(a: 1, b: [1, 2, 3]).should.equal 'a=1&b=1&b=2&b=3'
|
52
52
|
end
|
53
53
|
|
54
54
|
it 'should have #truncate' do
|
data/views/changes.slim
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
- title :changes_of.t(:
|
1
|
+
- title :changes_of.t(page: page.title)
|
2
2
|
h1= title
|
3
3
|
table
|
4
4
|
tbody
|
@@ -18,5 +18,5 @@ table
|
|
18
18
|
td= :parents.t
|
19
19
|
td.version
|
20
20
|
- @version.parents.each do |parent|
|
21
|
-
a href=build_path(parent, :
|
21
|
+
a href=build_path(parent, action: :changes) = Olelo::Version.short(parent)
|
22
22
|
= format_diff(@diff)
|
data/views/compare.slim
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
- title "#{:compare.t(:
|
1
|
+
- title "#{:compare.t(name: page.title)}: #{@diff.from.short} -> #{@diff.to.short}"
|
2
2
|
h1
|
3
|
-
= :compare.t(:
|
3
|
+
= :compare.t(name: page.title)
|
4
4
|
| :
|
5
|
-
a.version href=build_path(page, :
|
5
|
+
a.version href=build_path(page, version: @diff.from) = @diff.from.short
|
6
6
|
| →
|
7
|
-
a.version href=build_path(page, :
|
7
|
+
a.version href=build_path(page, version: @diff.to) = @diff.to.short
|
8
8
|
= format_diff(@diff)
|
data/views/delete.slim
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
- title :delete_page.t(:
|
1
|
+
- title :delete_page.t(page: page.title)
|
2
2
|
h1= title
|
3
|
+
= flash_messages
|
3
4
|
form action=build_path(page.path) method='post'
|
4
5
|
.box
|
5
|
-
= flash_messages
|
6
6
|
&hidden name='_method' value='delete'
|
7
7
|
label for='submit' = :really_delete.t
|
8
8
|
button&submit#submit name='submit' accesskey='d' = :delete.t
|
data/views/deleted.slim
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
- title :page_deleted.t(:
|
1
|
+
- title :page_deleted.t(page: page.title)
|
2
2
|
h1= title
|
data/views/edit.slim
CHANGED
@@ -1,33 +1,40 @@
|
|
1
1
|
- if page.new?
|
2
2
|
- title params[:path].blank? ? :new_page.t : "#{:new_page.t}: #{params[:path]}"
|
3
3
|
- else
|
4
|
-
- title params[:pos] ? :edit_page_section.t(:
|
4
|
+
- title params[:pos] ? :edit_page_section.t(page: page.title) : :edit_page.t(page: page.title)
|
5
5
|
h1= title
|
6
|
-
=
|
6
|
+
= flash_messages
|
7
|
+
= page.mime.text? ? tabs(:edit, :upload, :attributes) : tabs(:upload, :attributes)
|
7
8
|
form action=build_path(page.new? ? nil : page.path) method='post'
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
&
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
button&reset = :reset.t
|
9
|
+
- if page.mime.text?
|
10
|
+
#tab-edit.tab
|
11
|
+
h2= :edit.t
|
12
|
+
ruby:
|
13
|
+
content =
|
14
|
+
if params[:content]
|
15
|
+
params[:content]
|
16
|
+
else
|
17
|
+
params[:pos] ? page.content[params[:pos].to_i, params[:len].to_i].to_s : page.content
|
18
|
+
end
|
19
|
+
- if page.new?
|
20
|
+
label for='edit-path' = :path.t
|
21
|
+
&text#edit-path name='path' value=params[:path]
|
22
|
+
br
|
23
|
+
hr
|
24
|
+
- else
|
25
|
+
&hidden name='version' value=page.version
|
26
|
+
- if params[:pos]
|
27
|
+
&hidden name='pos' value=params[:pos]
|
28
|
+
&hidden name='len' value=content.size
|
29
|
+
textarea#edit-content.observe name='content' cols='100' rows='20' = content
|
30
30
|
br
|
31
|
+
label for='edit-comment' = :comment.t
|
32
|
+
&text#edit-comment name='comment' value=params[:comment] size='50'
|
33
|
+
= render_block :edit_buttons do
|
34
|
+
button&submit name='action' value='edit' = :save.t
|
35
|
+
button&submit name='action' value='edit-close' = :save_and_close.t
|
36
|
+
button&reset = :reset.t
|
37
|
+
br
|
31
38
|
form action=build_path(page.new? ? nil : page.path) method='post' enctype='multipart/form-data'
|
32
39
|
#tab-upload.tab
|
33
40
|
h2= :upload_file.t
|
@@ -38,7 +45,6 @@ form action=build_path(page.new? ? nil : page.path) method='post' enctype='multi
|
|
38
45
|
hr
|
39
46
|
- else
|
40
47
|
&hidden name='version' value=page.version
|
41
|
-
= flash_messages :upload
|
42
48
|
label for='upload-file' = :file.t
|
43
49
|
&file#upload-file.observe name='file'
|
44
50
|
br
|
@@ -57,7 +63,6 @@ form action=build_path(page.new? ? nil : page.path) method='post'
|
|
57
63
|
hr
|
58
64
|
- else
|
59
65
|
&hidden name='version' value=page.version
|
60
|
-
= flash_messages :attributes
|
61
66
|
= page.attribute_editor
|
62
67
|
= render_block :attributes_buttons do
|
63
68
|
.indent
|
data/views/history.slim
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
- title :history_of.t(:
|
1
|
+
- title :history_of.t(page: page.title)
|
2
2
|
h1= title
|
3
|
-
= pagination(page, @page_count, @page_nr, :
|
3
|
+
= pagination(page, @page_count, @page_nr, action: :history)
|
4
4
|
table#history-table
|
5
5
|
thead
|
6
6
|
tr
|
@@ -11,10 +11,10 @@ table#history-table
|
|
11
11
|
- @history.each do |version|
|
12
12
|
tr id="version-#{version}"
|
13
13
|
td
|
14
|
-
a href=build_path(page, :
|
14
|
+
a href=build_path(page, version: version) = truncate(version.comment, 50)
|
15
15
|
| (
|
16
|
-
a href=build_path(page, :
|
16
|
+
a href=build_path(page, action: 'changes'/version) = :changes.t
|
17
17
|
| )
|
18
18
|
td= truncate(version.author.name, 30)
|
19
19
|
td= date version.date
|
20
|
-
= pagination(page, @page_count, @page_nr, :
|
20
|
+
= pagination(page, @page_count, @page_nr, action: :history)
|
data/views/layout.slim
CHANGED
data/views/login.slim
CHANGED
@@ -1,38 +1,36 @@
|
|
1
1
|
- title :login.t
|
2
|
+
= flash_messages
|
2
3
|
- signup_enabled = Olelo::Config['authentication.enable_signup'] && Olelo::User.supports?(:signup)
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
= signup_enabled ? tabs(:login, :signup) : tabs(:login)
|
5
|
+
form action=build_path(:login) method='post'
|
6
|
+
#tab-login.tab.fieldset
|
7
|
+
h2 Login
|
8
|
+
label for='login-user' = :user.t
|
9
|
+
&text#login-user name='user'
|
10
|
+
br
|
11
|
+
label for='login-password' = :password.t
|
12
|
+
&password#login-password name='password'
|
13
|
+
br
|
14
|
+
.indent
|
15
|
+
= render_block :login_buttons do
|
16
|
+
button&submit= :login.t
|
17
|
+
br
|
18
|
+
- if signup_enabled
|
19
|
+
form action=build_path(:signup) method='post'
|
20
|
+
#tab-signup.tab.fieldset
|
21
|
+
h2= :signup.t
|
22
|
+
label for='signup-user' = :user.t
|
23
|
+
&text#signup-user name='user'
|
11
24
|
br
|
12
|
-
label for='
|
13
|
-
&password#
|
25
|
+
label for='signup-password' = :password.t
|
26
|
+
&password#signup-password name='password'
|
27
|
+
br
|
28
|
+
label for='signup-confirm' = :confirm_password.t
|
29
|
+
&password#signup-confirm name='confirm'
|
30
|
+
br
|
31
|
+
label for='signup-email' = :email.t
|
32
|
+
&text#signup-email name='email'
|
14
33
|
br
|
15
34
|
.indent
|
16
|
-
=
|
17
|
-
button&submit= :login.t
|
35
|
+
button&submit = :signup.t
|
18
36
|
br
|
19
|
-
- if signup_enabled
|
20
|
-
form action=build_path(:signup) method='post'
|
21
|
-
#tab-signup.tab.fieldset
|
22
|
-
h2= :signup.t
|
23
|
-
= flash_messages :signup
|
24
|
-
label for='signup-user' = :user.t
|
25
|
-
&text#signup-user name='user'
|
26
|
-
br
|
27
|
-
label for='signup-password' = :password.t
|
28
|
-
&password#signup-password name='password'
|
29
|
-
br
|
30
|
-
label for='signup-confirm' = :confirm_password.t
|
31
|
-
&password#signup-confirm name='confirm'
|
32
|
-
br
|
33
|
-
label for='signup-email' = :email.t
|
34
|
-
&text#signup-email name='email'
|
35
|
-
br
|
36
|
-
.indent
|
37
|
-
button&submit = :signup.t
|
38
|
-
br
|