etabliocms_core 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +38 -0
- data/app/assets/images/admin/background-heading.png +0 -0
- data/app/assets/images/admin/background-main.gif +0 -0
- data/app/assets/images/admin/background-sidebar-bottom.png +0 -0
- data/app/assets/images/admin/background-sidebar-item.png +0 -0
- data/app/assets/images/admin/background-sidebar-top.png +0 -0
- data/app/assets/images/admin/background-sidebar.png +0 -0
- data/app/assets/images/admin/background-th.png +0 -0
- data/app/assets/images/admin/background.gif +0 -0
- data/app/assets/images/admin/bullet.gif +0 -0
- data/app/assets/images/admin/icon-close.png +0 -0
- data/app/assets/images/admin/line-heading.gif +0 -0
- data/app/assets/images/admin/line-heading.png +0 -0
- data/app/assets/images/admin/lock.gif +0 -0
- data/app/assets/images/admin/news.png +0 -0
- data/app/assets/images/admin/sidebar-users.png +0 -0
- data/app/assets/images/icons/arrow_refresh.png +0 -0
- data/app/assets/images/icons/icon-add-email.gif +0 -0
- data/app/assets/images/icons/icon-add-heading.gif +0 -0
- data/app/assets/images/icons/icon-add-image.gif +0 -0
- data/app/assets/images/icons/icon-add-news.gif +0 -0
- data/app/assets/images/icons/icon-add-text.gif +0 -0
- data/app/assets/images/icons/icon-add-video.gif +0 -0
- data/app/assets/images/icons/icon-add.gif +0 -0
- data/app/assets/images/icons/icon-backward.gif +0 -0
- data/app/assets/images/icons/icon-board.gif +0 -0
- data/app/assets/images/icons/icon-cart.gif +0 -0
- data/app/assets/images/icons/icon-comments.gif +0 -0
- data/app/assets/images/icons/icon-delete.gif +0 -0
- data/app/assets/images/icons/icon-down-dark.gif +0 -0
- data/app/assets/images/icons/icon-down-down.gif +0 -0
- data/app/assets/images/icons/icon-down.gif +0 -0
- data/app/assets/images/icons/icon-edit.gif +0 -0
- data/app/assets/images/icons/icon-information.gif +0 -0
- data/app/assets/images/icons/icon-news.gif +0 -0
- data/app/assets/images/icons/icon-pack.gif +0 -0
- data/app/assets/images/icons/icon-pages.gif +0 -0
- data/app/assets/images/icons/icon-pause.gif +0 -0
- data/app/assets/images/icons/icon-pdf.gif +0 -0
- data/app/assets/images/icons/icon-play.gif +0 -0
- data/app/assets/images/icons/icon-print.gif +0 -0
- data/app/assets/images/icons/icon-refresh.gif +0 -0
- data/app/assets/images/icons/icon-sound.png +0 -0
- data/app/assets/images/icons/icon-stop.gif +0 -0
- data/app/assets/images/icons/icon-unpack.gif +0 -0
- data/app/assets/images/icons/icon-up-dark.gif +0 -0
- data/app/assets/images/icons/icon-up-up.gif +0 -0
- data/app/assets/images/icons/icon-up.gif +0 -0
- data/app/assets/images/icons/newspaper_add.png +0 -0
- data/app/assets/images/icons/printer.png +0 -0
- data/app/assets/javascripts/admin-core.js +6 -0
- data/app/assets/javascripts/admin.js +11 -0
- data/app/assets/javascripts/shared.js +12 -0
- data/app/assets/stylesheets/admin-core.css +13 -0
- data/app/assets/stylesheets/admin.css.scss +190 -0
- data/app/assets/stylesheets/shared.css.scss +28 -0
- data/app/controllers/etabliocms_core/admin/base_controller.rb +13 -0
- data/app/controllers/etabliocms_core/admin/static_controller.rb +14 -0
- data/app/controllers/etabliocms_core/admin/users_controller.rb +49 -0
- data/app/controllers/etabliocms_core/application_controller_extension.rb +29 -0
- data/app/helpers/etabliocms_core/admin/table_tree_helper.rb +90 -0
- data/app/helpers/etabliocms_core/application_helper.rb +52 -0
- data/app/helpers/etabliocms_core/output_helper.rb +33 -0
- data/app/helpers/etabliocms_core/pages_helper.rb +33 -0
- data/app/models/etabliocms_core/user.rb +9 -0
- data/app/views/etabliocms_core/admin/static/index.html.erb +3 -0
- data/app/views/etabliocms_core/admin/static/textile.html.erb +250 -0
- data/app/views/etabliocms_core/admin/users/_form.html.erb +25 -0
- data/app/views/etabliocms_core/admin/users/edit.html.erb +7 -0
- data/app/views/etabliocms_core/admin/users/index.html.erb +35 -0
- data/app/views/etabliocms_core/admin/users/new.html.erb +7 -0
- data/app/views/layouts/_errors.html.erb +10 -0
- data/app/views/layouts/_flashes.html.erb +11 -0
- data/app/views/layouts/_footer.html.erb +39 -0
- data/app/views/layouts/_sidebar_core.html.erb +5 -0
- data/app/views/layouts/admin.html.erb +72 -0
- data/app/views/layouts/email.html.erb +93 -0
- data/config/initializers/configatron.rb +1 -0
- data/config/initializers/devise.rb +223 -0
- data/config/locales/core.cs.yml +48 -0
- data/config/locales/cs.rb +229 -0
- data/config/locales/devise.cs.yml +55 -0
- data/config/routes.rb +14 -0
- data/db/migrate/20120222142355_create_users.etabliocms_core_engine.rb +26 -0
- data/lib/etabliocms_core/engine.rb +29 -0
- data/lib/etabliocms_core/version.rb +3 -0
- data/lib/etabliocms_core.rb +14 -0
- data/lib/form_helper.rb +40 -0
- metadata +190 -0
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'ostruct'
|
2
|
+
|
3
|
+
module EtabliocmsCore
|
4
|
+
|
5
|
+
module ApplicationHelper
|
6
|
+
|
7
|
+
include OutputHelper
|
8
|
+
include PagesHelper
|
9
|
+
|
10
|
+
def add_breadcrumb(title, url = nil)
|
11
|
+
@breadcrumbs << OpenStruct.new(:title => title, :url => url)
|
12
|
+
end
|
13
|
+
|
14
|
+
def set_title_and_breadcrumb(title, breadcrumb_text = nil, url = nil)
|
15
|
+
set_title title
|
16
|
+
breadcrumb_text ||= title
|
17
|
+
add_breadcrumb breadcrumb_text, url
|
18
|
+
end
|
19
|
+
|
20
|
+
def set_title(page_title)
|
21
|
+
content_for(:title) { page_title }
|
22
|
+
end
|
23
|
+
|
24
|
+
def set_description(page_description)
|
25
|
+
content_for(:description) { page_description }
|
26
|
+
end
|
27
|
+
|
28
|
+
def body_class
|
29
|
+
qualified_controller_name = controller.controller_path.gsub('/', '-')
|
30
|
+
"#{qualified_controller_name} #{qualified_controller_name}-#{controller.action_name}"
|
31
|
+
end
|
32
|
+
|
33
|
+
def render_sidebar?
|
34
|
+
return false if params[:action] == 'index' && params[:controller] == 'pages'
|
35
|
+
return false if params[:action] == 'search' && params[:controller] == 'pages'
|
36
|
+
return false if params[:controller] == 'devise/sessions'
|
37
|
+
true
|
38
|
+
end
|
39
|
+
|
40
|
+
def other_locale
|
41
|
+
case I18n.locale.to_s
|
42
|
+
when 'cs'
|
43
|
+
'en'
|
44
|
+
when 'en'
|
45
|
+
'cs'
|
46
|
+
else
|
47
|
+
'cs'
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module EtabliocmsCore::OutputHelper
|
2
|
+
|
3
|
+
def html_out(obj, method = "text", options = {})
|
4
|
+
return "" if obj.nil?
|
5
|
+
string = obj.send(method)
|
6
|
+
string = RedCloth.new(string.to_s)
|
7
|
+
string = string.to_html(:textile, :tags)
|
8
|
+
string = truncate_and_strip_tags(string, options[:words].to_i) if options[:words]
|
9
|
+
string = string.gsub(/\\|"/) { |c| "\\#{c}" } if options[:escape_double_quote]
|
10
|
+
string.html_safe
|
11
|
+
end
|
12
|
+
|
13
|
+
def sanitized(string)
|
14
|
+
simple_format(auto_link(h(string)))
|
15
|
+
end
|
16
|
+
|
17
|
+
def truncate_words(text, wordcount = 30, separator = "…")
|
18
|
+
text.to_s.split[0..(wordcount-1)].join(" ") +(text.to_s.split.size > wordcount ? separator : "")
|
19
|
+
end
|
20
|
+
|
21
|
+
def truncate_and_strip_tags(text, wordcount = 30, separator = "…")
|
22
|
+
truncate_words(strip_tags(text.to_s), wordcount, separator)
|
23
|
+
end
|
24
|
+
|
25
|
+
def truncate_and_strip_tags_from_textile(textile, wordcount = 30, separator = "…")
|
26
|
+
truncate_words(strip_tags(RedCloth.new(textile.to_s).to_html), wordcount, separator)
|
27
|
+
end
|
28
|
+
|
29
|
+
def w3c_date(date)
|
30
|
+
date.utc.strftime("%Y-%m-%dT%H:%M:%S+00:00")
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module EtabliocmsCore::PagesHelper
|
2
|
+
|
3
|
+
def render_tree(nodes = [])
|
4
|
+
html = ""
|
5
|
+
nodes.select { |node| node.visible }.each do |node|
|
6
|
+
html << "<li class='#{'no-divider' if node == nodes.last && node.level == 0 }'>"
|
7
|
+
html << page_link(node)
|
8
|
+
html << render_tree(node.children) if node.children.present? && actual?(node)
|
9
|
+
html << "</li>"
|
10
|
+
end
|
11
|
+
content_tag(:ul, html.html_safe)
|
12
|
+
end
|
13
|
+
|
14
|
+
def page_link(node)
|
15
|
+
link_to(node.title, node.url.present? ? node.url : page_path(node),
|
16
|
+
:class => node_class(node),
|
17
|
+
:style => "padding-left: #{node.level*10 + 15}px").html_safe
|
18
|
+
end
|
19
|
+
|
20
|
+
def actual?(node)
|
21
|
+
if node.url.present?
|
22
|
+
(node.url =~ /zeptejte-se/ && params[:controller] == 'questions') || false
|
23
|
+
else
|
24
|
+
@page.present? ? @page.self_and_ancestors.include?(node) : false
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
def node_class(node)
|
30
|
+
actual?(node) ? 'active' : 'inactive'
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
@@ -0,0 +1,250 @@
|
|
1
|
+
<% set_title_and_breadcrumb "Nápověda k syntaxi Textile" %>
|
2
|
+
|
3
|
+
<h1>Textile</h1>
|
4
|
+
<p>Textile je značkovací jazyk, umožňující zapisovat HTML v textové formě, bez HTML značek.</p>
|
5
|
+
|
6
|
+
<table id="textile-help">
|
7
|
+
<thead>
|
8
|
+
<tr class="dark-row">
|
9
|
+
<th>Objekt</th>
|
10
|
+
<th>Jak se zapisuje</th>
|
11
|
+
<th>Jak vypadá</th>
|
12
|
+
</tr>
|
13
|
+
</thead>
|
14
|
+
<tbody>
|
15
|
+
<tr>
|
16
|
+
<th>Nadpis</th>
|
17
|
+
<td>h2. Nadpis</td>
|
18
|
+
<td><%= textilize("h2. Nadpis") %></td>
|
19
|
+
</tr>
|
20
|
+
<tr>
|
21
|
+
<th>Menší nadpis</th>
|
22
|
+
<td>h3. Nadpis</td>
|
23
|
+
<td><%= textilize("h3. Menší nadpis") %></td>
|
24
|
+
</tr>
|
25
|
+
<tr>
|
26
|
+
<th>Bloková citace</th>
|
27
|
+
<td>bq. <%= Lorem::Base.new('words', 19).output %></td>
|
28
|
+
<td><%= textilize("bq. #{Lorem::Base.new('words', 19).output}") %></td>
|
29
|
+
</tr>
|
30
|
+
<tr>
|
31
|
+
<th>Kurzíva</th>
|
32
|
+
<td>Lorem _ipsum dolor_ sit amet.</td>
|
33
|
+
<td><%= textilize("Lorem _ipsum dolor_ sit amet.") %></td>
|
34
|
+
</tr>
|
35
|
+
<tr>
|
36
|
+
<th>Tučné</th>
|
37
|
+
<td>Lorem *ipsum dolor* sit amet.</td>
|
38
|
+
<td><%= textilize("Lorem *ipsum dolor* sit amet.") %></td>
|
39
|
+
</tr>
|
40
|
+
<tr>
|
41
|
+
<th>Řádková citace</th>
|
42
|
+
<td>Lorem ??ipsum dolor?? sit amet.</td>
|
43
|
+
<td><%= textilize("Lorem ??ipsum dolor?? sit amet.") %></td>
|
44
|
+
</tr>
|
45
|
+
<tr>
|
46
|
+
<th>Horní index</th>
|
47
|
+
<td>Lorem ^ipsum^ dolor sit amet.</td>
|
48
|
+
<td><%= textilize("Lorem ^ipsum^ dolor sit amet.") %></td>
|
49
|
+
</tr>
|
50
|
+
<tr>
|
51
|
+
<th>Dolní index</th>
|
52
|
+
<td>Lorem ~ipsum~ dolor sit amet.</td>
|
53
|
+
<td><%= textilize("Lorem ~ipsum~ dolor sit amet.") %></td>
|
54
|
+
</tr>
|
55
|
+
<tr>
|
56
|
+
<th>Položka číselného seznamu</th>
|
57
|
+
<td># Lorem ipsum dolor sit amet.</td>
|
58
|
+
<td><%= textilize("# Lorem ipsum dolor sit amet.") %></td>
|
59
|
+
</tr>
|
60
|
+
<tr>
|
61
|
+
<th>Položka odrážkového seznamu</th>
|
62
|
+
<td>* Lorem ipsum dolor sit amet.</td>
|
63
|
+
<td><%= textilize("* Lorem ipsum dolor sit amet.") %></td>
|
64
|
+
</tr>
|
65
|
+
<tr>
|
66
|
+
<th>Odkaz</th>
|
67
|
+
<td>"Text odkazu":http://www.seznam.cz</td>
|
68
|
+
<td><%= textilize("\"Text odkazu\":http://www.seznam.cz") %></td>
|
69
|
+
</tr>
|
70
|
+
<tr>
|
71
|
+
<th>Odkaz v textu</th>
|
72
|
+
<td>Lorem "ipsum dolor":http://www.seznam.cz sit amet.</td>
|
73
|
+
<td><%= textilize("Lorem \"ipsum dolor\":http://www.seznam.cz sit amet.") %></td>
|
74
|
+
</tr>
|
75
|
+
<tr>
|
76
|
+
<th>Odkaz v textu s bublinkou</th>
|
77
|
+
<td>Lorem "ipsum dolor"(Text bublinky):http://www.seznam.cz sit amet.</td>
|
78
|
+
<td><%= textilize("Lorem \"ipsum dolor(Text bublinky)\":http://www.seznam.cz sit amet.") %></td>
|
79
|
+
</tr>
|
80
|
+
<tr>
|
81
|
+
<th>Obrázek s popiskem</th>
|
82
|
+
<td>!<%= "http://#{configatron.host}/images/mystic/box-heading-background.png" %>(Popisek obrázku)!</td>
|
83
|
+
<td><%= textilize("!/images/mystic/box-heading-background.png(Popisek obrázku)!") %></td>
|
84
|
+
</tr>
|
85
|
+
<tr>
|
86
|
+
<th>Obrázek s popiskem a odkazem</th>
|
87
|
+
<td>!<%= "http://#{configatron.host}/images/mystic/box-heading-background.png" %>(Popisek
|
88
|
+
obrázku)!:http://www.seznam.cz
|
89
|
+
</td>
|
90
|
+
<td><%= textilize("!/images/mystic/box-heading-background.png(Popisek obrázku)!:http://www.seznam.cz") %></td>
|
91
|
+
</tr>
|
92
|
+
|
93
|
+
<tr>
|
94
|
+
<th>Obrázek v textu s popiskem zarovnaný na střed</th>
|
95
|
+
<td>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. <br/>
|
96
|
+
!(image-center)<%= "http://#{configatron.host}/images/mystic/box-heading-background.png" %>(Popisek obrázku)!<br/>
|
97
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
98
|
+
</td>
|
99
|
+
<td>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. <%= textilize("!(image-center)/images/mystic/box-heading-background.png(Popisek obrázku)!
|
100
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. ") %></td>
|
101
|
+
</tr>
|
102
|
+
<tr>
|
103
|
+
<th>Obrázek v textu s popiskem plovoucí vlevo</th>
|
104
|
+
<td>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. <br/>
|
105
|
+
!(image-left)<%= "http://#{configatron.host}/images/mystic/box-heading-background.png" %>(Popisek obrázku)!<br/>
|
106
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing
|
107
|
+
elit.
|
108
|
+
</td>
|
109
|
+
<td>Lorem ipsum dolor sit amet, consectetuer adipiscing
|
110
|
+
elit. <%= textilize("!(image-left)/images/mystic/box-heading-background.png(Popisek obrázku)! Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.") %></td>
|
111
|
+
</tr>
|
112
|
+
<tr>
|
113
|
+
<th>Obrázek v textu s popiskem plovoucí vpravo</th>
|
114
|
+
<td>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. <br/>
|
115
|
+
!(image-right)<%= "http://#{configatron.host}/images/mystic/box-heading-background.png" %>(Popisek obrázku)!<br/>
|
116
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing
|
117
|
+
elit.
|
118
|
+
</td>
|
119
|
+
<td>Lorem ipsum dolor sit amet, consectetuer adipiscing
|
120
|
+
elit. <%= textilize("!(image-right)/images/mystic/box-heading-background.png(Popisek obrázku)! Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.") %></td>
|
121
|
+
</tr>
|
122
|
+
<tr>
|
123
|
+
<th>Obrázek s lightboxem</th>
|
124
|
+
<td>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. <br/><br/>
|
125
|
+
fig. <%= "http://#{configatron.host}/images/mystic/box-heading-background.png" %>
|
126
|
+
| <%= "http://#{configatron.host}/images/mystic/logo.png" %> | Popisek obrázku <br/> <br/>
|
127
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing
|
128
|
+
elit.
|
129
|
+
</td>
|
130
|
+
<td>Lorem ipsum dolor sit amet, consectetuer adipiscing
|
131
|
+
elit. <%= textilize("fig. /images/mystic/box-heading-background.png | /images/mystic/logo.png | Popisek obrázku") %>
|
132
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing
|
133
|
+
elit.
|
134
|
+
</td>
|
135
|
+
</tr>
|
136
|
+
|
137
|
+
<tr>
|
138
|
+
<th>Ikonka</th>
|
139
|
+
<td>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. <br/><br/>
|
140
|
+
icon. <%= "http://#{configatron.host}/images/mystic/box-heading-background.png" %>
|
141
|
+
| http://www.seznam.cz | Popisek ikonky <br/> <br/>
|
142
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing
|
143
|
+
elit.
|
144
|
+
</td>
|
145
|
+
<td>Lorem ipsum dolor sit amet, consectetuer adipiscing
|
146
|
+
elit. <%= textilize("icon. /images/mystic/box-heading-background.png | http://www.seznam.cz | Popisek ikonky") %>
|
147
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing
|
148
|
+
elit.
|
149
|
+
</td>
|
150
|
+
</tr>
|
151
|
+
<tr>
|
152
|
+
<th>Ikonka se zalamovací čárou</th>
|
153
|
+
<td>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. <br/><br/>
|
154
|
+
icon. <%= "http://#{configatron.host}/images/mystic/box-heading-background.png" %>
|
155
|
+
| http://www.seznam.cz | Popisek ikonky <br/>
|
156
|
+
cleaner. <br/>
|
157
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing
|
158
|
+
elit.
|
159
|
+
</td>
|
160
|
+
<td>Lorem ipsum dolor sit amet, consectetuer adipiscing
|
161
|
+
elit. <%= textilize("icon. /images/mystic/box-heading-background.png | http://www.seznam.cz | Popisek ikonky ") %>
|
162
|
+
<hr class="cleaner" />
|
163
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing
|
164
|
+
elit.
|
165
|
+
</td>
|
166
|
+
</tr>
|
167
|
+
<tr>
|
168
|
+
<th>Google mapa</th>
|
169
|
+
<td><strong>Formát:</strong><br/><br/>
|
170
|
+
gmap. latitude | longitude | zoom | Popisek k mapě
|
171
|
+
<td><strong>Příklad:</strong><br/><br/>
|
172
|
+
gmap. 50.045542 | 14.446846 | 10 | Adresa v Praze
|
173
|
+
</td>
|
174
|
+
</tr>
|
175
|
+
<tr>
|
176
|
+
<th>Youtube video</th>
|
177
|
+
<td><strong>Formát:</strong><br/><br/>
|
178
|
+
youtube. kód | šířka | výška | Popisek videa
|
179
|
+
<td><strong>Příklad:</strong><br/><br/>
|
180
|
+
youtube. QKPwuJyC-4E | 300 | 210| Stacie Monroe
|
181
|
+
</td>
|
182
|
+
</tr>
|
183
|
+
<tr>
|
184
|
+
<th>Flash</th>
|
185
|
+
<td><strong>Formát:</strong><br/><br/>
|
186
|
+
flash. url | šířka | výška
|
187
|
+
<td><strong>Příklad:</strong><br/><br/>
|
188
|
+
flash. http://www.seznam.cz/flash.swf | 300 | 210
|
189
|
+
</td>
|
190
|
+
</tr>
|
191
|
+
<tr>
|
192
|
+
<th>Zarovnání odstavce do bloku</th>
|
193
|
+
<td>p(justify). Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</td>
|
194
|
+
<td><%= textilize("p(justify). Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.") %></td>
|
195
|
+
</tr>
|
196
|
+
<tr>
|
197
|
+
<th>Zarovnání odstavce napravo</th>
|
198
|
+
<td>p(right). Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</td>
|
199
|
+
<td><%= textilize("p(right). Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.") %></td>
|
200
|
+
</tr>
|
201
|
+
<tr>
|
202
|
+
<th>Komplexní příklad</th>
|
203
|
+
<td>h2. Lorem ipsum<br/>
|
204
|
+
Lorem ipsum dolor sit amet, *"consectetuer":http://www.seznam.cz* adipiscing elit. Lorem ipsum dolor sit amet,
|
205
|
+
consectetuer adipiscing elit. <br/>
|
206
|
+
* Lorem<br/>
|
207
|
+
* Ipsum<br/>
|
208
|
+
** Lorem ipsum<br/>
|
209
|
+
** Dolor sit amet<br/>
|
210
|
+
* dolor sit amet<br/>
|
211
|
+
!(image-center)<%= "http://#{configatron.host}/images/mystic/box-heading-background.png" %>(Popisek
|
212
|
+
obrázku)!:http://www.seznam.cz<br/>
|
213
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing
|
214
|
+
elit.
|
215
|
+
</td>
|
216
|
+
<td><%= textilize("h2. Lorem ipsum
|
217
|
+
|
218
|
+
Lorem ipsum dolor sit amet, *\"consectetuer\":http://www.seznam.cz* adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
219
|
+
* Lorem
|
220
|
+
* Ipsum
|
221
|
+
** Lorem ipsum
|
222
|
+
** Dolor sit amet
|
223
|
+
* dolor sit amet
|
224
|
+
!(image-center)/images/mystic/box-heading-background.png(Popisek obrázku)!:http://www.seznam.cz
|
225
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.") %></td>
|
226
|
+
</tr>
|
227
|
+
|
228
|
+
|
229
|
+
</tbody>
|
230
|
+
|
231
|
+
</table>
|
232
|
+
|
233
|
+
|
234
|
+
<p>Podrobnější informace naleznete například na oficiálních
|
235
|
+
stránkách <%= link_to "Textile", "http://www.textism.com/tools/textile/" %>.</p>
|
236
|
+
|
237
|
+
<% content_for :javascript do %>
|
238
|
+
<%= javascript_include_tag "jquery.colorbox-min" %>
|
239
|
+
|
240
|
+
<script type="text/javascript">
|
241
|
+
var opts = {
|
242
|
+
current: "{current} z {total}",
|
243
|
+
previous: "předchozí",
|
244
|
+
next: "další",
|
245
|
+
close: "zavřít"
|
246
|
+
};
|
247
|
+
$("a[rel=text-gallery]").colorbox(opts);
|
248
|
+
</script>
|
249
|
+
<% end %>
|
250
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<%= render "layouts/errors", :target => @user %>
|
2
|
+
|
3
|
+
<fieldset>
|
4
|
+
<legend><%= t('etabliocms_core_user.admin_legend') %></legend>
|
5
|
+
|
6
|
+
<p>
|
7
|
+
<%= f.label :email %>
|
8
|
+
<%= f.text_field :email, :class => 'text-field' %>
|
9
|
+
</p>
|
10
|
+
|
11
|
+
<p>
|
12
|
+
<%= f.label :password %>
|
13
|
+
<%= f.password_field :password, :class => 'text-field' %>
|
14
|
+
</p>
|
15
|
+
|
16
|
+
<p>
|
17
|
+
<%= f.label :password_confirmation %>
|
18
|
+
<%= f.password_field :password_confirmation, :class => 'text-field' %>
|
19
|
+
</p>
|
20
|
+
|
21
|
+
<p>
|
22
|
+
<%= submit_tag t('admin.save'), :class => 'submit' %>
|
23
|
+
</p>
|
24
|
+
|
25
|
+
</fieldset>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<% set_title_and_breadcrumb t('etabliocms_core_user.edit', :title => @user.email) %>
|
2
|
+
|
3
|
+
<h1><%= @user.email %></h1>
|
4
|
+
|
5
|
+
<%= form_for @user, :url => admin_user_path(@user.id), :html => {:method => :put, :id => "admin-form"} do |f| -%>
|
6
|
+
<%= render :partial => 'form', :locals => { :f => f } %>
|
7
|
+
<% end %>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<% set_title_and_breadcrumb t('etabliocms_core_user.users') %>
|
2
|
+
|
3
|
+
<h1><%= t('etabliocms_core_user.users') %></h1>
|
4
|
+
|
5
|
+
<div class="strap">
|
6
|
+
<%= link_to "#{t('etabliocms_core_user.add')} »".html_safe, new_admin_user_path, :class => 'text-icon icon-add' %>
|
7
|
+
<%= link_to "#{t('admin.refresh')} »".html_safe, admin_users_path, :class => 'text-icon icon-refresh' %>
|
8
|
+
<%= link_to "#{t('admin.back_to_admin')} »".html_safe, admin_path, :class => 'text-icon icon-backward' %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<table class="admin-table">
|
12
|
+
<thead>
|
13
|
+
<tr>
|
14
|
+
<th><%= t('activerecord.attributes.etabliocms_core_user.email') %></th>
|
15
|
+
<th><%= t('activerecord.attributes.etabliocms_core_user.last_sign_in_at') %></th>
|
16
|
+
<th><%= t('admin.actions') %></th>
|
17
|
+
</tr>
|
18
|
+
</thead>
|
19
|
+
<tbody>
|
20
|
+
|
21
|
+
<% for item in @users %>
|
22
|
+
<tr class="<%= cycle("odd-row", "even-row") -%>">
|
23
|
+
<td><%= link_to item.email, edit_admin_user_url(item.id) %></td>
|
24
|
+
<td><%= l(item.last_sign_in_at, :format => :short) if item.last_sign_in_at.is_a?(DateTime) %></td>
|
25
|
+
<td>
|
26
|
+
<%= link_to t('admin.edit'), edit_admin_user_url(item.id), :class => 'icon icon-edit', :title => t('admin.edit') %>
|
27
|
+
<%= link_to t('admin.destroy'), admin_user_url(item.id),
|
28
|
+
:method => :delete,
|
29
|
+
:confirm => t('etabliocms_core_user.destroy_confirmation'),
|
30
|
+
:class => 'icon icon-destroy',
|
31
|
+
:title => t('admin.destroy') %>
|
32
|
+
</td>
|
33
|
+
<% end %>
|
34
|
+
</tbody>
|
35
|
+
</table>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<% set_title_and_breadcrumb t('etabliocms_core_user.new') %>
|
2
|
+
|
3
|
+
<h1><%= t('etabliocms_core_user.new') %></h1>
|
4
|
+
|
5
|
+
<%= form_for @user, :url => admin_users_url, :html => {:method => :post, :id => "admin-form"} do |f| -%>
|
6
|
+
<%= render :partial => 'form', :locals => { :f => f } %>
|
7
|
+
<% end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<div id="flash">
|
2
|
+
<%- flash.each do |name, msg| -%>
|
3
|
+
<%- if msg.is_a?(String) %>
|
4
|
+
<p class="<%= name %>">
|
5
|
+
<a href="" class="flash-close" title="Zavřít">
|
6
|
+
<img src="<%= asset_path "admin/icon-close.png" %>" alt="<%= t('common.close') %>"/></a>
|
7
|
+
<%= msg %>
|
8
|
+
</p>
|
9
|
+
<%- end %>
|
10
|
+
<%- end -%>
|
11
|
+
</div>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<footer id="contact">
|
2
|
+
<div id="contact-inner">
|
3
|
+
<div id="contact-inner-inner">
|
4
|
+
<div id="map">
|
5
|
+
<div id="map-inner">
|
6
|
+
</div>
|
7
|
+
</div>
|
8
|
+
<p><%= t('contact.name') %></p>
|
9
|
+
<p><%= t('contact.street') %></p>
|
10
|
+
<p><%= t('contact.city') %></p>
|
11
|
+
<p></p>
|
12
|
+
<table>
|
13
|
+
<tr>
|
14
|
+
<th><%= t('contact.phone') %>:</th>
|
15
|
+
<td><%= t('contact.phone1') %>, <br/><%= t('contact.phone2') %></td>
|
16
|
+
</tr>
|
17
|
+
<tr>
|
18
|
+
<th><%= t('contact.email') %>:</th>
|
19
|
+
<td><a href="mailto:<%= configatron.email %>"><%= configatron.email %></a></td>
|
20
|
+
</tr>
|
21
|
+
<tr>
|
22
|
+
<th><%= t('contact.opened') %>:</th>
|
23
|
+
<td><%= t('contact.opening_time') %></td>
|
24
|
+
</tr>
|
25
|
+
</table>
|
26
|
+
<%= link_to t('contact.facebook'), configatron.facebook, :id => "fb-link" %>
|
27
|
+
|
28
|
+
<h3 class="centered"><%= t('contact.internet_prices') %></h3>
|
29
|
+
|
30
|
+
<p class="centered grey"><%= t('contact.internet_prices_text') %></p>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
</footer>
|
34
|
+
|
35
|
+
<footer id="conclusion">
|
36
|
+
<p>
|
37
|
+
<%= Date.today.year %> © <%= link_to configatron.title, root_url %> | <%= link_to t('common.login'), new_user_session_path %>
|
38
|
+
</p>
|
39
|
+
</footer>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<h3><%= image_tag asset_path("admin/sidebar-users.png"), :alt => t('etabliocms_core_user.users') %><%= t('etabliocms_core_user.users') %></h3>
|
2
|
+
<ul>
|
3
|
+
<li><%= link_to_unless_current I18n.t('etabliocms_core_user.users_count', :count => EtabliocmsCore::User.count), admin_users_path %></li>
|
4
|
+
<li><%= link_to_unless_current t('etabliocms_core_user.add'), new_admin_user_path %></li>
|
5
|
+
</ul>
|
@@ -0,0 +1,72 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<!--[if lt IE 7 ]>
|
3
|
+
<html class="ie ie6" lang="cs"> <![endif]-->
|
4
|
+
<!--[if IE 7 ]>
|
5
|
+
<html class="ie ie7" lang="cs"> <![endif]-->
|
6
|
+
<!--[if IE 8 ]>
|
7
|
+
<html class="ie ie8" lang="cs"> <![endif]-->
|
8
|
+
<!--[if (gte IE 9)|!(IE)]><!-->
|
9
|
+
<html lang="cs"> <!--<![endif]-->
|
10
|
+
<head>
|
11
|
+
<meta charset="utf-8">
|
12
|
+
<meta http-equiv="Content-Language" content="cs"/>
|
13
|
+
<meta name="description" content="<%= yield :title %> – Administrace"/>
|
14
|
+
<title><%= yield :title %> | <%= t('admin.admin') %> </title>
|
15
|
+
<%= stylesheet_link_tag "admin-core" %>
|
16
|
+
<%= javascript_include_tag "admin-core" %>
|
17
|
+
<%= csrf_meta_tags %>
|
18
|
+
</head>
|
19
|
+
|
20
|
+
<body class="<%= body_class %>">
|
21
|
+
<header id="topbar">
|
22
|
+
<div class="container">
|
23
|
+
<nav id="user-information">
|
24
|
+
|
25
|
+
<% if etabliocms_core_user_signed_in? -%>
|
26
|
+
<strong><%= t('common.logged') %>: <%= link_to current_etabliocms_core_user.email, admin_path %></strong>
|
27
|
+
<ul>
|
28
|
+
<li><%= link_to t('common.logout'), destroy_etabliocms_core_user_session_path, {:title => t('common.logout'), :method => :delete} %></li>
|
29
|
+
</ul>
|
30
|
+
<% end -%>
|
31
|
+
|
32
|
+
</nav>
|
33
|
+
</div>
|
34
|
+
</header>
|
35
|
+
|
36
|
+
<div class="container">
|
37
|
+
<div id="main">
|
38
|
+
<div id="content">
|
39
|
+
|
40
|
+
<%= render "layouts/flashes" %>
|
41
|
+
|
42
|
+
<%= yield %>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<nav id="sidebar">
|
47
|
+
<div id="sidebar-inner">
|
48
|
+
<div id="sidebar-inner-inner">
|
49
|
+
|
50
|
+
<% EtabliocmsCore.modules.each do |m| %>
|
51
|
+
<%= render :partial => "layouts/sidebar_#{m}" %>
|
52
|
+
<% end %>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
</nav>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
|
61
|
+
|
62
|
+
<script>
|
63
|
+
$(function() {
|
64
|
+
Shared.initFlashClose();
|
65
|
+
Admin.initPopUp();
|
66
|
+
})
|
67
|
+
</script>
|
68
|
+
|
69
|
+
<%= yield :javascript %>
|
70
|
+
|
71
|
+
</body>
|
72
|
+
</html>
|