concen 0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/controllers/concen/application_controller.rb +25 -0
- data/app/controllers/concen/grid_files_controller.rb +75 -0
- data/app/controllers/concen/pages_controller.rb +95 -0
- data/app/controllers/concen/performances_controller.rb +35 -0
- data/app/controllers/concen/sessions_controller.rb +30 -0
- data/app/controllers/concen/statuses_controller.rb +63 -0
- data/app/controllers/concen/traffics_controller.rb +43 -0
- data/app/controllers/concen/users_controller.rb +118 -0
- data/app/controllers/concen/visits_controller.rb +38 -0
- data/app/helpers/concen/application_helper.rb +10 -0
- data/app/helpers/concen/pages_helper.rb +5 -0
- data/app/helpers/concen/visits_helper.rb +4 -0
- data/app/models/concen/grid_file.rb +67 -0
- data/app/models/concen/page.rb +342 -0
- data/app/models/concen/response.rb +45 -0
- data/app/models/concen/user.rb +88 -0
- data/app/models/concen/visit/page.rb +100 -0
- data/app/models/concen/visit/referral.rb +45 -0
- data/app/stylesheets/application.sass +445 -0
- data/app/stylesheets/config.rb +9 -0
- data/app/stylesheets/ie.sass +4 -0
- data/app/stylesheets/non_ios.sass +16 -0
- data/app/stylesheets/partials/_base.sass +92 -0
- data/app/stylesheets/partials/_fileuploader.sass +75 -0
- data/app/stylesheets/partials/_flot.sass +8 -0
- data/app/stylesheets/partials/_form.sass +74 -0
- data/app/stylesheets/partials/_mixins.sass +8 -0
- data/app/stylesheets/partials/_variables.sass +17 -0
- data/app/stylesheets/print.sass +4 -0
- data/app/views/concen/grid_files/_form.html.haml +15 -0
- data/app/views/concen/grid_files/edit.html.haml +9 -0
- data/app/views/concen/pages/_file_list.haml +7 -0
- data/app/views/concen/pages/_files.haml +24 -0
- data/app/views/concen/pages/_form.html.haml +18 -0
- data/app/views/concen/pages/_nested_list.html.haml +15 -0
- data/app/views/concen/pages/edit.html.haml +15 -0
- data/app/views/concen/pages/index.html.haml +9 -0
- data/app/views/concen/pages/new.html.haml +9 -0
- data/app/views/concen/performances/_runtimes.html.haml +5 -0
- data/app/views/concen/performances/show.html.haml +30 -0
- data/app/views/concen/sessions/new.html.haml +12 -0
- data/app/views/concen/statuses/_server.html.haml +19 -0
- data/app/views/concen/statuses/show.html.haml +18 -0
- data/app/views/concen/traffics/_pages.html.haml +5 -0
- data/app/views/concen/traffics/_referrals.html.haml +9 -0
- data/app/views/concen/traffics/show.html.haml +30 -0
- data/app/views/concen/users/_form.html.haml +29 -0
- data/app/views/concen/users/_password_reset.html.haml +0 -0
- data/app/views/concen/users/_settings.html.haml +15 -0
- data/app/views/concen/users/edit.html.haml +9 -0
- data/app/views/concen/users/index.html.haml +32 -0
- data/app/views/concen/users/new.html.haml +4 -0
- data/app/views/concen/users/new_invite.html.haml +15 -0
- data/app/views/concen/users/new_reset_password.html.haml +15 -0
- data/app/views/concen/visits/visit_recorder_js.erb +13 -0
- data/app/views/layouts/concen/_additional_header_links.haml +0 -0
- data/app/views/layouts/concen/_header.html.haml +18 -0
- data/app/views/layouts/concen/_iphone.html.haml +6 -0
- data/app/views/layouts/concen/application.html.haml +48 -0
- data/app/views/layouts/concen/maintenance.html.haml +0 -0
- data/config/routes.rb +64 -0
- data/lib/concen.rb +11 -0
- data/lib/concen/engine.rb +14 -0
- data/lib/concen/railties/page.rake +12 -0
- data/lib/concen/railties/setup.rake +23 -0
- data/lib/concen/version.rb +3 -0
- metadata +246 -0
@@ -0,0 +1,9 @@
|
|
1
|
+
# Require any additional compass plugins here.
|
2
|
+
# Set this to the root of your project when deployed:
|
3
|
+
http_path = "/"
|
4
|
+
css_dir = "../../public/concen"
|
5
|
+
sass_dir = "../"
|
6
|
+
images_dir = "../../public/concen/images"
|
7
|
+
javascripts_dir = "../../public/concen"
|
8
|
+
# To enable relative paths to assets via compass helper functions. Uncomment:
|
9
|
+
# relative_assets = true
|
@@ -0,0 +1,16 @@
|
|
1
|
+
@import "compass"
|
2
|
+
@import "partials/mixins"
|
3
|
+
|
4
|
+
ul.squares
|
5
|
+
li.child-container
|
6
|
+
h3
|
7
|
+
$use-mozilla-ellipsis-binding: true
|
8
|
+
+ellipsis
|
9
|
+
p.date
|
10
|
+
$use-mozilla-ellipsis-binding: true
|
11
|
+
+ellipsis
|
12
|
+
|
13
|
+
#article-top
|
14
|
+
h2
|
15
|
+
$use-mozilla-ellipsis-binding: true
|
16
|
+
+ellipsis
|
@@ -0,0 +1,92 @@
|
|
1
|
+
html
|
2
|
+
overflow-y: scroll
|
3
|
+
background: white
|
4
|
+
|
5
|
+
body
|
6
|
+
font-family: $proxima-nova
|
7
|
+
line-height: 1.25
|
8
|
+
color: $color-1
|
9
|
+
min-width: 820px
|
10
|
+
text-rendering: optimizeLegibility
|
11
|
+
-webkit-text-size-adjust: none
|
12
|
+
|
13
|
+
h1, h2, h3
|
14
|
+
font-weight: bold
|
15
|
+
.wf-active &
|
16
|
+
font-weight: 600
|
17
|
+
|
18
|
+
h1
|
19
|
+
font-size: 20px
|
20
|
+
|
21
|
+
h2
|
22
|
+
font-size: 18px
|
23
|
+
|
24
|
+
h3
|
25
|
+
font-size: 16px
|
26
|
+
|
27
|
+
p, ul, ol, li
|
28
|
+
font-size: 14px
|
29
|
+
|
30
|
+
a
|
31
|
+
+link-colors($color-1, $color-1, $color-1, $color-1, $color-1)
|
32
|
+
text-decoration: underline
|
33
|
+
|
34
|
+
strong
|
35
|
+
font-weight: bold
|
36
|
+
.wf-active &
|
37
|
+
font-weight: 600
|
38
|
+
|
39
|
+
a.link-button
|
40
|
+
font-size: 10px
|
41
|
+
line-height: 1
|
42
|
+
+hover-link
|
43
|
+
+inline-block
|
44
|
+
border: 1px solid $color-2
|
45
|
+
padding: 2px 8px
|
46
|
+
font-weight: bold
|
47
|
+
color: $color-2
|
48
|
+
width: auto
|
49
|
+
+border-radius(30px)
|
50
|
+
vertical-align: middle
|
51
|
+
background: $color-4
|
52
|
+
+background(linear-gradient(white, $color-3))
|
53
|
+
+text-shadow(rgba(white, 1) 0 1px 0)
|
54
|
+
&:hover
|
55
|
+
text-decoration: none
|
56
|
+
&:active
|
57
|
+
+background(linear-gradient($color-3, white))
|
58
|
+
|
59
|
+
img.visit-recorder
|
60
|
+
position: absolute
|
61
|
+
top: 0
|
62
|
+
left: 0
|
63
|
+
|
64
|
+
.border
|
65
|
+
border: 1px solid $color-2
|
66
|
+
+border-radius(4px)
|
67
|
+
+box-shadow(rgba($color-2, 0.3) 0 3px 0px)
|
68
|
+
|
69
|
+
.clearfix
|
70
|
+
+clearfix
|
71
|
+
|
72
|
+
.center
|
73
|
+
text-align: center
|
74
|
+
|
75
|
+
.upcase
|
76
|
+
text-transform: uppercase
|
77
|
+
|
78
|
+
.center
|
79
|
+
text-align: center
|
80
|
+
|
81
|
+
.clearfix
|
82
|
+
+clearfix
|
83
|
+
|
84
|
+
.clear
|
85
|
+
clear: both
|
86
|
+
|
87
|
+
.hidden
|
88
|
+
display: none
|
89
|
+
visibility: hidden
|
90
|
+
|
91
|
+
.cursor-move
|
92
|
+
cursor: move
|
@@ -0,0 +1,75 @@
|
|
1
|
+
.qq-uploader
|
2
|
+
position: relative
|
3
|
+
|
4
|
+
.qq-upload-button
|
5
|
+
display: block
|
6
|
+
color: $color-1
|
7
|
+
border: 1px solid $color-2
|
8
|
+
text-align: center
|
9
|
+
padding: 10px 0
|
10
|
+
height: 20px
|
11
|
+
line-height: 20px
|
12
|
+
font-weight: 600
|
13
|
+
font-size: 16px
|
14
|
+
|
15
|
+
.qq-upload-button-hover
|
16
|
+
|
17
|
+
.qq-upload-button-focus
|
18
|
+
outline: 1px dotted black
|
19
|
+
|
20
|
+
.qq-upload-drop-area
|
21
|
+
position: absolute
|
22
|
+
top: 0
|
23
|
+
left: 0
|
24
|
+
width: 100%
|
25
|
+
height: 20px
|
26
|
+
padding: 10px 0
|
27
|
+
border: 1px solid $color-2
|
28
|
+
background: white
|
29
|
+
z-index: 2
|
30
|
+
text-align: center
|
31
|
+
span
|
32
|
+
display: block
|
33
|
+
position: absolute
|
34
|
+
top: 0
|
35
|
+
left: 0
|
36
|
+
width: 100%
|
37
|
+
height: 20px
|
38
|
+
line-height: 20px
|
39
|
+
padding: 10px 0
|
40
|
+
font-size: 13px
|
41
|
+
text-align: center
|
42
|
+
|
43
|
+
.qq-upload-drop-area-active
|
44
|
+
background: $color-4
|
45
|
+
|
46
|
+
.qq-upload-list
|
47
|
+
padding: 0
|
48
|
+
list-style: disc
|
49
|
+
list-style-position: outside
|
50
|
+
li
|
51
|
+
margin-top: 10px
|
52
|
+
padding: 0
|
53
|
+
line-height: 15px
|
54
|
+
font-size: 12px
|
55
|
+
|
56
|
+
.qq-upload-file, .qq-upload-spinner, .qq-upload-size, .qq-upload-cancel, .qq-upload-failed-text
|
57
|
+
margin-right: 7px
|
58
|
+
|
59
|
+
.qq-upload-file
|
60
|
+
|
61
|
+
.qq-upload-spinner
|
62
|
+
display: inline-block
|
63
|
+
background: url("/concen/images/fileuploader-loading.gif")
|
64
|
+
width: 15px
|
65
|
+
height: 15px
|
66
|
+
vertical-align: text-bottom
|
67
|
+
|
68
|
+
.qq-upload-size, .qq-upload-cancel
|
69
|
+
font-size: 11px
|
70
|
+
|
71
|
+
.qq-upload-failed-text
|
72
|
+
display: none
|
73
|
+
|
74
|
+
.qq-upload-fail .qq-upload-failed-text
|
75
|
+
display: inline
|
@@ -0,0 +1,74 @@
|
|
1
|
+
form
|
2
|
+
input[type=text], input[type=password]
|
3
|
+
font-family: $proxima-nova
|
4
|
+
|
5
|
+
form
|
6
|
+
+clearfix
|
7
|
+
.field
|
8
|
+
+clearfix
|
9
|
+
margin-bottom: $standard-gap/2
|
10
|
+
&.text-editor
|
11
|
+
overflow: visible
|
12
|
+
span.align
|
13
|
+
line-height: 30px
|
14
|
+
font-size: 12px
|
15
|
+
vertical-align: middle
|
16
|
+
visibility: hidden
|
17
|
+
.actions
|
18
|
+
margin-left: 160px
|
19
|
+
a
|
20
|
+
font-size: 13px
|
21
|
+
margin-left: 10px
|
22
|
+
+hover-link
|
23
|
+
.actions.flush
|
24
|
+
margin-left: 0
|
25
|
+
label
|
26
|
+
font-size: 13px
|
27
|
+
float: left
|
28
|
+
width: 160px
|
29
|
+
display: block
|
30
|
+
font-weight: 400
|
31
|
+
line-height: 28px
|
32
|
+
label.blank
|
33
|
+
text-indent: -9999px
|
34
|
+
font-size: 14px
|
35
|
+
line-height: normal
|
36
|
+
label.inline
|
37
|
+
font-size: 13px
|
38
|
+
width: auto
|
39
|
+
float: none
|
40
|
+
display: inline
|
41
|
+
line-height: normal
|
42
|
+
vertical-align: middle
|
43
|
+
input[type=text], input[type=password], textarea
|
44
|
+
border: 1px solid $color-2
|
45
|
+
+border-radius(4px)
|
46
|
+
+box-shadow(rgba($color-2, 0.3) 0 2px 2px inset)
|
47
|
+
height: 16px
|
48
|
+
line-height: 16px
|
49
|
+
padding: 5px
|
50
|
+
color: $color-1
|
51
|
+
min-width: 400px
|
52
|
+
font-size: 13px
|
53
|
+
outline: 0
|
54
|
+
margin: 0
|
55
|
+
display: block
|
56
|
+
background: none
|
57
|
+
input[type=checkbox], input[type=radio]
|
58
|
+
margin: 0 3px 0 0
|
59
|
+
padding: 0
|
60
|
+
vertical-align: middle
|
61
|
+
textarea
|
62
|
+
height: 48px
|
63
|
+
textarea.tall
|
64
|
+
height: 300px
|
65
|
+
#errorExplanation ul
|
66
|
+
margin: $standard-gap/2 0 $standard-gap/2 0
|
67
|
+
li
|
68
|
+
font-size: 12px
|
69
|
+
list-style: disc inside
|
70
|
+
line-height: 18px
|
71
|
+
color: red
|
72
|
+
|
73
|
+
form.edit_child
|
74
|
+
width: 60%
|
@@ -0,0 +1,17 @@
|
|
1
|
+
// Colors.
|
2
|
+
|
3
|
+
$color-1: hsl(230, 60%, 20%) // #141F52
|
4
|
+
$color-2: hsl(230, 20%, 60%) // #858BAD
|
5
|
+
$color-3: hsl(230, 20%, 94%) // #EDEEF3
|
6
|
+
$color-4: hsl(230, 20%, 96%) // #F3F3F7
|
7
|
+
$color-5: hsl(230, 20%, 88%) // #DADCE7
|
8
|
+
$gray-20: hsl(0, 0%, 20%)
|
9
|
+
$gray-60: hsl(0, 0%, 60%)
|
10
|
+
$gray-80: hsl(0, 0%, 80%)
|
11
|
+
$gray-90: hsl(0, 0%, 90%)
|
12
|
+
|
13
|
+
$shadow-size: 4px
|
14
|
+
|
15
|
+
$proxima-nova: "proxima-nova", "Helvetica Neue", Helvetica, Arial, sans-serif
|
16
|
+
|
17
|
+
$standard-gap: 30px
|
@@ -0,0 +1,15 @@
|
|
1
|
+
= form_for [@page, @grid_file], :url => concen_page_grid_file_path(@page, @grid_file), :html => {:class => "with-text-editor wide"} do |f|
|
2
|
+
- if @grid_file.errors.any?
|
3
|
+
#errorExplanation
|
4
|
+
%h3= "#{pluralize(@page.errors.count, "error")} prohibited this parent from being saved:"
|
5
|
+
%ul
|
6
|
+
- @page.errors.full_messages.each do |msg|
|
7
|
+
%li= msg
|
8
|
+
.field.text-editor
|
9
|
+
.border
|
10
|
+
#text-editor.wide
|
11
|
+
= text_area_tag :concen_grid_file_page, @grid_file.read.force_encoding("utf-8"), :class => "text-editor-content hidden"
|
12
|
+
.actions.flush
|
13
|
+
= f.submit "Save"
|
14
|
+
= link_to "Delete", concen_page_grid_file_path(@page, @grid_file), :method => :delete
|
15
|
+
= link_to "Cancel", edit_concen_page_path(@page)
|
@@ -0,0 +1,9 @@
|
|
1
|
+
- content_for :head_javascripts do
|
2
|
+
= javascript_include_tag "/concen/javascripts/ace/ace.js"
|
3
|
+
= javascript_include_tag "/concen/javascripts/fileuploader.js"
|
4
|
+
= javascript_include_tag "/concen/javascripts/page.js"
|
5
|
+
|
6
|
+
#content
|
7
|
+
%h1= "Edit #{@grid_file.original_filename}"
|
8
|
+
.clearfix
|
9
|
+
= render "form"
|
@@ -0,0 +1,7 @@
|
|
1
|
+
%ul
|
2
|
+
- files.each_with_index do |file, index|
|
3
|
+
%li
|
4
|
+
= link_to "#{file.original_filename} (#{number_to_human_size(file.size)})", file.url(root_url), :class => "filename", "data-path" => file.path
|
5
|
+
- if file.text?
|
6
|
+
= link_to "Edit", edit_concen_page_grid_file_path(file.page, file)
|
7
|
+
= link_to "Delete", concen_page_grid_file_path(file.page, file), :class => "delete"
|
@@ -0,0 +1,24 @@
|
|
1
|
+
.files
|
2
|
+
.stylesheets
|
3
|
+
%h3
|
4
|
+
%span Stylesheets
|
5
|
+
= link_to "New", concen_page_grid_files_path(@page, :file_type => "css"), :class => "link-button new-file"
|
6
|
+
- if @page.stylesheets.any?
|
7
|
+
= render :partial => "concen/pages/file_list", :locals => {:files => @page.stylesheets}
|
8
|
+
|
9
|
+
.javascripts
|
10
|
+
%h3
|
11
|
+
%span JavaScripts
|
12
|
+
= link_to "New", concen_page_grid_files_path(@page, :file_type => "js"), :class => "link-button new-file"
|
13
|
+
- if @page.javascripts.any?
|
14
|
+
= render :partial => "concen/pages/file_list", :locals => {:files => @page.javascripts}
|
15
|
+
|
16
|
+
- if @page.images.any?
|
17
|
+
.images
|
18
|
+
%h3 Images
|
19
|
+
= render :partial => "concen/pages/file_list", :locals => {:files => @page.images}
|
20
|
+
|
21
|
+
- if @page.others.any?
|
22
|
+
.others
|
23
|
+
%h3 Others
|
24
|
+
= render :partial => "concen/pages/file_list", :locals => {:files => @page.others}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
= form_for @page, {:html => {:class => "with-text-editor #{'wide' if !@page.persisted?}"}} do |f|
|
2
|
+
- if @page.errors.any?
|
3
|
+
#errorExplanation
|
4
|
+
%h3= "#{pluralize(@page.errors.count, "error")} prohibited this parent from being saved:"
|
5
|
+
%ul
|
6
|
+
- @page.errors.full_messages.each do |msg|
|
7
|
+
%li= msg
|
8
|
+
.field.text-editor
|
9
|
+
.border
|
10
|
+
#text-editor
|
11
|
+
= f.text_area :raw_text, :class => "text-editor-content hidden"
|
12
|
+
= f.hidden_field :parent_id
|
13
|
+
= f.hidden_field :level
|
14
|
+
.actions.flush
|
15
|
+
= f.submit "Save"
|
16
|
+
- if @page.persisted?
|
17
|
+
= link_to "Delete", concen_page_path(@page), :method => :delete
|
18
|
+
= link_to "Cancel", concen_pages_path
|
@@ -0,0 +1,15 @@
|
|
1
|
+
- if root && page.level == 0
|
2
|
+
- children = [page]
|
3
|
+
- else
|
4
|
+
- children = Concen::Page.where(:parent_id => page.id).asc(:position)
|
5
|
+
%ul{:class => children.first.level == 0 && "pages", :data => {:level => children.first.level}}
|
6
|
+
- for child in children
|
7
|
+
%li{:data => {:id => "page-#{child.id}"}}
|
8
|
+
%p
|
9
|
+
%span.handle
|
10
|
+
= link_to child.title, edit_concen_page_path(child), :class => "title"
|
11
|
+
= link_to "Add", new_concen_page_path(:level => child.level + 1, :parent_id => child.id), :class => "link-button hidden"
|
12
|
+
= link_to "Edit", edit_concen_page_path(child), :class => "link-button hidden"
|
13
|
+
= link_to "Delete", concen_page_path(child), :method => :delete, :confirm => "Are you sure?", :class => "link-button hidden"
|
14
|
+
- if Concen::Page.where(:parent_id => child.id).count > 0
|
15
|
+
= render :partial => "nested_list", :locals => {:page => child, :root => false}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
- content_for :head_javascripts do
|
2
|
+
= javascript_include_tag "/concen/javascripts/ace/ace.js"
|
3
|
+
= javascript_include_tag "/concen/javascripts/fileuploader.js"
|
4
|
+
= javascript_include_tag "/concen/javascripts/page.js"
|
5
|
+
|
6
|
+
#content
|
7
|
+
%h1 Edit Page
|
8
|
+
= render "form"
|
9
|
+
#file-manager
|
10
|
+
.border
|
11
|
+
#file-uploader{:data => {"upload-path" => upload_concen_page_grid_files_path(@page)}}
|
12
|
+
%noscript
|
13
|
+
%p Please enable JavaScript to use file uploader.
|
14
|
+
= render "files"
|
15
|
+
.clear
|
@@ -0,0 +1,9 @@
|
|
1
|
+
- content_for :head_javascripts do
|
2
|
+
= javascript_include_tag "/concen/javascripts/page.js"
|
3
|
+
|
4
|
+
#content
|
5
|
+
%h1 Pages
|
6
|
+
- if @page
|
7
|
+
= render :partial => "nested_list", :locals => {:page => @page, :root => true}
|
8
|
+
- else
|
9
|
+
= link_to "New Page", new_concen_page_path(:level => 0)
|