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.
Files changed (105) hide show
  1. data/Rakefile +8 -63
  2. data/lib/views/CommonInterface/Demo/Basic/_dialog.html.haml +7 -0
  3. data/lib/views/CommonInterface/Demo/Basic/_popup.html.haml +4 -0
  4. data/lib/views/CommonInterface/Demo/Basic/aspects.html.haml +32 -0
  5. data/lib/views/CommonInterface/Demo/Basic/basic.html.haml +122 -0
  6. data/lib/views/CommonInterface/Demo/Basic/dialog.js.erb +1 -0
  7. data/lib/views/CommonInterface/Demo/Basic/folder.html.haml +45 -0
  8. data/lib/views/CommonInterface/Demo/Basic/help.html.haml +7 -0
  9. data/lib/views/CommonInterface/Demo/Basic/index.html.haml +24 -0
  10. data/lib/views/CommonInterface/Demo/Basic/items.html.haml +91 -0
  11. data/lib/views/CommonInterface/Demo/Basic/list.html.haml +23 -0
  12. data/lib/views/CommonInterface/Demo/Basic/page.html.haml +19 -0
  13. data/lib/views/CommonInterface/Demo/Basic/page/_folder.html.haml +10 -0
  14. data/lib/views/CommonInterface/Demo/Basic/page/_note.html.haml +4 -0
  15. data/lib/views/CommonInterface/Demo/Basic/page/_toolbar.html.haml +5 -0
  16. data/lib/views/CommonInterface/Demo/Basic/popup.js.erb +1 -0
  17. data/lib/views/CommonInterface/Demo/Basic/selector.html.haml +38 -0
  18. data/lib/views/CommonInterface/Demo/Basic/style.html.erb +113 -0
  19. data/lib/views/CommonInterface/Demo/Basic/tmp.haml +2 -0
  20. data/lib/views/CommonInterface/Demo/Basic/user.html.haml +16 -0
  21. data/lib/views/CommonInterface/Demo/Site/blog.html.haml +13 -0
  22. data/lib/views/CommonInterface/Demo/Site/home.html.haml +9 -0
  23. data/lib/views/CommonInterface/Demo/Site/post.html.haml +11 -0
  24. data/lib/views/CommonInterface/Demo/Site/style.html.haml +9 -0
  25. data/lib/views/CommonInterface/Demo/layouts/theme.html.erb +1 -0
  26. data/lib/views/CommonInterface/Demo/layouts/theme.js.erb +14 -0
  27. data/lib/views/CommonInterface/Demo/shared/_comments.html.haml +11 -0
  28. data/lib/views/CommonInterface/Demo/shared/_core_tools.html.haml +6 -0
  29. data/lib/views/CommonInterface/Demo/shared/_line_previews.html.haml +39 -0
  30. data/lib/views/CommonInterface/Demo/shared/_paginator.html.haml +7 -0
  31. data/lib/views/CommonInterface/Demo/shared/_tools.html.haml +26 -0
  32. data/lib/views/CommonInterface/Demo/shared/_top_navigation_bottom.html.haml +32 -0
  33. data/lib/views/layouts/config/default.yml +14 -0
  34. data/lib/views/layouts/config/simple_organization.yml +24 -0
  35. data/lib/views/themes/default/application.html.haml +29 -0
  36. data/lib/views/themes/default/aspects/comment.html.haml +14 -0
  37. data/lib/views/themes/default/aspects/controls.html.haml +3 -0
  38. data/lib/views/themes/default/aspects/details.html.haml +6 -0
  39. data/lib/views/themes/default/aspects/discussion.html.haml +9 -0
  40. data/lib/views/themes/default/aspects/paginator.html.haml +8 -0
  41. data/lib/views/themes/default/aspects/tag_selector.html.haml +11 -0
  42. data/lib/views/themes/default/basic/bottom_panel.html.haml +9 -0
  43. data/lib/views/themes/default/basic/dialog.html.haml +1 -0
  44. data/lib/views/themes/default/basic/divider.html.haml +2 -0
  45. data/lib/views/themes/default/basic/html.html.haml +1 -0
  46. data/lib/views/themes/default/basic/inplace.html.haml +1 -0
  47. data/lib/views/themes/default/basic/message.html.haml +3 -0
  48. data/lib/views/themes/default/basic/more.html.haml +5 -0
  49. data/lib/views/themes/default/basic/narrow.html.haml +1 -0
  50. data/lib/views/themes/default/basic/navigation.html.haml +9 -0
  51. data/lib/views/themes/default/basic/popup.html.haml +1 -0
  52. data/lib/views/themes/default/basic/text.html.haml +1 -0
  53. data/lib/views/themes/default/basic/title.html.haml +3 -0
  54. data/lib/views/themes/default/basic/tool.html.haml +4 -0
  55. data/lib/views/themes/default/basic/top_panel.html.haml +18 -0
  56. data/lib/views/themes/default/components/basic_list.html.haml +1 -0
  57. data/lib/views/themes/default/components/basic_list_item.html.haml +4 -0
  58. data/lib/views/themes/default/components/table.html.haml +12 -0
  59. data/lib/views/themes/default/components/table_row.html.haml +5 -0
  60. data/lib/views/themes/default/components/tabs.html.haml +4 -0
  61. data/lib/views/themes/default/components/tabs_item.html.haml +4 -0
  62. data/lib/views/themes/default/components/toolbar.html.haml +14 -0
  63. data/lib/views/themes/default/forms/errors.html.haml +5 -0
  64. data/lib/views/themes/default/forms/field.html.haml +19 -0
  65. data/lib/views/themes/default/forms/form.html.haml +5 -0
  66. data/lib/views/themes/default/forms/line.html.haml +6 -0
  67. data/lib/views/themes/default/help.html.haml +1 -0
  68. data/lib/views/themes/default/items/file.html.haml +19 -0
  69. data/lib/views/themes/default/items/folder.html.haml +23 -0
  70. data/lib/views/themes/default/items/line.html.haml +34 -0
  71. data/lib/views/themes/default/items/list.html.haml +35 -0
  72. data/lib/views/themes/default/items/list_item.html.haml +16 -0
  73. data/lib/views/themes/default/items/note.html.haml +16 -0
  74. data/lib/views/themes/default/items/page.html.haml +29 -0
  75. data/lib/views/themes/default/items/selector.html.haml +18 -0
  76. data/lib/views/themes/default/items/thumb.html.haml +12 -0
  77. data/lib/views/themes/default/items/user.html.haml +12 -0
  78. data/lib/views/themes/default/layout_templates/dashboard.html.haml +1 -0
  79. data/lib/views/themes/default/layout_templates/default.html.haml +11 -0
  80. data/lib/views/themes/default/metadata.rb +117 -0
  81. data/lib/views/themes/simple_organization/application.html.erb +45 -0
  82. data/lib/views/themes/simple_organization/application_js.html.erb +12 -0
  83. data/lib/views/themes/simple_organization/aspects/comment.html.haml +21 -0
  84. data/lib/views/themes/simple_organization/aspects/discussion.html.haml +14 -0
  85. data/lib/views/themes/simple_organization/aspects/paginator.html.haml +5 -0
  86. data/lib/views/themes/simple_organization/aspects/tag_selector.html.haml +10 -0
  87. data/lib/views/themes/simple_organization/basic/bottom_panel.html.erb +12 -0
  88. data/lib/views/themes/simple_organization/basic/divider.html.erb +3 -0
  89. data/lib/views/themes/simple_organization/basic/message.html.erb +7 -0
  90. data/lib/views/themes/simple_organization/basic/more.html.haml +5 -0
  91. data/lib/views/themes/simple_organization/basic/navigation.html.erb +15 -0
  92. data/lib/views/themes/simple_organization/basic/text.html.haml +1 -0
  93. data/lib/views/themes/simple_organization/basic/tool.html.erb +9 -0
  94. data/lib/views/themes/simple_organization/basic/top_panel.html.erb +14 -0
  95. data/lib/views/themes/simple_organization/help.html.erb +1 -0
  96. data/lib/views/themes/simple_organization/items/line.html.haml +17 -0
  97. data/lib/views/themes/simple_organization/items/note.html.haml +16 -0
  98. data/lib/views/themes/simple_organization/items/selector.html.haml +11 -0
  99. data/lib/views/themes/simple_organization/layout_templates/default.html.erb +20 -0
  100. data/lib/views/themes/simple_organization/layout_templates/home.html.erb +14 -0
  101. data/lib/views/themes/simple_organization/metadata.rb +193 -0
  102. data/spec/basic_spec.rb +2 -2
  103. data/spec/helper.rb +1 -2
  104. metadata +104 -5
  105. data/spec/spec.opts +0 -4
data/Rakefile CHANGED
@@ -1,66 +1,11 @@
1
- require 'rake'
2
- require 'fileutils'
3
- current_dir = File.expand_path(File.dirname(__FILE__))
4
- Dir.chdir current_dir
1
+ require 'rake_ext'
5
2
 
6
-
7
- #
8
- # Specs
9
- #
10
- require 'spec/rake/spectask'
11
-
12
- task :default => :spec
13
-
14
- Spec::Rake::SpecTask.new('spec') do |t|
15
- t.spec_files = FileList["spec/**/*_spec.rb"].select{|f| f !~ /\/_/}
16
- t.libs = ["#{current_dir}/lib"]
17
- end
18
-
19
-
20
- #
21
- # Gem
22
- #
23
- require 'rake/clean'
24
- require 'rake/gempackagetask'
25
-
26
- gem_options = {
3
+ gem_spec(
27
4
  :name => "common_interface",
28
- :version => "0.1.0",
29
- :summary => "Rapid Web Interface Creation for the Crystal framework",
30
- :dependencies => %w(abstract_interface)
31
- }
32
-
33
- gem_name = gem_options[:name]
34
- spec = Gem::Specification.new do |s|
35
- gem_options.delete(:dependencies).each{|d| s.add_dependency d}
36
- gem_options.each{|k, v| s.send "#{k}=", v}
37
-
38
- s.name = gem_name
39
- s.author = "Alexey Petrushin"
40
- s.homepage = "http://github.com/alexeypetrushin/#{gem_options[:name]}"
41
- s.require_path = "lib"
42
- s.files = (%w{Rakefile readme.md} + Dir.glob("{lib,spec}/**/*"))
43
-
44
- s.platform = Gem::Platform::RUBY
45
- s.has_rdoc = true
46
- end
47
-
48
- package_dir = "#{current_dir}/build"
49
- Rake::GemPackageTask.new(spec) do |p|
50
- p.need_tar = true if RUBY_PLATFORM !~ /mswin/
51
- p.need_zip = true
52
- p.package_dir = package_dir
53
- end
54
-
55
- task :push do
56
- # dir = Dir.chdir package_dir do
57
- gem_file = Dir.glob("#{package_dir}/#{gem_name}*.gem").first
58
- system "gem push #{gem_file}"
59
- # end
60
- end
61
-
62
- task :clean do
63
- system "rm -r #{package_dir}"
64
- end
5
+ :version => "0.1.1",
6
+ :summary => "Rapid Web Interface Creation for the Crystal framework",
7
+ :dependencies => %w(abstract_interface),
65
8
 
66
- task :release => [:gem, :push, :clean]
9
+ :author => "Alexey Petrushin",
10
+ :homepage => "http://github.com/alexeypetrushin/common_interface"
11
+ )
@@ -0,0 +1,7 @@
1
+ - b.dialog do
2
+ = b.title "Dialog Title"
3
+ - b.form_tag do |f|
4
+ = f.hidden_field_tag :_theme, params[:_theme]
5
+ = f.text_field_tag :name, "Some Name", :label => "Name"
6
+ = f.text_area_tag :body, "Some text"
7
+ = f.line_with_delimiters ok_button, cancel_button
@@ -0,0 +1,4 @@
1
+ - b.popup do
2
+ = b.title "The More"
3
+ = link_to "Profile", "#"
4
+ = link_to "Statistics", "#"
@@ -0,0 +1,32 @@
1
+ = render '../shared/top_navigation_bottom'
2
+
3
+ = render '../shared/tools'
4
+
5
+ - content_for :aspects do
6
+ = b.divider "Controls"
7
+ - b.controls :id => "controls_id", :class => "controls_class" do |o|
8
+ - o.left do |a|
9
+ - a.add link_to('Compose', "#", {}, :class => 'icn_compose')
10
+ - a.add link_to('Move', "#")
11
+ - a.add link_to('Delete', "#")
12
+
13
+ - o.right do |a|
14
+ - a.add link_to('Archive', "#", {}, :class => 'icn_compose')
15
+ - a.add link_to('Filter', "#")
16
+
17
+ = b.divider "Tags and Details"
18
+ - b.details :id => "details_id", :class => "details_class" do |o|
19
+ - o.tags samples.common_tags
20
+ - o.details samples.common_details
21
+
22
+ = b.divider "Comments"
23
+ = render '../shared/comments'
24
+
25
+ = b.divider "Visibility Tags"
26
+ - visibility_tags = [['owner', '__owner_visibility'], ['member', '__member_visibility']].collect{|t, v| tag :div, t, :class => v}
27
+ - item_type = [tag :div, 'Note', :class => '__item_type']
28
+ - b.details do |o|
29
+ - o.tags samples.common_tags + visibility_tags + item_type
30
+
31
+ = b.divider "Paginator"
32
+ = render '../shared/paginator'
@@ -0,0 +1,122 @@
1
+ = render '../shared/top_navigation_bottom'
2
+
3
+ = render '../shared/tools'
4
+
5
+ - content_for :content do
6
+ = b.divider "Dialog"
7
+ = link_to('Show Dialog', :dialog, :format => :js, :_theme => params[:_theme])
8
+
9
+ = b.divider "Title"
10
+ = b.title "The Title", :id => "title_id", :class => "title_class"
11
+
12
+ = b.divider "Messages"
13
+
14
+ = b.message 'Info message'
15
+ - b.message :type => :error do
16
+ Error Message
17
+
18
+ = b.narrow b.message('Narrow content')
19
+
20
+
21
+ = b.divider "Tabs"
22
+
23
+ - b.tabs :id => "tabs_id", :class => "tabs_class" do |o|
24
+ - o.content do
25
+ - samples.tabs.each do |name|
26
+ - if samples.active_tab == name
27
+ = b.tabs_item name, :active => true
28
+ - else
29
+ = b.tabs_item link_to(name, "#")
30
+
31
+
32
+ = b.divider "Toolbar"
33
+
34
+ - b.toolbar :id => "toolbar_id", :class => "toolbar_class" do |o|
35
+ - o.left do |a|
36
+ - a.add link_to('Compose', "#", {}, :class => 'icn_compose')
37
+ - a.add link_to('Move', "#")
38
+ - a.add link_to('Delete', "#")
39
+
40
+ - o.right do |a|
41
+ - a.add link_to('Archive', "#", {}, :class => 'icn_compose')
42
+ - a.add link_to('Filter', "#")
43
+
44
+
45
+ = b.divider "List"
46
+
47
+ - b.basic_list :id => "list_id", :class => "list_class" do |o|
48
+ - o.content do
49
+ = b.basic_list_item "First Line", :id => "list_id_1", :class => "list_class_1"
50
+ = b.basic_list_item "Second Line", :check_box => check_box_tag(:tmp), :id => "list_id_2", :class => "list_class_2"
51
+
52
+ = b.divider "Form"
53
+
54
+ - b.form_tag do |f|
55
+ = f.error_messages "First", "Second"
56
+
57
+ = f.hidden_field_tag :name, "value"
58
+
59
+ = f.check_box_tag :active, true, :label => ""
60
+ = f.text_field_tag :name, "Some Name", :label => "Field with error", :errors => ["Error 1", "Error 2"]
61
+ = f.text_field_tag :name, "Some Name", :label => "Type something here", :description => "Add something valuable, (its description for this text_field)"
62
+ = f.text_area_tag :body, "Some text"
63
+ = f.text_field_tag :name, "", :required => true, :label => "Required field"
64
+
65
+ - f.form_field :label => "Visibility" do
66
+ = %w{one two three}.collect{|n| radio_button_tag('group', n, :theme => false) + label_tag("group_#{n}", n)}.join(' ')
67
+
68
+ - b.more :id => 'stub', :name => "...", :class => '_tiny' do
69
+ = f.text_field_tag :extra_field, "", :label => "Extra Fields"
70
+
71
+ = f.line submit_tag("Ok"), link_to("Cancel", "#")
72
+ = f.line_with_delimiters submit_tag("Ok"), link_to("Cancel", "#")
73
+
74
+ = b.divider "Form for"
75
+
76
+ - b.form_for :model, samples.model do |f|
77
+ = f.error_messages
78
+
79
+ = f.hidden_field_tag :some_hidden_field, "value"
80
+ = f.hidden_field :name
81
+
82
+ = f.check_box :active, :label => ""
83
+ = f.text_field :name, :label => "Type something here", :description => "Add something valuable, (its description for this text_field)"
84
+ = f.text_area :body, :label => false
85
+
86
+ = f.text_field_tag :name, "value"
87
+
88
+ = f.line f.submit("Ok"), link_to("Cancel", "#")
89
+ = f.line_with_delimiters f.submit("Ok"), link_to("Cancel", "#")
90
+
91
+
92
+ = b.divider "Table"
93
+
94
+ - b.table :id => "table_id", :class => "table_class", :on => 3 do |o|
95
+ - o.head ["Name", "Position", "Actions"]
96
+ - o.rows do |a|
97
+ - a.add b.table_row(["Alex", "Manager", "<a href='#'>Delete</a>"], :id => "table_id_1", :class => "table_class_1")
98
+ - a.add b.table_row(["Bob", "Worker", "<a href='#'>Delete</a>"])
99
+ - a.add b.table_row(["Fred", "Executer", "<a href='#'>Delete</a>"])
100
+
101
+
102
+ = b.divider "Table without header"
103
+
104
+ - b.table do |o|
105
+ - o.rows do |a|
106
+ = a.add b.table_row(["Alex", "Manager", "<a href='#'>Delete</a>"])
107
+ - a.add do
108
+ - b.table_row do |o|
109
+ - o.content do |a|
110
+ - a.add "Fred"
111
+ - a.add "Executer"
112
+ - a.add "<a href='#'>Delete</a>"
113
+
114
+
115
+ = b.divider "Text"
116
+
117
+ - b.text do
118
+ Some Text <a href='#'>Some Link</a>
119
+
120
+ = b.divider "Custom content"
121
+
122
+ = render themed_partial('basic/html')
@@ -0,0 +1 @@
1
+ target.showDialog("<%= js render('dialog', :format => :html) %>");
@@ -0,0 +1,45 @@
1
+ = render '../shared/top_navigation_bottom'
2
+
3
+ = render '../shared/tools'
4
+
5
+ - content_for :content do
6
+ - options = b.options :class => "_sortable_container", :html_attributes => {"data-item_class" => '_item'} do |o|
7
+ - o.name samples.common_name
8
+ - o.controls samples.common_controls
9
+ - o.tags samples.common_tags
10
+
11
+ = b.divider "Folder (Thumb without Title)"
12
+ - b.folder options do |o|
13
+ - o.content do
14
+ - 12.times do
15
+ - i = rand(3) + 1
16
+ - b.thumb :class => "_item" do |o|
17
+ - o.thumb url_for("/common_interface/images/img#{i}_thumb.jpg")
18
+ - o.url url_for("/common_interface/images/img#{i}.jpg")
19
+ - o.controls(samples.common_controls + [link_to('move', '#', {}, :class => '_handle')])
20
+
21
+
22
+ = b.divider "Folder (Thumb with Title)"
23
+ - b.folder options do |o|
24
+ - o.content do
25
+ - 3.times do |i|
26
+ - i = i + 1
27
+ - b.thumb :name => "The Salvator", :class => "_item" do |o|
28
+ - o.thumb url_for("/common_interface/images/img#{i}_thumb.jpg")
29
+ - o.url url_for("/common_interface/images/img#{i}.jpg")
30
+ - o.controls(samples.common_controls + [link_to('move', '#', {}, :class => '_handle')])
31
+
32
+ = b.divider "Folder (Lines)"
33
+ - b.folder options do |o|
34
+ - o.content do
35
+ - 3.times do |i|
36
+ - i = i + 1
37
+ - b.line :class => "_item" do |o|
38
+ - o.name samples.common_name
39
+ - o.icon url_for("/common_interface/images/img#{i}_icon.jpg")
40
+ - o.url url_for("/common_interface/images/img#{i}_icon.jpg")
41
+ - o.text samples.detail_text
42
+ - o.controls(samples.common_controls + [link_to('move', '#', {}, :class => '_handle')])
43
+ - unless i == 2
44
+ - o.tags samples.common_tags
45
+ - o.details samples.common_details
@@ -0,0 +1,7 @@
1
+ - unless params._theme?
2
+ %h1 Help for Themes
3
+ - AbstractInterface.available_themes.each do |theme|
4
+ %a{:href => url_for(CommonInterface::Demo::Basic, :help, :_theme => theme)}= theme.humanize
5
+ %br
6
+ - else
7
+ = render themed_partial('help')
@@ -0,0 +1,24 @@
1
+ - layouts = b.options do |o|
2
+ - o.default [[:home, :default], [:style, :default], [:blog, :default], [:post, :default]]
3
+ - o.simple_organization [[:home, :home], [:style, :default], [:blog, :default], [:post, :default]]
4
+
5
+ - AbstractInterface.available_themes.each do |theme|
6
+ %h1= "'#{theme.humanize}' Theme"
7
+
8
+ %b Core:
9
+ - %w{aspects basic folder items list page selector}.each do |action|
10
+ %a{:href => url_for(CommonInterface::Demo::Basic, action, :_theme => theme)} #{action.humanize}
11
+ %br
12
+
13
+ %b Special Cases:
14
+ - %w{user style}.each do |action|
15
+ %a{:href => url_for(CommonInterface::Demo::Basic, action, :_theme => theme)} #{action.humanize}
16
+ %br
17
+
18
+ %b Site:
19
+ - layouts[theme].each do |action, ltemplate|
20
+ %a{:href => url_for(CommonInterface::Demo::Site, action, :_theme => theme, :_layout_template => ltemplate)} #{action.to_s.humanize}
21
+ %br
22
+
23
+ %p
24
+ Sources are <a href='http://github.com/alexeypetrushin/common_interface'>here</a>.
@@ -0,0 +1,91 @@
1
+ = render '../shared/top_navigation_bottom'
2
+
3
+ = render '../shared/tools'
4
+
5
+ - content_for :content do
6
+ = b.divider "Note"
7
+ - b.note :id => "note_id", :class => "note_class" do |o|
8
+ - o.name "Terminator movie series"
9
+ - o.text samples.note_text
10
+ - o.controls [link_to('edit', '#'), link_to('delete', '#')]
11
+ - o.tags samples.common_tags
12
+ - o.details samples.common_details
13
+
14
+ = b.divider "Thumb"
15
+ - b.thumb :id => 'thumb_id', :class => "thumb_class" do |o|
16
+ - o.controls samples.common_controls
17
+ - o.thumb url_for("/common_interface/images/img1_thumb.jpg")
18
+ - o.url url_for("/common_interface/images/img1.jpg")
19
+ - o.name 'Picture 1.jpg'
20
+ ._clear
21
+
22
+ = b.divider "Line"
23
+ - b.line :id => "line_id", :class => "line_class" do |o|
24
+ - o.name samples.common_name
25
+ - o.icon url_for("/common_interface/images/img1_icon.jpg")
26
+ - o.url url_for("/common_interface/images/img1_icon.jpg")
27
+ - o.text samples.detail_text
28
+ - o.controls samples.common_controls
29
+ - o.tags samples.common_tags
30
+ - o.details samples.common_details
31
+
32
+ = b.divider "File"
33
+ - b.file :id => "file_id", :class => "file_class" do |o|
34
+ - o.name "Product Overview.pdf"
35
+ - o.icon url_for("/common_interface/images/img1_icon.jpg")
36
+ - o.url url_for("/common_interface/images/img1_icon.jpg")
37
+ - o.controls samples.common_controls
38
+ - o.tags samples.common_tags
39
+ - o.details samples.common_details
40
+
41
+ = b.divider "Selector"
42
+ - b.selector :id => "selector_id", :class => "selector_class" do |o|
43
+ - o.name "Top 10 Movies"
44
+ - o.controls samples.common_controls
45
+ - o.content do
46
+ - 2.times do |i|
47
+ - i = i + 1
48
+ - b.line :id => "line_id", :class => "line_class" do |o|
49
+ - o.name samples.common_name
50
+ - o.icon url_for("/common_interface/images/img#{i}_icon.jpg")
51
+ - o.url url_for("/common_interface/images/img#{i}_icon.jpg")
52
+ - o.text samples.detail_text
53
+ - o.controls samples.common_controls
54
+ - o.tags samples.common_tags if i == 1
55
+ - o.details samples.common_details if i == 1
56
+
57
+ = b.divider "Folder"
58
+ - b.folder :id => "folder_id", :class => "folder_class _item _sortable_container", :html_attributes => {"data-item_class" => '_item'} do |o|
59
+ - o.name "Pictures for Terminator Movie"
60
+ - o.controls samples.common_controls
61
+ - o.tags samples.common_tags
62
+ - o.details samples.common_details
63
+ - o.content do
64
+ - 7.times do |i|
65
+ - i = rand(3) + 1
66
+ - b.thumb :class => '_item' do |o|
67
+ - o.thumb url_for("/common_interface/images/img#{i}_thumb.jpg")
68
+ - o.url url_for("/common_interface/images/img#{i}.jpg")
69
+ - o.controls(samples.common_controls + [link_to('move', '#', {}, :class => '_handle')])
70
+
71
+ = b.divider "List"
72
+ - b.list :id => "list_id", :class => "list_class _item _sortable_container", :html_attributes => {"data-item_class" => '_item'} do |o|
73
+ - o.name "List of Tasks"
74
+ - o.controls samples.common_controls
75
+ - o.tags samples.common_tags
76
+ - o.details samples.common_details
77
+ - o.content do
78
+ - 7.times do |i|
79
+ - b.list_item "First Line", :id => "list_id_#{i}", :class => "_item list_class_#{i}" do |o|
80
+ - o.check_box check_box_tag(:tmp) if i.odd? and i <= 4
81
+ - o.controls(samples.common_controls + [link_to('move', '#', {}, :class => '_handle')])
82
+ - o.details samples.common_details
83
+ - o.finished true if i > 4
84
+
85
+ = b.divider "Selector"
86
+ - b.selector :id => "selector_id", :class => "selector_class" do |o|
87
+ - o.name samples.common_name
88
+ - o.text samples.detail_text
89
+ - o.controls samples.common_controls
90
+ - o.tags samples.common_tags
91
+ - o.details samples.common_details
@@ -0,0 +1,23 @@
1
+ = render '../shared/top_navigation_bottom'
2
+
3
+ = render '../shared/tools'
4
+
5
+ - content_for :content do
6
+ = b.divider "List"
7
+ - b.list :id => "list_id", :class => "_item list_class _sortable_container", :html_attributes => {"data-item_class" => '_item'} do |o|
8
+ - o.name "List of Tasks"
9
+ - o.controls samples.common_controls
10
+ - o.tags samples.common_tags
11
+ - o.details samples.common_details
12
+ - o.content do
13
+ - 5.times do |i|
14
+ - b.list_item "First Line", :id => "a#{i}", :class => '_item' do |o|
15
+ - o.check_box check_box_tag(:tmp)
16
+ - o.controls(samples.common_controls + [link_to('move', '#', {}, :class => '_handle')])
17
+ - o.details samples.common_details
18
+
19
+ - 13.times do |i|
20
+ - b.list_item "First Line", :id => "b#{i}", :class => '_item' do |o|
21
+ - o.controls(samples.common_controls + [link_to('move', '#', {}, :class => '_handle')])
22
+ - o.details samples.common_details
23
+ - o.finished true