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
@@ -0,0 +1,19 @@
1
+ = render '../shared/top_navigation_bottom'
2
+
3
+ = render '../shared/tools'
4
+
5
+ - content_for :content do
6
+
7
+ - b.page :class => "_sortable_container", :html_attributes => {"data-item_class" => '_item'} do |o|
8
+ - o.name "Pictures for Terminator Movie"
9
+ - o.controls samples.common_controls
10
+ - o.toolbar [link_to('Note', '#'), link_to('Folder', '#')]
11
+ - o.tags samples.common_tags
12
+ - o.icon url_for("/common_interface/images/img1_thumb.jpg")
13
+ - o.content do
14
+ = render('page/note', :locals => {:text => "#{image_tag(url_for("/common_interface/images/img1_thumb.jpg"))} #{samples.note_text} #{samples.note_text}"})
15
+ = render('page/note', :locals => {:text => samples.note_text})
16
+ = render('page/folder')
17
+ = render('page/note', :locals => {:text => samples.note_text})
18
+
19
+ = render '../shared/comments'
@@ -0,0 +1,10 @@
1
+ - b.folder :class => "_item _sortable_container", :html_attributes => {"data-item_class" => '_item'} do |o|
2
+ - o.name "Pictures for Terminator Movie"
3
+ - o.controls [link_to('add', '#'), link_to('edit', '#'), link_to('delete', '#'), link_to('move', '#', {}, :class => '_handle')]
4
+ - o.content do
5
+ - 5.times do
6
+ - i = rand(3) + 1
7
+ - b.thumb :name => "The Salvator", :class => '_item' do |o|
8
+ - o.thumb url_for("/common_interface/images/img#{i}_thumb.jpg")
9
+ - o.url url_for("/common_interface/images/img#{i}.jpg")
10
+ - o.controls [link_to('edit', '#'), link_to('delete', '#'), link_to('move', '#', {}, :class => '_handle')]
@@ -0,0 +1,4 @@
1
+ - b.note :class => '_item' do |o|
2
+ - o.name "Terminator movie series"
3
+ - o.text text
4
+ - o.controls(samples.common_controls + [link_to('move', '#', {}, :class => '_handle')])
@@ -0,0 +1,5 @@
1
+ .hover_controls_container
2
+  
3
+ .hover_controls
4
+ Add:
5
+ = [link_to('Note', '#'), link_to('Folder', '#')].join(' ')
@@ -0,0 +1 @@
1
+ target.showPopup("<%= js render('popup', :format => :html) %>");
@@ -0,0 +1,38 @@
1
+ = render '../shared/top_navigation_bottom'
2
+
3
+ = render '../shared/tools'
4
+
5
+ - content_for :content do
6
+ - options = b.options do |o|
7
+ - o.name samples.common_name
8
+ - o.controls samples.common_controls
9
+ - o.tags samples.common_tags
10
+
11
+ = b.divider "Selector (Thumb without Title)"
12
+ - b.selector options do |o|
13
+ - o.text samples.note_text
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
20
+ ._clear
21
+
22
+
23
+ = b.divider "Selector (Thumb with Title)"
24
+ = b.selector options
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
31
+ ._clear
32
+
33
+
34
+ = b.divider "Selector (Lines)"
35
+ = b.selector options
36
+
37
+ = render '../shared/line_previews'
38
+ ._clear
@@ -0,0 +1,113 @@
1
+ <% content_for :content do %>
2
+ <% b.text do %>
3
+
4
+
5
+ <h1>Heading, Paragraphs, Line Breaks, Links, Bold, Italic</h1>
6
+ <h1>Heading 1</h1>
7
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
8
+ <h2>Heading 2</h2>
9
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
10
+ <h3>Heading 3</h3>
11
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
12
+ <p>The Terminator (1984) <a href='#'>More at IMDbPro</a></p>
13
+ <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. <b>They created 'THE TERMINATOR'</b>
14
+ <br/>The thing that won't die, in the <i>nightmare that won't end</i>. A human-looking, apparently unstoppable cyborg is sent from the future to kill Sarah Connor; Kyle Reese is sent to stop it.</p>
15
+ <p>Your future is in his hands.</p>
16
+ <h3>Unsorted list</h3>
17
+ <ul>
18
+ <li>Blandit in, interdum a</li>
19
+ <li>Ultrices non lectus</li>
20
+ <li>Nunc id odio</li>
21
+ <li>Fusce ultricies</li>
22
+ </ul>
23
+ <h3>Ordered list</h3>
24
+ <ol>
25
+ <li>Blandit in, interdum a</li>
26
+ <li>Ultrices non lectus</li>
27
+ <li>Nunc id odio</li>
28
+ <li>Fusce ultricies</li>
29
+ </ol>
30
+
31
+
32
+ <h1>Images inside links should be modified to ImageBox</h1>
33
+ <a href="<%= url_for("/common_interface/images/img1.jpg") %>">
34
+ <img src="<%= url_for("/common_interface/images/img1_icon.jpg") %>"></img>
35
+ </a>
36
+ <a href="<%= url_for("/common_interface/images/img2.jpg") %>">
37
+ <img src="<%= url_for("/common_interface/images/img2_icon.jpg") %>"></img>
38
+ </a>
39
+ <a href="<%= url_for("/common_interface/images/img3.jpg") %>">
40
+ <img src="<%= url_for("/common_interface/images/img3_icon.jpg") %>"></img>
41
+ </a>
42
+
43
+
44
+ <h1>Left and right styles for images</h1>
45
+ <div class='left'>
46
+ <a href="<%= url_for("/common_interface/images/img1.jpg") %>">
47
+ <img src="<%= url_for("/common_interface/images/img1_icon.jpg") %>"></img>
48
+ </a>
49
+ </div>
50
+ <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>
51
+ <div class='right'>
52
+ <a href="<%= url_for("/common_interface/images/img3.jpg") %>">
53
+ <img src="<%= url_for("/common_interface/images/img2_icon.jpg") %>"></img>
54
+ </a>
55
+ </div>
56
+ <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>
57
+ <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'
58
+ <br/>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>
59
+
60
+
61
+ <h1>Left and right styles for arbitrary content</h1>
62
+ <div class='left'>
63
+ <b>The Terminator (1984) <a href='#'>More at IMDbPro</a> <br/> A human-looking, apparently unstoppable cyborg.</b>
64
+ </div>
65
+ <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>
66
+ <div class='right'>
67
+ <b>The Terminator (1984) <a href='#'>More at IMDbPro</a> <br/> A human-looking, apparently unstoppable cyborg.</b>
68
+ </div>
69
+ <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>
70
+ <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'
71
+ <br/>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>
72
+
73
+
74
+ <h1>Image by default should be alligned to the Left</h1>
75
+ <img src="<%= url_for("/common_interface/images/img1_thumb.jpg") %>"></img>
76
+ <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>
77
+ <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>
78
+
79
+
80
+ <h1>Image by default should be alligned to the Left, even if it wrapped (from error)</h1>
81
+ <p>
82
+ <img src="<%= url_for("/common_interface/images/img1_thumb.jpg") %>"></img>
83
+ 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'
84
+ </p>
85
+ <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>
86
+
87
+
88
+ <h1>Image by default should be alligned to the Left</h1>
89
+ <a href="http://www.youtube.com/watch?v=M-cIjPOJdFM&amp;fs=1" title="Zombieland Trailer" class='_video'>
90
+ <img src="<%= url_for("/common_interface/images/video_icon.png") %>"></img>
91
+ </a>
92
+ <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>
93
+ <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>
94
+
95
+
96
+ <h1>Clear and Space</h1>
97
+ <div class='left'>This text splitted</div> <div class='clear'></div> <div class='left'>in two lines by clear div.</div>
98
+ <div class='clear'></div>
99
+ <div class='left'>This text splitted</div> <div class='space'></div> <div class='left'>in two lines by space div.</div>
100
+ <div class='clear'></div>
101
+
102
+
103
+ <!-- <h1>Autoclear after last image in line</h1>
104
+ <a href="<%= url_for("/common_interface/images/img1.jpg") %>">
105
+ <img src="<%= url_for("/common_interface/images/img1_icon.jpg") %>"></img>
106
+ </a>
107
+ <a href="<%= url_for("/common_interface/images/img2.jpg") %>">
108
+ <img src="<%= url_for("/common_interface/images/img2_icon.jpg") %>"></img>
109
+ </a>
110
+ This text should be on the newline -->
111
+
112
+ <% end %>
113
+ <% end %>
@@ -0,0 +1,2 @@
1
+ - tag :span, :class => "selected_tag #{1}" do
2
+ sdfa
@@ -0,0 +1,16 @@
1
+ - content_for :content do
2
+ = b.title 'Alex'
3
+
4
+ - b.user :id => 'user_id', :class => 'user_class' do |o|
5
+ - o.controls [link_to('add', '#'), link_to('edit', '#'), link_to('delete', '#')]
6
+ - o.avatar image_tag("/common_interface/images/img1_icon.jpg")
7
+ - o.properties do
8
+ - b.list do |o|
9
+ - o.content do
10
+ = b.list_item 'Alex Freeman'
11
+
12
+ - o.content do
13
+ - b.list do |o|
14
+ - o.content do
15
+ = b.list_item 'Latest Activity ...'
16
+ = b.list_item 'Public Items ...'
@@ -0,0 +1,13 @@
1
+ = render '../shared/top_navigation_bottom'
2
+
3
+ = render '../shared/tools'
4
+
5
+ - content_for :content do
6
+ - b.selector do |o|
7
+ - o.name samples.common_name
8
+ - o.text samples.note_text
9
+ - o.controls samples.common_controls
10
+
11
+ = render '../shared/line_previews'
12
+
13
+ = render '../shared/paginator'
@@ -0,0 +1,9 @@
1
+ = render '../shared/top_navigation_bottom'
2
+
3
+ = render '../shared/core_tools'
4
+
5
+ - content_for :content do
6
+ - b.note :id => "note_id", :class => "note_class" do |o|
7
+ - o.text metadata.homepage_html
8
+ - o.controls [link_to('edit', '#'), link_to('delete', '#')]
9
+ - o.details samples.common_details
@@ -0,0 +1,11 @@
1
+ = render '../shared/top_navigation_bottom'
2
+
3
+ = render '../shared/tools'
4
+
5
+ - content_for :content do
6
+ - b.note :id => "note_id", :class => "note_class" do |o|
7
+ - o.text samples.note_text
8
+ - o.controls [link_to('edit', '#'), link_to('delete', '#')]
9
+ - o.details samples.common_details
10
+
11
+ = render '../shared/comments'
@@ -0,0 +1,9 @@
1
+ = render '../shared/top_navigation_bottom'
2
+
3
+ = render '../shared/tools'
4
+
5
+ - content_for :content do
6
+ - b.note :id => "note_id", :class => "note_class" do |o|
7
+ - o.text metadata.style_html
8
+ - o.controls [link_to('edit', '#'), link_to('delete', '#')]
9
+ - o.details samples.common_details
@@ -0,0 +1 @@
1
+ <%= render themed_partial('application') %>
@@ -0,0 +1,14 @@
1
+ try{
2
+ <% if params.target? %>
3
+ var target = $('#<%= params[:target] %>');
4
+ <% end %>
5
+
6
+ <%= yield %>
7
+
8
+ // TODO2 stub
9
+ <% if false %>
10
+ <% if msg = flash[:error] || flash[:info] %>
11
+ $.infoMessage("<%= j msg %>");
12
+ <% end %>
13
+ <% end %>
14
+ }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("/common_interface/images/img1_icon.jpg")) unless i == 1
10
+ - o.text samples.comment_text
11
+ - o.controls samples.common_controls
@@ -0,0 +1,6 @@
1
+ - content_for :tools do
2
+ - b.tool :name => "Parameters" do
3
+ - b.more :name => "...", :id => 'more', :class => '_tiny' do
4
+ - b.basic_list do
5
+ = b.basic_list_item(tag(:a, "Update icon", :href => '#'))
6
+ = b.basic_list_item(tag(:a, "Edit", :href => '#') + " " + tag(:a, "Delete", :href => '#'))
@@ -0,0 +1,39 @@
1
+ - b.line do |o|
2
+ - o.name samples.common_name
3
+ - o.icon url_for("/common_interface/images/img#{rand(3) + 1}_icon.jpg")
4
+ - o.text samples.detail_text
5
+ - o.url url_for("/common_interface/images/img#{rand(3) + 1}_icon.jpg")
6
+ - o.controls samples.common_controls
7
+
8
+ - b.line do |o|
9
+ - o.name samples.common_name
10
+ - o.icon url_for("/common_interface/images/img#{rand(3) + 1}_icon.jpg")
11
+ - o.text samples.detail_text
12
+ - o.url url_for("/common_interface/images/img#{rand(3) + 1}_icon.jpg")
13
+ - o.controls samples.common_controls
14
+ - o.tags samples.common_tags + ["Note"]
15
+ - o.details samples.common_details
16
+
17
+ - b.line do |o|
18
+ - o.name samples.common_name
19
+ - o.text samples.detail_text
20
+ - o.url url_for("/common_interface/images/img#{rand(3) + 1}_icon.jpg")
21
+ - o.controls samples.common_controls
22
+ - o.tags samples.common_tags + ["Page"]
23
+ - o.details samples.common_details
24
+
25
+ - b.line do |o|
26
+ - o.name samples.common_name
27
+ - o.url url_for("/common_interface/images/img#{rand(3) + 1}_icon.jpg")
28
+ - o.controls samples.common_controls
29
+ - o.tags samples.common_tags + ["Task"]
30
+ - o.details samples.common_details
31
+
32
+ - b.line :class => "_item" do |o|
33
+ - o.name samples.common_name
34
+ - o.icon url_for("/common_interface/images/img#{rand(3) + 1}_icon.jpg")
35
+ - o.text samples.detail_text
36
+ - o.url url_for("/common_interface/images/img#{rand(3) + 1}_icon.jpg")
37
+ - o.controls samples.common_controls
38
+ - o.tags samples.common_tags + ["Note"]
39
+ - o.details samples.common_details
@@ -0,0 +1,7 @@
1
+ - pages = %w{1 2 3 4 5 6 7}.collect{|t| "<a href='#'>#{t}</a>"}
2
+ - b.paginator do |o|
3
+ - o.prev "<a href='#'>Prev</a>"
4
+ - o.pages [1, 2, 3, 4, 5, 6, 7]
5
+ - o.to_link lambda{|t| "<a href='#'>#{t}</a>"}
6
+ - o.current_page 3
7
+ - o.next "<a href='#'>Next</a>"
@@ -0,0 +1,26 @@
1
+ - content_for :tools do
2
+ - b.tool :name => "Add" do
3
+ %a{:href => "#", :class => "_embedded_popup", "data-content_id" => "add_content_popup"}
4
+ Add
5
+ #add_content_popup._hidden
6
+ - b.popup do
7
+ %a{:href => "#"} Page
8
+ %a{:href => "#"} Note
9
+ %a{:href => "#"} File
10
+
11
+ - b.tool :name => "Search" do
12
+ - form_tag do
13
+ = text_field_tag ''
14
+
15
+ - b.tool :name => "Tags" do
16
+ - b.tag_selector do |o|
17
+ - o.selected ['hot', 'low']
18
+ - o.selected_tag_to_link lambda{|tag| link_to tag.name, '#'}
19
+ - 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}
20
+ - o.tag_to_link lambda{|tag| link_to tag.name, '#'}
21
+
22
+ - b.tool :name => "Parameters" do
23
+ - b.more :name => "...", :id => 'more', :class => '_tiny' do
24
+ - b.basic_list do
25
+ = b.basic_list_item(tag(:a, "Update icon", :href => '#'))
26
+ = b.basic_list_item(tag(:a, "Edit", :href => '#') + " " + tag(:a, "Delete", :href => '#'))
@@ -0,0 +1,32 @@
1
+ - content_for :top_panel do
2
+ - b.top_panel :id => "top_panel_id", :class => "top_panel_class" do |o|
3
+ - o.logo metadata.logo
4
+ - o.left do |a|
5
+ - a.add 'Documents > Main'
6
+
7
+ - o.right do |a|
8
+ - a.add "Hello, Guest"
9
+ - a.add
10
+ - a.add link_to("Log In", "#")
11
+ - a.add
12
+ - a.add link_to("Register", "#")
13
+ - a.add
14
+ - a.add link_to("+", CommonInterface::Demo::Basic, 'popup', :format => :js, :_theme => params[:_theme])
15
+
16
+
17
+ - content_for :navigation do
18
+ - b.navigation :id => 'navigation_id', :class => 'navigation_class' do |o|
19
+ - o.items do |a|
20
+ - samples.top_menu_items.each do |menu|
21
+ - if samples.active_top_menu == menu
22
+ - a.add :content => menu, :active => true
23
+ - else
24
+ - a.add link_to(menu, CommonInterface::Demo::Basic, :select_menu, :top_menu => menu)
25
+
26
+
27
+ - content_for :bottom_panel do
28
+ - b.bottom_panel do |o|
29
+ - o.left do
30
+ Some bottom links
31
+ - o.right do
32
+ Powered by <a href='http://bom4.com'>bom4.com</a>
@@ -0,0 +1,14 @@
1
+ default:
2
+ layout_template: default
3
+ slots:
4
+ top_panel: "shared/top_panel"
5
+ navigation: "shared/navigation"
6
+ aspects_bottom:
7
+ - "shared/aspects/comments"
8
+ tools:
9
+ - "shared/tools/add_buttons"
10
+ - "shared/tools/search"
11
+ - "shared/tools/tags"
12
+ - "shared/tools/access"
13
+ - "shared/tools/context_menu"
14
+ bottom_panel: "shared/bottom_panel"
@@ -0,0 +1,24 @@
1
+ default:
2
+ layout_template: default
3
+ slots:
4
+ top_panel: "shared/top_panel"
5
+ navigation: "shared/navigation"
6
+ aspects_bottom:
7
+ - "shared/aspects/comments"
8
+ tools:
9
+ - "shared/tools/add_buttons"
10
+ - "shared/tools/search"
11
+ - "shared/tools/tags"
12
+ - "shared/tools/access"
13
+ - "shared/tools/context_menu"
14
+ bottom_panel: "shared/bottom_panel"
15
+
16
+ home:
17
+ layout_template: home
18
+ slots:
19
+ top_panel: "shared/top_panel"
20
+ navigation: "shared/navigation"
21
+ tools:
22
+ - "shared/tools/access"
23
+ - "shared/tools/context_menu"
24
+ bottom_panel: "shared/bottom_panel"