common_interface 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +8 -63
- data/lib/views/CommonInterface/Demo/Basic/_dialog.html.haml +7 -0
- data/lib/views/CommonInterface/Demo/Basic/_popup.html.haml +4 -0
- data/lib/views/CommonInterface/Demo/Basic/aspects.html.haml +32 -0
- data/lib/views/CommonInterface/Demo/Basic/basic.html.haml +122 -0
- data/lib/views/CommonInterface/Demo/Basic/dialog.js.erb +1 -0
- data/lib/views/CommonInterface/Demo/Basic/folder.html.haml +45 -0
- data/lib/views/CommonInterface/Demo/Basic/help.html.haml +7 -0
- data/lib/views/CommonInterface/Demo/Basic/index.html.haml +24 -0
- data/lib/views/CommonInterface/Demo/Basic/items.html.haml +91 -0
- data/lib/views/CommonInterface/Demo/Basic/list.html.haml +23 -0
- data/lib/views/CommonInterface/Demo/Basic/page.html.haml +19 -0
- data/lib/views/CommonInterface/Demo/Basic/page/_folder.html.haml +10 -0
- data/lib/views/CommonInterface/Demo/Basic/page/_note.html.haml +4 -0
- data/lib/views/CommonInterface/Demo/Basic/page/_toolbar.html.haml +5 -0
- data/lib/views/CommonInterface/Demo/Basic/popup.js.erb +1 -0
- data/lib/views/CommonInterface/Demo/Basic/selector.html.haml +38 -0
- data/lib/views/CommonInterface/Demo/Basic/style.html.erb +113 -0
- data/lib/views/CommonInterface/Demo/Basic/tmp.haml +2 -0
- data/lib/views/CommonInterface/Demo/Basic/user.html.haml +16 -0
- data/lib/views/CommonInterface/Demo/Site/blog.html.haml +13 -0
- data/lib/views/CommonInterface/Demo/Site/home.html.haml +9 -0
- data/lib/views/CommonInterface/Demo/Site/post.html.haml +11 -0
- data/lib/views/CommonInterface/Demo/Site/style.html.haml +9 -0
- data/lib/views/CommonInterface/Demo/layouts/theme.html.erb +1 -0
- data/lib/views/CommonInterface/Demo/layouts/theme.js.erb +14 -0
- data/lib/views/CommonInterface/Demo/shared/_comments.html.haml +11 -0
- data/lib/views/CommonInterface/Demo/shared/_core_tools.html.haml +6 -0
- data/lib/views/CommonInterface/Demo/shared/_line_previews.html.haml +39 -0
- data/lib/views/CommonInterface/Demo/shared/_paginator.html.haml +7 -0
- data/lib/views/CommonInterface/Demo/shared/_tools.html.haml +26 -0
- data/lib/views/CommonInterface/Demo/shared/_top_navigation_bottom.html.haml +32 -0
- data/lib/views/layouts/config/default.yml +14 -0
- data/lib/views/layouts/config/simple_organization.yml +24 -0
- data/lib/views/themes/default/application.html.haml +29 -0
- data/lib/views/themes/default/aspects/comment.html.haml +14 -0
- data/lib/views/themes/default/aspects/controls.html.haml +3 -0
- data/lib/views/themes/default/aspects/details.html.haml +6 -0
- data/lib/views/themes/default/aspects/discussion.html.haml +9 -0
- data/lib/views/themes/default/aspects/paginator.html.haml +8 -0
- data/lib/views/themes/default/aspects/tag_selector.html.haml +11 -0
- data/lib/views/themes/default/basic/bottom_panel.html.haml +9 -0
- data/lib/views/themes/default/basic/dialog.html.haml +1 -0
- data/lib/views/themes/default/basic/divider.html.haml +2 -0
- data/lib/views/themes/default/basic/html.html.haml +1 -0
- data/lib/views/themes/default/basic/inplace.html.haml +1 -0
- data/lib/views/themes/default/basic/message.html.haml +3 -0
- data/lib/views/themes/default/basic/more.html.haml +5 -0
- data/lib/views/themes/default/basic/narrow.html.haml +1 -0
- data/lib/views/themes/default/basic/navigation.html.haml +9 -0
- data/lib/views/themes/default/basic/popup.html.haml +1 -0
- data/lib/views/themes/default/basic/text.html.haml +1 -0
- data/lib/views/themes/default/basic/title.html.haml +3 -0
- data/lib/views/themes/default/basic/tool.html.haml +4 -0
- data/lib/views/themes/default/basic/top_panel.html.haml +18 -0
- data/lib/views/themes/default/components/basic_list.html.haml +1 -0
- data/lib/views/themes/default/components/basic_list_item.html.haml +4 -0
- data/lib/views/themes/default/components/table.html.haml +12 -0
- data/lib/views/themes/default/components/table_row.html.haml +5 -0
- data/lib/views/themes/default/components/tabs.html.haml +4 -0
- data/lib/views/themes/default/components/tabs_item.html.haml +4 -0
- data/lib/views/themes/default/components/toolbar.html.haml +14 -0
- data/lib/views/themes/default/forms/errors.html.haml +5 -0
- data/lib/views/themes/default/forms/field.html.haml +19 -0
- data/lib/views/themes/default/forms/form.html.haml +5 -0
- data/lib/views/themes/default/forms/line.html.haml +6 -0
- data/lib/views/themes/default/help.html.haml +1 -0
- data/lib/views/themes/default/items/file.html.haml +19 -0
- data/lib/views/themes/default/items/folder.html.haml +23 -0
- data/lib/views/themes/default/items/line.html.haml +34 -0
- data/lib/views/themes/default/items/list.html.haml +35 -0
- data/lib/views/themes/default/items/list_item.html.haml +16 -0
- data/lib/views/themes/default/items/note.html.haml +16 -0
- data/lib/views/themes/default/items/page.html.haml +29 -0
- data/lib/views/themes/default/items/selector.html.haml +18 -0
- data/lib/views/themes/default/items/thumb.html.haml +12 -0
- data/lib/views/themes/default/items/user.html.haml +12 -0
- data/lib/views/themes/default/layout_templates/dashboard.html.haml +1 -0
- data/lib/views/themes/default/layout_templates/default.html.haml +11 -0
- data/lib/views/themes/default/metadata.rb +117 -0
- data/lib/views/themes/simple_organization/application.html.erb +45 -0
- data/lib/views/themes/simple_organization/application_js.html.erb +12 -0
- data/lib/views/themes/simple_organization/aspects/comment.html.haml +21 -0
- data/lib/views/themes/simple_organization/aspects/discussion.html.haml +14 -0
- data/lib/views/themes/simple_organization/aspects/paginator.html.haml +5 -0
- data/lib/views/themes/simple_organization/aspects/tag_selector.html.haml +10 -0
- data/lib/views/themes/simple_organization/basic/bottom_panel.html.erb +12 -0
- data/lib/views/themes/simple_organization/basic/divider.html.erb +3 -0
- data/lib/views/themes/simple_organization/basic/message.html.erb +7 -0
- data/lib/views/themes/simple_organization/basic/more.html.haml +5 -0
- data/lib/views/themes/simple_organization/basic/navigation.html.erb +15 -0
- data/lib/views/themes/simple_organization/basic/text.html.haml +1 -0
- data/lib/views/themes/simple_organization/basic/tool.html.erb +9 -0
- data/lib/views/themes/simple_organization/basic/top_panel.html.erb +14 -0
- data/lib/views/themes/simple_organization/help.html.erb +1 -0
- data/lib/views/themes/simple_organization/items/line.html.haml +17 -0
- data/lib/views/themes/simple_organization/items/note.html.haml +16 -0
- data/lib/views/themes/simple_organization/items/selector.html.haml +11 -0
- data/lib/views/themes/simple_organization/layout_templates/default.html.erb +20 -0
- data/lib/views/themes/simple_organization/layout_templates/home.html.erb +14 -0
- data/lib/views/themes/simple_organization/metadata.rb +193 -0
- data/spec/basic_spec.rb +2 -2
- data/spec/helper.rb +1 -2
- metadata +104 -5
- data/spec/spec.opts +0 -4
@@ -0,0 +1,29 @@
|
|
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 *merged_stylesheets(:common_interface_base)
|
12
|
+
|
13
|
+
= yield :head
|
14
|
+
|
15
|
+
%body
|
16
|
+
.dlayout
|
17
|
+
= yield :top_panel
|
18
|
+
|
19
|
+
.dmax_width
|
20
|
+
= yield :navigation
|
21
|
+
|
22
|
+
= render themed_partial("layout_templates/#{current_theme.layout_template}")
|
23
|
+
|
24
|
+
= yield :bottom_panel
|
25
|
+
|
26
|
+
= javascript_include_tag *merged_javascripts(:common_interface_base)
|
27
|
+
= javascript_tag "$.refresh_js_css();"
|
28
|
+
|
29
|
+
= yield :bottom
|
@@ -0,0 +1,14 @@
|
|
1
|
+
- tag :div, object.merge_html_attributes(:class => " dcomment _comment dselectable_item") do
|
2
|
+
.dhover_controls_container
|
3
|
+
- if object.controls?
|
4
|
+
.dhover_controls= object.controls.join(' ')
|
5
|
+
|
6
|
+
.dcolumns
|
7
|
+
.dfixed.dcolumn{:width => 50}
|
8
|
+
.dicon= object.avatar
|
9
|
+
.delastic.dcolumn
|
10
|
+
.dtext._markup.dmarkup= object.text
|
11
|
+
|
12
|
+
- if object.details?
|
13
|
+
.ditem_details= object.details.to_a.join(', ')
|
14
|
+
._clear
|
@@ -0,0 +1,9 @@
|
|
1
|
+
- tag :div, object.merge_html_attributes(:class => " ddiscussion _discussion aspect _aspect") do
|
2
|
+
/ .ddivider._hidden
|
3
|
+
/ .ddivider_title= object.name
|
4
|
+
|
5
|
+
._comments= object.content.to_a.join("\n")
|
6
|
+
|
7
|
+
- if object.controls?
|
8
|
+
.dcontrols= object.controls.to_a.join("\n")
|
9
|
+
._clear
|
@@ -0,0 +1,11 @@
|
|
1
|
+
- if object.tags?
|
2
|
+
- tag :div, object.merge_html_attributes(:class => " dtag_selector") do
|
3
|
+
.dtags
|
4
|
+
- classes = ['dsize_1', 'dsize_2', 'dsize_3', 'dsize_4']
|
5
|
+
- tag_cloud object.tags, classes do |tag, aclass|
|
6
|
+
- if object.selected.include? tag.name
|
7
|
+
.dtag.dselected{:class => aclass}
|
8
|
+
= object.selected_tag_to_link.call tag
|
9
|
+
- else
|
10
|
+
.dtag{:class => aclass}
|
11
|
+
= object.tag_to_link.call tag
|
@@ -0,0 +1 @@
|
|
1
|
+
= tag :div, object.content, object.merge_html_attributes(:class => " ddialog _dialog")
|
@@ -0,0 +1 @@
|
|
1
|
+
Some custom HTML
|
@@ -0,0 +1 @@
|
|
1
|
+
= tag :div, object.content, object.merge_html_attributes(:class => " _inplace dinplace")
|
@@ -0,0 +1,5 @@
|
|
1
|
+
- raise "you should provide unique id for b.more element (to allow it remember it's state in ajax requests')!" unless object.id?
|
2
|
+
- if object.content?
|
3
|
+
- tag :div, object.merge_html_attributes(:class => " dmore _more") do
|
4
|
+
%a{:href => '#', :class => '_button'}= object.name
|
5
|
+
._content._hidden= object.content
|
@@ -0,0 +1 @@
|
|
1
|
+
= tag :div, object.content, object.merge_html_attributes(:class => " dnarrow") if object.content?
|
@@ -0,0 +1 @@
|
|
1
|
+
= tag :div, object.content, object.merge_html_attributes(:class => " dpopup _popup")
|
@@ -0,0 +1 @@
|
|
1
|
+
= tag :div, object.content, object.merge_html_attributes(:class => " dmarkup _markup") if object.content?
|
@@ -0,0 +1,18 @@
|
|
1
|
+
- if object.logo? or object.left? or object.right?
|
2
|
+
.dtop_panel
|
3
|
+
.dmax_width
|
4
|
+
.dcontent.dleft_right
|
5
|
+
|
6
|
+
- if object.left? or object.logo?
|
7
|
+
.dleft
|
8
|
+
%b.dlogo= object.logo + (object.left? ? " | " : '') if object.logo?
|
9
|
+
|
10
|
+
- object.left.each do |item|
|
11
|
+
.dlr_item= item.blank? ? ' | ' : item
|
12
|
+
|
13
|
+
- if object.right?
|
14
|
+
.dright
|
15
|
+
- object.right.each do |item|
|
16
|
+
.dlr_item= item.blank? ? ' | ' : item
|
17
|
+
|
18
|
+
._clear
|
@@ -0,0 +1 @@
|
|
1
|
+
= tag :div, object.content, object.merge_html_attributes(:class => " basic_list") if object.content?
|
@@ -0,0 +1,12 @@
|
|
1
|
+
- if object.head? or object.rows?
|
2
|
+
- tag :div, object.merge_html_attributes(:class => " dtable _table") do
|
3
|
+
%table
|
4
|
+
|
5
|
+
- if object.head?
|
6
|
+
%thead
|
7
|
+
%tr
|
8
|
+
- object.head.each do |item|
|
9
|
+
%th
|
10
|
+
.dheadcell= item
|
11
|
+
|
12
|
+
%tbody._content= object.rows.to_a.join("\n")
|
@@ -0,0 +1,14 @@
|
|
1
|
+
- if object.left? or object.right?
|
2
|
+
- tag :div, object.merge_html_attributes(:class => " dpage_toolbar dleft_right") do
|
3
|
+
|
4
|
+
- if object.left?
|
5
|
+
.dleft
|
6
|
+
- object.left.each do |item|
|
7
|
+
.dlr_item= item.content
|
8
|
+
|
9
|
+
- if object.right?
|
10
|
+
.dright
|
11
|
+
- object.right.each do |item|
|
12
|
+
.dlr_item= item.content
|
13
|
+
|
14
|
+
._clear
|
@@ -0,0 +1,19 @@
|
|
1
|
+
- errors = object.errors.collect{|msg| tag(:div, msg, :class => "derror")}.join("\n")
|
2
|
+
- if object.label?
|
3
|
+
.dcolumn
|
4
|
+
%div{:class => "dcontainer dform_item #{'requiredfield' if object.required?}"}= object.label
|
5
|
+
.delastic.dcolumn.dspan-3
|
6
|
+
.dform_item.dfield
|
7
|
+
.dinput= object.content
|
8
|
+
- unless errors.blank?
|
9
|
+
.derrors= errors
|
10
|
+
- if object.description?
|
11
|
+
.ddescription= object.description
|
12
|
+
- else
|
13
|
+
.dcolumn.dspan-4
|
14
|
+
.dform_item.dfield
|
15
|
+
.dinput= object.content
|
16
|
+
- unless errors.blank?
|
17
|
+
.derrors= errors
|
18
|
+
- if object.description?
|
19
|
+
.ddescription= object.description
|
@@ -0,0 +1 @@
|
|
1
|
+
TODO Help page for Default Template
|
@@ -0,0 +1,19 @@
|
|
1
|
+
- tag :div, object.merge_html_attributes(:class => " dselectable_item dfile_item") do
|
2
|
+
.dhover_controls_container
|
3
|
+
.dhover_controls= object.controls.join(' ') if object.controls?
|
4
|
+
|
5
|
+
.dcolumns
|
6
|
+
.dfixed.dcolumn{:width => 50}
|
7
|
+
.dicon
|
8
|
+
%a{:href => object.url}
|
9
|
+
%img{:src => object.icon}
|
10
|
+
.delastic.dcolumn
|
11
|
+
.ddetails
|
12
|
+
%a{:href => object.url}
|
13
|
+
.dtitle= object.name? ? object.name : ' '
|
14
|
+
|
15
|
+
- if object.tags?
|
16
|
+
.ditem_tags= object.tags.join("\n")
|
17
|
+
- if object.details?
|
18
|
+
.ditem_details= object.details.to_a.join(', ')
|
19
|
+
._clear
|
@@ -0,0 +1,23 @@
|
|
1
|
+
- tag :div, object.merge_html_attributes(:class => " _folder dfolder dselectable_item") do
|
2
|
+
.dhover_controls_container
|
3
|
+
.dhover_controls= object.controls.join(' ') if object.controls?
|
4
|
+
|
5
|
+
- if object.name?
|
6
|
+
%h1.item_title= object.name? ? object.name : ' '
|
7
|
+
- else
|
8
|
+
%h1.item_title.empty_title
|
9
|
+
|
10
|
+
|
11
|
+
._container
|
12
|
+
= object.content.to_a.join("\n")
|
13
|
+
._clear
|
14
|
+
|
15
|
+
- unless object.name? or object.content?
|
16
|
+
.dtitle= "(#{t(:empty)})"
|
17
|
+
|
18
|
+
- if object.tags?
|
19
|
+
.ditem_tags= object.tags.join("\n")
|
20
|
+
|
21
|
+
- if object.details?
|
22
|
+
.ditem_details= object.details.to_a.join(', ')
|
23
|
+
._clear
|
@@ -0,0 +1,34 @@
|
|
1
|
+
- tag :div, object.merge_html_attributes(:class => " dselectable_item dline_item") do
|
2
|
+
.dhover_controls_container
|
3
|
+
.dhover_controls= object.controls.join(' ') if object.controls?
|
4
|
+
- object_name = object.name? ? object.name : ' '
|
5
|
+
- if object.icon? or object.text?
|
6
|
+
- if object.icon?
|
7
|
+
.dcolumns
|
8
|
+
.dfixed.dcolumn{:width => 50}
|
9
|
+
.dicon
|
10
|
+
%a{:href => object.url}
|
11
|
+
%img{:src => object.icon}
|
12
|
+
.delastic.dcolumn
|
13
|
+
.ddetails
|
14
|
+
- if object.name?
|
15
|
+
%a{:href => object.url}
|
16
|
+
.dpreview_title= object_name
|
17
|
+
.dtext= object.text if object.text?
|
18
|
+
- else
|
19
|
+
.ddetails
|
20
|
+
- if object.name?
|
21
|
+
%a{:href => object.url}
|
22
|
+
.dpreview_title= object_name
|
23
|
+
.dtext= object.text if object.text?
|
24
|
+
|
25
|
+
- else
|
26
|
+
.dsingle_line
|
27
|
+
%a{:href => object.url}
|
28
|
+
.dpreview_title= object_name
|
29
|
+
|
30
|
+
- if object.tags?
|
31
|
+
.ditem_tags= object.tags.join("\n")
|
32
|
+
- if object.details?
|
33
|
+
.ditem_details= object.details.to_a.join(', ')
|
34
|
+
._clear
|
@@ -0,0 +1,35 @@
|
|
1
|
+
- tag :div, object.merge_html_attributes(:class => " _list dlist dselectable_item dbasic_list dlist_sortable_items") do
|
2
|
+
.dhover_controls_container
|
3
|
+
- unless object.controls.blank?
|
4
|
+
.dhover_controls
|
5
|
+
= object.controls.join(' ')
|
6
|
+
|
7
|
+
- if object.name?
|
8
|
+
%h1.item_title= object.name? ? object.name : ' '
|
9
|
+
- else
|
10
|
+
%h1.item_title.empty_title
|
11
|
+
|
12
|
+
|
13
|
+
._container
|
14
|
+
= object.content.to_a.join("\n")
|
15
|
+
._clear
|
16
|
+
|
17
|
+
- unless object.name? or object.content?
|
18
|
+
.dtitle= t(:empty_list)
|
19
|
+
|
20
|
+
/ Show or Hide Finished tasks
|
21
|
+
.dcontrols
|
22
|
+
._show_more._hidden
|
23
|
+
= tag :a, t(:show_more), :href => '#', :class => :_show_more
|
24
|
+
._show_less._hidden
|
25
|
+
= tag :a, t(:show_less), :href => '#', :class => :_show_less
|
26
|
+
._clear
|
27
|
+
|
28
|
+
._hidden_tasks._hidden
|
29
|
+
|
30
|
+
- if object.tags?
|
31
|
+
.ditem_tags= object.tags.join("\n")
|
32
|
+
- if object.details?
|
33
|
+
.ditem_details= object.details.to_a.join(', ')
|
34
|
+
._clear
|
35
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
- classes = " dlist_item dtask_list_item _list_item dselectable_item "
|
2
|
+
- classes << "dfinishedlist_item _finished" if object.finished
|
3
|
+
- tag :div, object.merge_html_attributes(:class => classes) do
|
4
|
+
.dhover_controls_container
|
5
|
+
- unless object.controls.blank?
|
6
|
+
.dhover_controls= object.controls.join(' ')
|
7
|
+
|
8
|
+
- unless object.check_box.blank?
|
9
|
+
.dcheck_box= object.check_box
|
10
|
+
.dcontent= object.content
|
11
|
+
|
12
|
+
/ - if object.tags?
|
13
|
+
/ .ditem_tags= object.tags.join(' ')
|
14
|
+
- if object.details?
|
15
|
+
.ditem_details= object.details.to_a.join(', ')
|
16
|
+
._clear
|
@@ -0,0 +1,16 @@
|
|
1
|
+
- tag :div, object.merge_html_attributes(:class => " dnote _note dselectable_item") do
|
2
|
+
.dhover_controls_container
|
3
|
+
.dhover_controls= object.controls.join(' ') if object.controls?
|
4
|
+
|
5
|
+
- if object.name?
|
6
|
+
%h1.item_title= object.name
|
7
|
+
|
8
|
+
.dtext._markup.dmarkup= object.text
|
9
|
+
._clear
|
10
|
+
|
11
|
+
- if object.tags?
|
12
|
+
.ditem_tags= object.tags.join(' ')
|
13
|
+
- if object.details?
|
14
|
+
.ditem_details= object.details.to_a.join(', ')
|
15
|
+
|
16
|
+
._clear
|