noodall-ui 0.5.0.pre.1 → 0.5.0.pre.2
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/javascripts/admin/application.js +13 -1
- data/app/assets/stylesheets/admin/layout.css +10 -0
- data/app/helpers/noodall/admin/nodes_helper.rb +6 -0
- data/app/views/noodall/admin/nodes/show.html.erb +7 -4
- data/features/popular_tags.feature +17 -0
- data/features/step_definitions/tags_steps.rb +9 -0
- data/features/support/mm_factory_steps.rb +1 -0
- data/lib/noodall/ui/version.rb +1 -1
- metadata +15 -13
@@ -42,6 +42,18 @@ function setup_tooltips() {
|
|
42
42
|
}
|
43
43
|
}
|
44
44
|
|
45
|
+
function set_up_tags() {
|
46
|
+
$('span.tags a').click(function() {
|
47
|
+
target = $($(this).attr('href'));
|
48
|
+
if (target.val()) {
|
49
|
+
target.val(target.val() + ', ' + $(this).text());
|
50
|
+
} else {
|
51
|
+
target.val($(this).text());
|
52
|
+
}
|
53
|
+
return false;
|
54
|
+
});
|
55
|
+
}
|
56
|
+
|
45
57
|
$(document).ready(function() {
|
46
58
|
|
47
59
|
//video previews
|
@@ -130,7 +142,7 @@ $(document).ready(function() {
|
|
130
142
|
|
131
143
|
|
132
144
|
|
133
|
-
|
145
|
+
set_up_tags();
|
134
146
|
|
135
147
|
|
136
148
|
$('body#assets.index .file').click(function() {
|
@@ -812,6 +812,16 @@ li.multi-file .file-detail img {clear:both;float:left;}
|
|
812
812
|
margin: 0;
|
813
813
|
}
|
814
814
|
|
815
|
+
/* -------------- Popular Tags -------------- */
|
816
|
+
span.tags {
|
817
|
+
font-size: 15px;
|
818
|
+
padding: 10px 0;
|
819
|
+
display: block;
|
820
|
+
line-height: 1.5;
|
821
|
+
}
|
822
|
+
|
823
|
+
|
824
|
+
|
815
825
|
/* -------------- CLEARFIX -------------- */
|
816
826
|
|
817
827
|
#header:after,
|
@@ -57,6 +57,12 @@ module Noodall
|
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
|
+
def popular_tags(limit = 10)
|
61
|
+
Noodall::Node.tag_cloud(:limit => limit).map do |tagging|
|
62
|
+
link_to tagging.name, '#node_keywords', :class => "count#{tagging.count}"
|
63
|
+
end.join(', ').html_safe
|
64
|
+
end
|
65
|
+
|
60
66
|
def admin_nodes_column_headings
|
61
67
|
html = Array.new
|
62
68
|
html << sortable_table_header(:name => "Name", :sort => "admin_title", :class => 'sort')
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<% content_for :header, javascript_include_tag( 'tiny_mce/jquery.tinymce
|
1
|
+
<% content_for :header, javascript_include_tag( 'tiny_mce/jquery.tinymce', 'admin/tiny_mce_config', 'admin/nodes', 'admin/assets' ) %>
|
2
2
|
|
3
3
|
|
4
4
|
<h1>Editing Content</h1>
|
@@ -31,7 +31,10 @@
|
|
31
31
|
<p>
|
32
32
|
<span class="tooltip" title="Enter a comma seperated list of keywords to describe this content."website,launch,event""> </span>
|
33
33
|
<%= f.label :keywords, "Keywords" %><br/>
|
34
|
-
<span class="input-wrap"
|
34
|
+
<span class="input-wrap">
|
35
|
+
<%= f.text_field :keywords, :class => "keywords-completer" %><br/>
|
36
|
+
<span class="tags"><strong>Popular Tags: </strong><%= popular_tags %></span>
|
37
|
+
</span>
|
35
38
|
</p>
|
36
39
|
|
37
40
|
</div>
|
@@ -66,14 +69,14 @@
|
|
66
69
|
%>
|
67
70
|
<span class="input-wrap"><%= f.datetime_select :published_to, :include_blank => true %></span>
|
68
71
|
</p>
|
69
|
-
|
72
|
+
|
70
73
|
<div class="version_message_section advanced-block">
|
71
74
|
<p>
|
72
75
|
<%= f.label :version_message %><br />
|
73
76
|
<span class="input-wrap"><%= f.text_field :version_message -%></span>
|
74
77
|
</p>
|
75
78
|
</div>
|
76
|
-
|
79
|
+
|
77
80
|
</div>
|
78
81
|
|
79
82
|
<% if current_user.admin? -%>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
@javascript
|
2
|
+
Feature: Show popular tags
|
3
|
+
In order that I don't reuse tags as can see what other tags are
|
4
|
+
As a website editor
|
5
|
+
I want to see popular tags next to the tag input box
|
6
|
+
|
7
|
+
Scenario: Popular tags selector
|
8
|
+
Given the following page as exists:
|
9
|
+
| Title | Tag list |
|
10
|
+
| One | stuff, things, what, eh |
|
11
|
+
| Two | stuff, things, what |
|
12
|
+
| One | stuff, things |
|
13
|
+
| One | stuff |
|
14
|
+
And I am editing content
|
15
|
+
Then I should see the tags list
|
16
|
+
When I follow "stuff" within the tag list
|
17
|
+
Then the "Keywords" field should contain "stuff"
|
data/lib/noodall/ui/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: noodall-ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.0.pre.
|
4
|
+
version: 0.5.0.pre.2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-10-
|
12
|
+
date: 2011-10-27 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: noodall-core
|
16
|
-
requirement: &
|
16
|
+
requirement: &18391560 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.7.5
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *18391560
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: thoughtbot-sortable_table
|
27
|
-
requirement: &
|
27
|
+
requirement: &18391100 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 0.0.6
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *18391100
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: will_paginate
|
38
|
-
requirement: &
|
38
|
+
requirement: &18390600 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '3.0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *18390600
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: dynamic_form
|
49
|
-
requirement: &
|
49
|
+
requirement: &18390120 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *18390120
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: bundler
|
60
|
-
requirement: &
|
60
|
+
requirement: &18389660 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: 1.0.0
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *18389660
|
69
69
|
description: Noodall Rails User Interface Engine. Requires Noodall Core
|
70
70
|
email:
|
71
71
|
- steve@wearebeef.co.uk
|
@@ -234,6 +234,7 @@ files:
|
|
234
234
|
- features/manage_assets.feature
|
235
235
|
- features/manage_content_tree.feature
|
236
236
|
- features/node_filtering.feature
|
237
|
+
- features/popular_tags.feature
|
237
238
|
- features/preview.feature
|
238
239
|
- features/promo_component.feature
|
239
240
|
- features/publish_content.feature
|
@@ -256,6 +257,7 @@ files:
|
|
256
257
|
- features/step_definitions/search_steps.rb
|
257
258
|
- features/step_definitions/sign_in_steps.rb
|
258
259
|
- features/step_definitions/sorting_steps.rb
|
260
|
+
- features/step_definitions/tags_steps.rb
|
259
261
|
- features/step_definitions/web_steps.rb
|
260
262
|
- features/support/cucumber.css
|
261
263
|
- features/support/env.rb
|
@@ -666,7 +668,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
666
668
|
version: '0'
|
667
669
|
segments:
|
668
670
|
- 0
|
669
|
-
hash:
|
671
|
+
hash: 600226257778950845
|
670
672
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
671
673
|
none: false
|
672
674
|
requirements:
|