rad_common_interface 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -0
- data/app/static/demo/images/img1.jpg +0 -0
- data/app/static/demo/images/img1_200.jpg +0 -0
- data/app/static/demo/images/img1_icon.jpg +0 -0
- data/app/static/demo/images/img1_thumb.jpg +0 -0
- data/app/static/demo/images/img2.jpg +0 -0
- data/app/static/demo/images/img2_200.jpg +0 -0
- data/app/static/demo/images/img2_icon.jpg +0 -0
- data/app/static/demo/images/img2_thumb.jpg +0 -0
- data/app/static/demo/images/img3.jpg +0 -0
- data/app/static/demo/images/img3_200.jpg +0 -0
- data/app/static/demo/images/img3_icon.jpg +0 -0
- data/app/static/demo/images/img3_thumb.jpg +0 -0
- data/app/static/demo/images/img_big.jpg +0 -0
- data/app/static/demo/images/img_big_icon.jpg +0 -0
- data/app/static/demo/images/img_big_thum.jpg +0 -0
- data/app/static/demo/images/video_icon.png +0 -0
- data/app/static/face/attachments.js +85 -0
- data/app/static/face/dialogs.js +189 -0
- data/app/static/face/discussion.js +47 -0
- data/app/static/face/markup.js +53 -0
- data/app/static/face/more.js +33 -0
- data/app/static/face/table.js +24 -0
- data/app/static/face/tabs.js +26 -0
- data/app/static/face.css +8 -0
- data/app/static/face.js +109 -0
- data/app/static/lib/SimpleDialog/SimpleDialog.ContextMenu.js +36 -0
- data/app/static/lib/SimpleDialog/SimpleDialog.Image.js +121 -0
- data/app/static/lib/SimpleDialog/SimpleDialog.Mask.js +76 -0
- data/app/static/lib/SimpleDialog/SimpleDialog.Static.js +0 -0
- data/app/static/lib/SimpleDialog/SimpleDialog.css +12 -0
- data/app/static/lib/SimpleDialog/SimpleDialog.js +158 -0
- data/app/static/lib/ajax_file_uploading.js +33 -0
- data/app/static/themes/default/reset.css +127 -0
- data/app/static/themes/default/style/application.less +51 -0
- data/app/static/themes/default/style/aspects.less +15 -0
- data/app/static/themes/default/style/basic.less +49 -0
- data/app/static/themes/default/style/forms.less +34 -0
- data/app/static/themes/default/style/items.less +43 -0
- data/app/static/themes/default/style/markup.less +16 -0
- data/app/static/themes/default/style/micelaneous.less +10 -0
- data/app/static/themes/default/style/mixins.less +72 -0
- data/app/static/themes/default/style/styles.less +57 -0
- data/app/static/themes/default/style/tools.less +15 -0
- data/app/static/themes/default/style/variables.less +38 -0
- data/app/static/themes/default/style.css +944 -0
- data/app/static/themes/default/style.js +127 -0
- data/app/static/themes/default/style.less +22 -0
- data/app/static/vendor/flext.js +254 -0
- data/app/static/vendor/formalize/formalize.css +311 -0
- data/app/static/vendor/formalize/mootools.formalize.js +163 -0
- data/app/static/vendor/formalize/reset.css +171 -0
- data/app/static/vendor/iFrameFormRequest.js +95 -0
- data/app/static/vendor/mootools-more.js +4185 -0
- data/app/static/vendor/purr/purr.css +43 -0
- data/app/static/vendor/purr/purr.js +308 -0
- data/app/views/face/_attachments_tag.html.haml +17 -0
- data/app/views/rad/face/demo/commons/aspects.html.haml +32 -0
- data/app/views/rad/face/demo/commons/basic.html.haml +86 -0
- data/app/views/rad/face/demo/commons/forms.html.haml +57 -0
- data/app/views/rad/face/demo/commons/items.html.haml +32 -0
- data/app/views/rad/face/demo/commons/style.html.erb +111 -0
- data/app/views/rad/face/demo/dialogs/dialog.js.haml +1 -0
- data/app/views/rad/face/demo/dialogs/dialog_form.html.haml +7 -0
- data/app/views/rad/face/demo/dialogs/dialog_form.js.erb +1 -0
- data/app/views/rad/face/demo/dialogs/inplace/_element.html.haml +3 -0
- data/app/views/rad/face/demo/dialogs/inplace/_form.html.haml +3 -0
- data/app/views/rad/face/demo/dialogs/inplace.js.haml +1 -0
- data/app/views/rad/face/demo/dialogs/inplace_form.js.haml +2 -0
- data/app/views/rad/face/demo/dialogs/show.html.haml +27 -0
- data/app/views/rad/face/demo/helps/help.html.haml +1 -0
- data/app/views/rad/face/demo/helps/index.html.haml +25 -0
- data/app/views/rad/face/demo/layout.html.haml +3 -0
- data/app/views/rad/face/demo/layout.js.haml +11 -0
- data/app/views/rad/face/demo/shared/_comments.html.haml +11 -0
- data/app/views/rad/face/demo/shared/_core_tools.html.haml +6 -0
- data/app/views/rad/face/demo/shared/_line_previews.html.haml +40 -0
- data/app/views/rad/face/demo/shared/_paginator.html.haml +7 -0
- data/app/views/rad/face/demo/shared/_tools.html.haml +25 -0
- data/app/views/rad/face/demo/shared/_top_navigation_bottom.html.haml +34 -0
- data/app/views/rad/face/demo/sites/blog.html.haml +12 -0
- data/app/views/rad/face/demo/sites/home.html.haml +8 -0
- data/app/views/rad/face/demo/sites/post.html.haml +10 -0
- data/app/views/rad/face/demo/sites/style.html.haml +8 -0
- data/app/views/themes/default/application.html.haml +25 -0
- data/app/views/themes/default/basic_list.html.haml +2 -0
- data/app/views/themes/default/basic_list_item.html.haml +5 -0
- data/app/views/themes/default/bottom_panel.html.haml +16 -0
- data/app/views/themes/default/comment.html.haml +20 -0
- data/app/views/themes/default/controls.html.haml +3 -0
- data/app/views/themes/default/demo_metadata.rb +118 -0
- data/app/views/themes/default/details.html.haml +6 -0
- data/app/views/themes/default/discussion.html.haml +7 -0
- data/app/views/themes/default/divider.html.haml +2 -0
- data/app/views/themes/default/forms/errors.html.haml +4 -0
- data/app/views/themes/default/forms/field.html.haml +18 -0
- data/app/views/themes/default/forms/form.html.haml +4 -0
- data/app/views/themes/default/forms/line.html.haml +8 -0
- data/app/views/themes/default/help.html.haml +3 -0
- data/app/views/themes/default/html.html.haml +1 -0
- data/app/views/themes/default/index.html.haml +6 -0
- data/app/views/themes/default/item.html.haml +12 -0
- data/app/views/themes/default/layout_templates/dashboard.html.haml +1 -0
- data/app/views/themes/default/layout_templates/default.html.haml +22 -0
- data/app/views/themes/default/line.html.haml +21 -0
- data/app/views/themes/default/message.html.haml +2 -0
- data/app/views/themes/default/more.html.haml +8 -0
- data/app/views/themes/default/narrow.html.haml +2 -0
- data/app/views/themes/default/navigation.html.haml +16 -0
- data/app/views/themes/default/paginator.html.haml +8 -0
- data/app/views/themes/default/shared/details.html.haml +17 -0
- data/app/views/themes/default/table.html.haml +9 -0
- data/app/views/themes/default/table_row.html.haml +4 -0
- data/app/views/themes/default/tabs.html.haml +27 -0
- data/app/views/themes/default/tag_selector.html.haml +10 -0
- data/app/views/themes/default/text.html.haml +4 -0
- data/app/views/themes/default/thumb.html.haml +10 -0
- data/app/views/themes/default/title.html.haml +3 -0
- data/app/views/themes/default/tool.html.haml +5 -0
- data/app/views/themes/default/toolbar.html.haml +16 -0
- data/app/views/themes/default/top_panel.html.haml +18 -0
- metadata +153 -25
@@ -0,0 +1,7 @@
|
|
1
|
+
= b.title "Dialog Title"
|
2
|
+
- b.form_tag action: url_for(:dialog, format: :js) do |f|
|
3
|
+
= f.hidden_field_tag :theme, params.theme
|
4
|
+
= f.text_field_tag :name, "Some Name", label: "Name"
|
5
|
+
= f.text_area_tag :body, "Some text"
|
6
|
+
= f.check_box_tag :valid, true, label: 'Valid'
|
7
|
+
= f.line ok_button('Ok'), cancel_button('Cancel')
|
@@ -0,0 +1 @@
|
|
1
|
+
rad.dialog().show("<%= js render('dialog_form', format: 'html') %>");
|
@@ -0,0 +1 @@
|
|
1
|
+
rad.inplace('#inplace_element').update("#{js render('inplace/element')}");
|
@@ -0,0 +1,27 @@
|
|
1
|
+
= b.divider "Context Menu"
|
2
|
+
%a{href: "#", class: "the_context_menu_button", "data-content_id" => "add_content_menu"}
|
3
|
+
Add
|
4
|
+
#add_content_menu.hidden
|
5
|
+
%a{href: "#"} Page
|
6
|
+
%a{href: "#"} Note
|
7
|
+
%a{href: "#"} File
|
8
|
+
|
9
|
+
= b.divider "Dialog"
|
10
|
+
= link_to('Show Dialog', :dialog_form, format: :js, theme: params.theme)
|
11
|
+
|
12
|
+
= b.divider "Images"
|
13
|
+
- b.text do
|
14
|
+
%a{href: url_for("/static/demo/images/img1.jpg")}
|
15
|
+
%img{src: url_for("/static/demo/images/img1_icon.jpg")}
|
16
|
+
%a{href: url_for("/static/demo/images/img2.jpg")}
|
17
|
+
%img{src: url_for("/static/demo/images/img2_icon.jpg")}
|
18
|
+
%a{href: url_for("/static/demo/images/img3.jpg")}
|
19
|
+
%img{src: url_for("/static/demo/images/img3_icon.jpg")}
|
20
|
+
%a{href: url_for("/static/demo/images/img_big.jpg")}
|
21
|
+
%img{src: url_for("/static/demo/images/img_big_icon.jpg")}
|
22
|
+
.clear
|
23
|
+
|
24
|
+
Use Left/Right arrows to navigate between images.
|
25
|
+
|
26
|
+
= b.divider "In-place editor"
|
27
|
+
= render 'inplace/element'
|
@@ -0,0 +1 @@
|
|
1
|
+
= render themed_partial('/help')
|
@@ -0,0 +1,25 @@
|
|
1
|
+
- helps = Rad::Face::Demo::Helps
|
2
|
+
- commons = Rad::Face::Demo::Commons
|
3
|
+
- dialogs = Rad::Face::Demo::Dialogs
|
4
|
+
|
5
|
+
- theme = (params.theme || 'default').to_sym
|
6
|
+
|
7
|
+
= b.title "The :#{theme} theme:"
|
8
|
+
|
9
|
+
- b.basic_list do |o|
|
10
|
+
- o.content do
|
11
|
+
= b.basic_list_item link_to('Help', helps, :help, theme: theme)
|
12
|
+
|
13
|
+
- urls = %w{basic forms aspects style items}.collect{|action| link_to action.humanize, commons, action.to_sym, theme: theme}
|
14
|
+
= b.basic_list_item urls.join(', ')
|
15
|
+
|
16
|
+
= b.basic_list_item link_to('Dialogs', dialogs, :show, theme: theme)
|
17
|
+
|
18
|
+
%br
|
19
|
+
|
20
|
+
= render themed_partial('/index')
|
21
|
+
= render themed_partial('/index2') if theme == :default and template.exist?(themed_partial('/index2'))
|
22
|
+
|
23
|
+
%br
|
24
|
+
|
25
|
+
= b.text "Sources: <a href='http://github.com/alexeypetrushin/rad_common_interface'>http://github.com/alexeypetrushin/rad_common_interface</a>."
|
@@ -0,0 +1,11 @@
|
|
1
|
+
= "try{"
|
2
|
+
- unless params._target.blank?
|
3
|
+
var target = $('#{params._target}');
|
4
|
+
- else
|
5
|
+
var target = $('body');
|
6
|
+
|
7
|
+
= yield
|
8
|
+
|
9
|
+
- if msg = flash.sticky_error || flash.error || flash.sticky_info || flash.info
|
10
|
+
rad.info("#{js msg}");
|
11
|
+
= "}catch(e){console.log(e)};"
|
@@ -0,0 +1,11 @@
|
|
1
|
+
- b.discussion id: "discussion_id", class: "discussion_class" do |o|
|
2
|
+
- o.name "3 comments"
|
3
|
+
- o.controls "<a href='#'>comment</a>"
|
4
|
+
- o.content do
|
5
|
+
- 3.times do |i|
|
6
|
+
- b.comment id: 'comment_id', class: 'comment_class' do |o|
|
7
|
+
- o.details samples.comment_details
|
8
|
+
- o.owner link_to("admin", '#')
|
9
|
+
- o.avatar image_tag(url_for("/static/demo/images/img1_icon.jpg")) unless i == 1
|
10
|
+
- o.text samples.comment_text
|
11
|
+
- o.controls samples.controls
|
@@ -0,0 +1,40 @@
|
|
1
|
+
- attachment = samples.attachments.first
|
2
|
+
- b.line do |o|
|
3
|
+
- o.name samples.name
|
4
|
+
- o.image attachment
|
5
|
+
- o.text samples.detail_text
|
6
|
+
- o.url attachment.url
|
7
|
+
- o.controls samples.controls
|
8
|
+
|
9
|
+
- b.line do |o|
|
10
|
+
- o.name samples.name
|
11
|
+
- o.image attachment
|
12
|
+
- o.text samples.detail_text
|
13
|
+
- o.url attachment.url
|
14
|
+
- o.controls samples.controls
|
15
|
+
- o.tags samples.tags + ["<div class='m_item_type'>Note</div>"]
|
16
|
+
- o.details samples.details
|
17
|
+
|
18
|
+
- b.line do |o|
|
19
|
+
- o.name samples.name
|
20
|
+
- o.text samples.detail_text
|
21
|
+
- o.url attachment.url
|
22
|
+
- o.controls samples.controls
|
23
|
+
- o.tags samples.tags + ["<div class='m_item_type'>Page</div>"]
|
24
|
+
- o.details samples.details
|
25
|
+
|
26
|
+
- b.line do |o|
|
27
|
+
- o.name samples.name
|
28
|
+
- o.url attachment.url
|
29
|
+
- o.controls samples.controls
|
30
|
+
- o.tags samples.tags + ["<div class='m_item_type'>Task</div>"]
|
31
|
+
- o.details samples.details
|
32
|
+
|
33
|
+
- b.line do |o|
|
34
|
+
- o.name samples.name
|
35
|
+
- o.image attachment
|
36
|
+
- o.text samples.detail_text
|
37
|
+
- o.url attachment.url
|
38
|
+
- o.controls samples.controls
|
39
|
+
- o.tags samples.tags + ["<div class='m_item_type'>Note</div>"]
|
40
|
+
- o.details samples.details
|
@@ -0,0 +1,25 @@
|
|
1
|
+
- content_for :tools do
|
2
|
+
- b.tool do
|
3
|
+
- b.more name: "...", id: 'add_button' do |o|
|
4
|
+
- o.core do
|
5
|
+
= link_to 'Add', '#'
|
6
|
+
- o.more do
|
7
|
+
= link_to('Note', '#') + tag(:span, ', ')
|
8
|
+
= link_to 'Selector', '#'
|
9
|
+
|
10
|
+
- b.tool name: "Search" do
|
11
|
+
- form_tag do
|
12
|
+
= text_field_tag ''
|
13
|
+
|
14
|
+
- b.tool name: "Tags" do
|
15
|
+
- b.tag_selector do |o|
|
16
|
+
- o.selected ['hot', 'low']
|
17
|
+
- o.selected_tag_to_link lambda{|tag| link_to tag.name, '#'}
|
18
|
+
- o.tags [{name: 'top', count: 10}, {name: 'low', count: 1}, {name: 'hot', count: 7}, {name: 'middle', count: 3}, {name: 'middle', count: 3}, {name: 'middle', count: 3}, {name: 'ajax', count: 1}, {name: 'important', count: 4}, {name: 'artifical_intelligence', count: 6}, {name: 'google', count: 1}, {name: 'body', count: 2}, {name: 'sport', count: 8}].collect{|hash| hash.to_openobject}
|
19
|
+
- o.tag_to_link lambda{|tag| link_to tag.name, '#'}
|
20
|
+
|
21
|
+
- b.tool name: "Parameters" do
|
22
|
+
- b.more name: "...", id: 'more' do
|
23
|
+
- b.basic_list do
|
24
|
+
= b.basic_list_item(tag(:a, "Update icon", href: '#'))
|
25
|
+
= b.basic_list_item(tag(:a, "Edit", href: '#') + " " + tag(:a, "Delete", href: '#'))
|
@@ -0,0 +1,34 @@
|
|
1
|
+
- content_for :top_panel do
|
2
|
+
- b.top_panel id: "top_panel_id", class: "top_panel_class" do |o|
|
3
|
+
- o.logo_image demo_metadata.logo_image
|
4
|
+
- o.logo_text demo_metadata.logo_text
|
5
|
+
- o.left do |a|
|
6
|
+
- a.add 'Documents'
|
7
|
+
- a.add 'Main'
|
8
|
+
|
9
|
+
- o.right do |a|
|
10
|
+
- a.add "Hello, Guest"
|
11
|
+
- a.add link_to("Log In", "#")
|
12
|
+
- a.add link_to("Register", "#")
|
13
|
+
|
14
|
+
|
15
|
+
- content_for :navigation do
|
16
|
+
- b.navigation do |o|
|
17
|
+
- o.left do |a|
|
18
|
+
- samples.top_menu_items.each do |menu|
|
19
|
+
- if samples.active_top_menu == menu
|
20
|
+
- a.add content: menu, active: true
|
21
|
+
- else
|
22
|
+
- a.add link_to(menu, Rad::Face::Demo::Commons, :select_menu, top_menu: menu)
|
23
|
+
|
24
|
+
- o.right do |a|
|
25
|
+
- a.add content: 'en', active: true
|
26
|
+
- a.add link_to('ru', '#')
|
27
|
+
|
28
|
+
|
29
|
+
- content_for :bottom_panel do
|
30
|
+
- b.bottom_panel do |o|
|
31
|
+
- o.left do
|
32
|
+
Some bottom links
|
33
|
+
- o.right do
|
34
|
+
Powered by <a href='http://4ire.net'>4ire.net</a>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
= render '/rad/face/demo/shared/top_navigation_bottom'
|
2
|
+
|
3
|
+
= render '/rad/face/demo/shared/tools'
|
4
|
+
|
5
|
+
- b.item do |o|
|
6
|
+
- o.name samples.name
|
7
|
+
- o.text samples.text
|
8
|
+
- o.controls samples.controls
|
9
|
+
|
10
|
+
= render '/rad/face/demo/shared/line_previews'
|
11
|
+
|
12
|
+
= render '/rad/face/demo/shared/paginator'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
= render '/rad/face/demo/shared/top_navigation_bottom'
|
2
|
+
|
3
|
+
= render '/rad/face/demo/shared/core_tools'
|
4
|
+
|
5
|
+
- b.item id: "note_id", class: "note_class" do |o|
|
6
|
+
- o.text demo_metadata.homepage_html
|
7
|
+
- o.controls [link_to('edit', '#'), link_to('delete', '#')]
|
8
|
+
- o.details samples.details
|
@@ -0,0 +1,10 @@
|
|
1
|
+
= render '/rad/face/demo/shared/top_navigation_bottom'
|
2
|
+
|
3
|
+
= render '/rad/face/demo/shared/tools'
|
4
|
+
|
5
|
+
- b.item id: "note_id", class: "note_class" do |o|
|
6
|
+
- o.text samples.text
|
7
|
+
- o.controls [link_to('edit', '#'), link_to('delete', '#')]
|
8
|
+
- o.details samples.details
|
9
|
+
|
10
|
+
= render '/rad/face/demo/shared/comments'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
= render '/rad/face/demo/shared/top_navigation_bottom'
|
2
|
+
|
3
|
+
= render '/rad/face/demo/shared/tools'
|
4
|
+
|
5
|
+
- b.item id: "note_id", class: "note_class" do |o|
|
6
|
+
- o.text demo_metadata.style_html
|
7
|
+
- o.controls [link_to('edit', '#'), link_to('delete', '#')]
|
8
|
+
- o.details samples.details
|
@@ -0,0 +1,25 @@
|
|
1
|
+
!!! 5
|
2
|
+
%html{lang: I18n.locale}
|
3
|
+
|
4
|
+
%head
|
5
|
+
%meta{content: "text/html; charset=utf-8", "http-equiv" => "Content-Type"}
|
6
|
+
- unless (title = @html_title || @title || respond_to(:title)).blank?
|
7
|
+
%title= h title
|
8
|
+
|
9
|
+
%link{rel: "icon", href: "/favicon.ico", type: "image/x-icon"}
|
10
|
+
|
11
|
+
= stylesheet_link_tag '/themes/default/reset.css'
|
12
|
+
= stylesheet_link_tag '/face.css'
|
13
|
+
= yield :head
|
14
|
+
|
15
|
+
%body
|
16
|
+
= yield :top_panel
|
17
|
+
= yield :navigation
|
18
|
+
|
19
|
+
= render themed_partial("/layout_templates/#{theme.layout_template}")
|
20
|
+
|
21
|
+
= yield :bottom_panel
|
22
|
+
|
23
|
+
= javascript_include_tag '/face.js'
|
24
|
+
= yield :bottom
|
25
|
+
= call_deferred_js
|
@@ -0,0 +1,16 @@
|
|
1
|
+
- if object.content? or object.left? or object.right?
|
2
|
+
- tag :div, object.merge_html_attributes(class: " the_bottom_panel") do
|
3
|
+
.css_box
|
4
|
+
- if object.content? or object.left?
|
5
|
+
.l_left
|
6
|
+
.l_item
|
7
|
+
= object.content
|
8
|
+
= object.left.content
|
9
|
+
.css_clear
|
10
|
+
|
11
|
+
- if object.right?
|
12
|
+
.l_right
|
13
|
+
.l_item= object.right.content
|
14
|
+
.css_clear
|
15
|
+
|
16
|
+
.css_clear
|
@@ -0,0 +1,20 @@
|
|
1
|
+
- tag :div, object.merge_html_attributes(class: " the_comment m_selectable") do
|
2
|
+
- body = capture do
|
3
|
+
.l_text.m_markup
|
4
|
+
= object.text
|
5
|
+
.css_clear
|
6
|
+
- if object.controls?
|
7
|
+
.m_hover_controls= object.controls.join(' ')
|
8
|
+
- if object.avatar?
|
9
|
+
%table.css_table
|
10
|
+
%tbody
|
11
|
+
%tr
|
12
|
+
%td.css_td1
|
13
|
+
.l_image= object.avatar
|
14
|
+
%td.css_td2
|
15
|
+
= body
|
16
|
+
- else
|
17
|
+
= body
|
18
|
+
.m_details= (object.details.to_a + object.owner.to_a).join(', ')
|
19
|
+
.css_clear
|
20
|
+
|
@@ -0,0 +1,118 @@
|
|
1
|
+
base = "/face"
|
2
|
+
|
3
|
+
m = {
|
4
|
+
logo_text: "BOS Tec",
|
5
|
+
logo_image: nil
|
6
|
+
}
|
7
|
+
|
8
|
+
m[:homepage_html] = <<HTML
|
9
|
+
<p>The Terminator (1984) <a href='#'>More at IMDbPro</a></p>
|
10
|
+
<p>In the Year of Darkness, 2029, the rulers of this planet devised the ultimate plan. They would reshape the Future by changing the Past. The plan required something that felt no pity. No pain. No fear. Something unstoppable. They created 'THE TERMINATOR'</p>
|
11
|
+
<p>The thing that won't die, in the nightmare that won't end. A human-looking, apparently unstoppable cyborg is sent from the future to kill Sarah Connor; Kyle Reese is sent to stop it.</p>
|
12
|
+
<p>Your future is in his hands.</p>
|
13
|
+
HTML
|
14
|
+
|
15
|
+
m[:style_html] = <<HTML
|
16
|
+
<h1>Heading 1</h1>
|
17
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
18
|
+
|
19
|
+
<h2>Heading 2</h2>
|
20
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
21
|
+
|
22
|
+
<h3>Heading 3</h3>
|
23
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
24
|
+
|
25
|
+
<h4>Heading 4</h4>
|
26
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
27
|
+
|
28
|
+
<div class="content-separator"></div>
|
29
|
+
|
30
|
+
<h2>Images in text</h2>
|
31
|
+
|
32
|
+
<img src="#{base}/images/demo/img1_thumb.jpg">
|
33
|
+
|
34
|
+
<p>Curabitur faucibus risus quis lectus. <a href="#">Donec vehicula</a>. Pellentesque nec, lectus. Nullam dictum sem. Phasellus varius. Vestibulum in felis in mauris consequat molestie</p>
|
35
|
+
|
36
|
+
<div class="content-separator"></div>
|
37
|
+
|
38
|
+
<h2>Blockquote</h2>
|
39
|
+
|
40
|
+
<blockquote>
|
41
|
+
<p>Praesent orci nisi, interdum quis, tristique vitae, consectetur sed, arcu. Ut at sapien non dolor semper sollicitudin. Etiam semper erat quis odio. Quisque commodo suscipit velit. Nulla facilisi.</p>
|
42
|
+
<p><cite>- Duis justo quam</cite></p>
|
43
|
+
</blockquote>
|
44
|
+
|
45
|
+
<div class="content-separator"></div>
|
46
|
+
|
47
|
+
<h2>Lists</h2>
|
48
|
+
|
49
|
+
<h3>Unsorted list</h3>
|
50
|
+
<ul>
|
51
|
+
<li>Blandit in, interdum a</li>
|
52
|
+
<li>Ultrices non lectus</li>
|
53
|
+
<li>Nunc id odio</li>
|
54
|
+
<li>Fusce ultricies</li>
|
55
|
+
</ul>
|
56
|
+
|
57
|
+
<h3>Ordered list</h3>
|
58
|
+
<ol>
|
59
|
+
<li>Blandit in, interdum a</li>
|
60
|
+
<li>Ultrices non lectus</li>
|
61
|
+
<li>Nunc id odio</li>
|
62
|
+
<li>Fusce ultricies</li>
|
63
|
+
</ol>
|
64
|
+
|
65
|
+
<h3>Definition list</h3>
|
66
|
+
|
67
|
+
<dl>
|
68
|
+
<dt>title</dt>
|
69
|
+
<dd>definition</dd>
|
70
|
+
<dd>definition</dd>
|
71
|
+
<dt>title</dt>
|
72
|
+
<dt>title</dt>
|
73
|
+
<dd>definition</dd>
|
74
|
+
<dt>title</dt>
|
75
|
+
<dd>definition</dd>
|
76
|
+
</dl>
|
77
|
+
|
78
|
+
<div class="content-separator"></div>
|
79
|
+
|
80
|
+
<h2>Tables</h2>
|
81
|
+
|
82
|
+
<h3>Data table</h3>
|
83
|
+
|
84
|
+
<table class="data-table">
|
85
|
+
<tbody><tr>
|
86
|
+
<th>Property 1</th>
|
87
|
+
<th>Property 2</th>
|
88
|
+
<th>Property 3</th>
|
89
|
+
<th>Property 4</th>
|
90
|
+
</tr>
|
91
|
+
<tr class="even">
|
92
|
+
<td>Value 1.1</td>
|
93
|
+
<td>Value 1.2</td>
|
94
|
+
<td>Value 1.3</td>
|
95
|
+
<td>Value 1.4</td>
|
96
|
+
</tr>
|
97
|
+
<tr>
|
98
|
+
<td>Value 2.1</td>
|
99
|
+
<td>Value 2.2</td>
|
100
|
+
<td>Value 2.3</td>
|
101
|
+
<td>Value 2.4</td>
|
102
|
+
</tr>
|
103
|
+
<tr class="even">
|
104
|
+
<td>Value 3.1</td>
|
105
|
+
<td>Value 3.2</td>
|
106
|
+
<td>Value 3.3</td>
|
107
|
+
<td>Value 3.4</td>
|
108
|
+
</tr>
|
109
|
+
<tr>
|
110
|
+
<td>Value 4.1</td>
|
111
|
+
<td>Value 4.2</td>
|
112
|
+
<td>Value 4.3</td>
|
113
|
+
<td>Value 4.4</td>
|
114
|
+
</tr>
|
115
|
+
</tbody></table>
|
116
|
+
HTML
|
117
|
+
|
118
|
+
m
|
@@ -0,0 +1,18 @@
|
|
1
|
+
- errors = object.errors.collect{|msg| tag(:div, msg, class: "l_error")}.join("\n")
|
2
|
+
- body = capture do
|
3
|
+
.l_input= object.content
|
4
|
+
- unless errors.blank?
|
5
|
+
.l_errors= errors
|
6
|
+
- if object.description?
|
7
|
+
.l_description= object.description
|
8
|
+
.l_field
|
9
|
+
- if object.label?
|
10
|
+
%table.css_table
|
11
|
+
%tbody
|
12
|
+
%tr
|
13
|
+
%td.css_td1
|
14
|
+
%div{class: "l_label#{' l_required' if object.required?}"}= object.label
|
15
|
+
%td.css_td2
|
16
|
+
= body
|
17
|
+
- else
|
18
|
+
= body
|
@@ -0,0 +1 @@
|
|
1
|
+
Some custom HTML
|
@@ -0,0 +1,12 @@
|
|
1
|
+
- tag :div, object.merge_html_attributes(class: " the_item m_selectable") do
|
2
|
+
- if object.controls?
|
3
|
+
.m_hover_controls= object.controls.join(' ')
|
4
|
+
|
5
|
+
- if object.name?
|
6
|
+
%h1.m_title= object.name
|
7
|
+
|
8
|
+
.l_text.m_markup
|
9
|
+
= object.text
|
10
|
+
.css_clear
|
11
|
+
|
12
|
+
= render themed_partial('/shared/details'), object: object
|
@@ -0,0 +1 @@
|
|
1
|
+
- raise 'not impl'
|
@@ -0,0 +1,22 @@
|
|
1
|
+
.css_box
|
2
|
+
- content = capture do
|
3
|
+
- if (top_aspects = yield :top_aspects).present?
|
4
|
+
.the_aspects= top_aspects
|
5
|
+
- if (content = yield :content).present?
|
6
|
+
.the_content= content
|
7
|
+
- if (aspects = yield :aspects).present? or (bottom_aspects = yield :bottom_aspects).present?
|
8
|
+
.the_aspects
|
9
|
+
= aspects
|
10
|
+
= bottom_aspects
|
11
|
+
- if (tools = yield :tools).present?
|
12
|
+
%table.css_table
|
13
|
+
%tbody
|
14
|
+
%tr
|
15
|
+
%td.css_td1
|
16
|
+
= content
|
17
|
+
%td.css_td2
|
18
|
+
.the_tools
|
19
|
+
= tools
|
20
|
+
- else
|
21
|
+
.css_box
|
22
|
+
= content
|
@@ -0,0 +1,21 @@
|
|
1
|
+
- tag :div, object.merge_html_attributes(class: " the_line m_selectable") do
|
2
|
+
- if object.controls?
|
3
|
+
.m_hover_controls= object.controls.join(' ')
|
4
|
+
- body = capture do
|
5
|
+
%a{href: object.url, class: 'l_title'}= object.name? ? object.name : "(#{t(:empty)})"
|
6
|
+
- if object.text?
|
7
|
+
.l_text= object.text
|
8
|
+
- if object.image?
|
9
|
+
%table.css_table
|
10
|
+
%tbody
|
11
|
+
%tr
|
12
|
+
%td.css_td1
|
13
|
+
.l_image
|
14
|
+
%a{href: object.url}
|
15
|
+
%img{src: object.image.icon_url}
|
16
|
+
%td.css_td2
|
17
|
+
= body
|
18
|
+
- else
|
19
|
+
= body
|
20
|
+
.css_clear
|
21
|
+
= render themed_partial('/shared/details'), object: object
|
@@ -0,0 +1,8 @@
|
|
1
|
+
- more = object.more || object.content
|
2
|
+
- if object.core? or present?(more)
|
3
|
+
- raise "you should provide unique id for b.more element (to allow it remember it's state in ajax requests')!" unless object.id?
|
4
|
+
- core_id, more_id = "#{object.id}_core", "#{object.id}_more"
|
5
|
+
= tag :span, object.core, id: core_id if object.core?
|
6
|
+
- if more.present?
|
7
|
+
= tag :a, object.name, class: "the_more", href: '#', 'data-id' => object.id
|
8
|
+
.hidden{id: more_id}= more
|