trusty-multi-site-extension 2.0.0.pre.beta → 2.0.1.pre.beta

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YWIxODlhMmY0ODI2ODU0NTRiYTMzN2RmOGI2ZDU5ZDcxODQxNDJjYQ==
4
+ N2NmZTgwZWQ2NWE3MmIzOWY1MjVjZGYwNjZmOGY3MWZiMTIzMzRkNg==
5
5
  data.tar.gz: !binary |-
6
- MzUyN2E3ZWNjYzNjZGU2YmIyMjM3OGJhN2Y1Yzg0NTljODhlNmE5Yg==
6
+ YjgwNTlmMGNhMDkyZjgzMDc2ZTIwNmMzNjMzZjRmNGE0MWRhODczNA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZGFkNmQ2NjQwZjRjNjQzM2YzMjdhMWM3Y2I2Y2U1ZWZkYmU2YTUwY2FjYWU0
10
- NTBjODMyMWZhMDgxMWEwNjcwMjQxNzg3NzAxY2I5NzZkMGY4MDU3NDFjN2Mz
11
- MmMyODI2OTJlNjg5ODQxNmVmZDFiOTRjODlhNmZlNGU5NDMxZTI=
9
+ MzE4MWUyYTEwMWQ5MjVhZjQ4YjFhOWNiNjk4YmI5NGI1YzNkMjA0YWY3Mzgw
10
+ ZjUyZjhkZDEwMDVlOTU1YTgyMjFmMjBkZjQwYjc4Njc0YTk4NzFlN2MyOGVk
11
+ YjIxMGM4ODEyMDUwYzRmODEwYWI0NzA2NDFkZGVmMWMzMDgzMzA=
12
12
  data.tar.gz: !binary |-
13
- NTk3MzI1Y2YxMjJmNWEyYTU5MzAyYzQ5MjA3NGMyNDM4NmRhMjdiNWNiOTdi
14
- MGVjOTEyZjE5Yjc0ZjVmNTRlMzQ2NDlkOGM2NDFiN2ZiY2Q4M2JhNDMwZTM4
15
- ODgyOTZhYjA1N2YwMDk3NDJhZTI2ZGI0YmFkNDAwZDMxMmFjYmQ=
13
+ MTE4OTM5NDUwZmM2NWI5ODc2Y2ViNGEyMmEwNGY3M2NhMGQwYzc4M2U1MmJk
14
+ ZWFhOWE4YjhjYzBkZjAyODBmYWQ2MmEyYjljZDMxNGJmM2RmYjUzNGYxOTlh
15
+ MGQxZGJjMDUyZjgxYmRhMzNkYmQyZWI5NmRhODhlMzc4NTE2MTg=
@@ -0,0 +1,52 @@
1
+ #content table.index tr.node td {
2
+ padding: .5em;
3
+ }
4
+
5
+ #content table.index .node .site small {
6
+ color: #666;
7
+ font-size: 90%;
8
+ font-style: italic;
9
+ font-weight: normal;
10
+ margin-left: .5em;
11
+ }
12
+
13
+ #content table.index .node .site a, #content table.index .node .site a:visited {
14
+ font-size: 115%;
15
+ font-weight: bold;
16
+ color: black;
17
+ text-decoration: none;
18
+ }
19
+
20
+ #content .form-area p.domain {
21
+ float: left;
22
+ width: 40%;
23
+ margin: 1em 1em 0 0;
24
+ overflow: hidden;
25
+ }
26
+
27
+ #content .form-area p.subtitle {
28
+ margin: 1em 0 0 0;
29
+ }
30
+
31
+ #content .form-area p.domain label, #content .form-area p.homepage label {
32
+ display: block;
33
+ position: relative;
34
+ }
35
+
36
+ #content div.form-area p.domain .textbox, #content div.form-area p.homepage .textbox, #content div.form-area p.subtitle .textbox, #content div.form-area p.subtitle select {
37
+ font-family: Georgia,Palatino,"Times New Roman",Times,serif;
38
+ font-size: 140%;
39
+ width: 100%;
40
+ }
41
+
42
+ #content div.form-area p.homepage {
43
+ float: right;
44
+ width: 16%;
45
+ margin: 1em 0 0 0;
46
+ overflow: hidden;
47
+ }
48
+
49
+ p.formnote {
50
+ clear: both;
51
+ padding: 2em 0;
52
+ }
@@ -0,0 +1,96 @@
1
+ #site_chooser{
2
+ width: 20%;
3
+ border-collapse: collapse;
4
+ float: right;
5
+ }
6
+
7
+
8
+ /* BE SURE TO INCLUDE THE CSS RESET FOUND IN THE DEMO PAGE'S CSS */
9
+ /*------------------------------------*\
10
+ NAV
11
+ \*------------------------------------*/
12
+ #nav{
13
+ list-style:none;
14
+ font-weight:bold;
15
+ margin-bottom:10px;
16
+ /* Clear floats */
17
+ width:100%;
18
+ padding-top: 10px;
19
+ padding-bottom: 10px;
20
+ padding-left: 5px;
21
+ margin: 0px;
22
+ cursor: pointer;
23
+ /* Bring the nav above everything else--uncomment if needed.
24
+ position:relative;
25
+ z-index:5;
26
+ */
27
+ }
28
+ #nav li{
29
+ margin-right:10px;
30
+ position:relative;
31
+ color: #66d9e0;
32
+ }
33
+ #nav a{
34
+ display:block;
35
+ padding:5px;
36
+ color:#fff;
37
+ background:#000;
38
+ text-decoration:none;
39
+ }
40
+ #nav a:hover{
41
+ color:#fff;
42
+ background:#000;
43
+ text-decoration:underline;
44
+ }
45
+
46
+ /*--- DROPDOWN ---*/
47
+
48
+ #nav ul{
49
+ background:#fff; /* Adding a background makes the dropdown work properly in IE7+. Make this as close to your page's background as possible (i.e. white page == white background). */
50
+ background:rgba(255,255,255,0); /* But! Let's make the background fully transparent where we can, we don't actually want to see it if we can help it... */
51
+ list-style:none;
52
+ position:absolute;
53
+ /*left:-9999px;*/ /* Hide off-screen when not needed (this is more accessible than display:none;) */
54
+ margin-top:10px;
55
+ visibility: hidden;
56
+ opacity: 0;
57
+ -webkit-transition: opacity 0.2s;
58
+ -moz-transition: opacity 0.2s;
59
+ -ms-transition: opacity 0.2s;
60
+ -o-transition: opacity 0.2s;
61
+ transition: opacity 0.2s;
62
+
63
+ }
64
+ #nav ul li{
65
+ float:none;
66
+ }
67
+ #nav ul a{
68
+ white-space:nowrap; /* Stop text wrapping and creating multi-line dropdown items */
69
+ }
70
+ #nav:hover ul{ /* Display the dropdown on hover */
71
+ visibility: visible;
72
+ opacity: 1;
73
+ -webkit-transition: opacity 0.2s;
74
+ -moz-transition: opacity 0.2s;
75
+ -ms-transition: opacity 0.2s;
76
+ -o-transition: opacity 0.2s;
77
+ transition: opacity 0.2s;
78
+ /*left:0;*/ /* Bring back on-screen when needed */
79
+ z-index: 99999;
80
+
81
+ }
82
+ #nav li:hover a{ /* These create persistent hover states, meaning the top-most link stays 'hovered' even when your cursor has moved down the list. */
83
+ background:#000;
84
+ text-decoration:underline;
85
+ }
86
+ #nav li:hover ul a{ /* The persistent hover state does however create a global style for links even before they're hovered. Here we undo these effects. */
87
+ text-decoration:none;
88
+ }
89
+ #nav a.site-link:hover { /* Here we define the most explicit hover states--what happens when you hover each individual link. */
90
+ color: #66d9e0;
91
+ -webkit-transition: all 0.2s;
92
+ -moz-transition: all 0.2s;
93
+ -ms-transition: all 0.2s;
94
+ -o-transition: all 0.2s;
95
+ transition: all 0.2s;
96
+ }
@@ -1,121 +1,5 @@
1
- #content table.index tr.node td {
2
- padding: .5em;
3
- }
1
+ @import "multi_site_main";
2
+ @import "site_chooser";
4
3
 
5
- #content table.index .node .site small {
6
- color: #666;
7
- font-size: 90%;
8
- font-style: italic;
9
- font-weight: normal;
10
- margin-left: .5em;
11
- }
12
4
 
13
- #content table.index .node .site a, #content table.index .node .site a:visited {
14
- font-size: 115%;
15
- font-weight: bold;
16
- color: black;
17
- text-decoration: none;
18
- }
19
5
 
20
- #content .form-area p.domain {
21
- float: left;
22
- width: 40%;
23
- margin: 1em 1em 0 0;
24
- overflow: hidden;
25
- }
26
-
27
- #content .form-area p.subtitle {
28
- margin: 1em 0 0 0;
29
- }
30
-
31
- #content .form-area p.domain label, #content .form-area p.homepage label {
32
- display: block;
33
- position: relative;
34
- }
35
-
36
- #content div.form-area p.domain .textbox, #content div.form-area p.homepage .textbox, #content div.form-area p.subtitle .textbox, #content div.form-area p.subtitle select {
37
- font-family: Georgia,Palatino,"Times New Roman",Times,serif;
38
- font-size: 140%;
39
- width: 100%;
40
- }
41
-
42
- #content div.form-area p.homepage {
43
- float: right;
44
- width: 16%;
45
- margin: 1em 0 0 0;
46
- overflow: hidden;
47
- }
48
-
49
- p.formnote {
50
- clear: both;
51
- padding: 2em 0;
52
- }
53
-
54
-
55
- /* BE SURE TO INCLUDE THE CSS RESET FOUND IN THE DEMO PAGE'S CSS */
56
- /*------------------------------------*\
57
- NAV
58
- \*------------------------------------*/
59
- #nav{
60
- list-style:none;
61
- font-weight:bold;
62
- margin-bottom:10px;
63
- /* Clear floats */
64
- width:100%;
65
- padding-top: 10px;
66
- padding-bottom: 10px;
67
- padding-left: 5px;
68
- margin: 0px;
69
- /* Bring the nav above everything else--uncomment if needed.
70
- position:relative;
71
- z-index:5;
72
- */
73
- }
74
- #nav li{
75
- margin-right:10px;
76
- position:relative;
77
- }
78
- #nav a{
79
- display:block;
80
- padding:5px;
81
- color:#fff;
82
- background:#333;
83
- text-decoration:none;
84
- }
85
- #nav a:hover{
86
- color:#fff;
87
- background:#CC494C;
88
- text-decoration:underline;
89
- }
90
-
91
- /*--- DROPDOWN ---*/
92
-
93
- #nav ul{
94
- background:#fff; /* Adding a background makes the dropdown work properly in IE7+. Make this as close to your page's background as possible (i.e. white page == white background). */
95
- background:rgba(255,255,255,0); /* But! Let's make the background fully transparent where we can, we don't actually want to see it if we can help it... */
96
- list-style:none;
97
- position:absolute;
98
- left:-9999px; /* Hide off-screen when not needed (this is more accessible than display:none;) */
99
- }
100
- #nav ul li{
101
- padding-top:1px; /* Introducing a padding between the li and the a give the illusion spaced items */
102
- float:none;
103
- }
104
- #nav ul a{
105
- white-space:nowrap; /* Stop text wrapping and creating multi-line dropdown items */
106
- }
107
- #nav li:hover ul{ /* Display the dropdown on hover */
108
- left:0; /* Bring back on-screen when needed */
109
- z-index: 99999;
110
-
111
- }
112
- #nav li:hover a{ /* These create persistent hover states, meaning the top-most link stays 'hovered' even when your cursor has moved down the list. */
113
- background:#CC494C;
114
- text-decoration:underline;
115
- }
116
- #nav li:hover ul a{ /* The persistent hover state does however create a global style for links even before they're hovered. Here we undo these effects. */
117
- text-decoration:none;
118
- }
119
- #nav li:hover ul li a:hover{ /* Here we define the most explicit hover states--what happens when you hover each individual link. */
120
- background:#333;
121
- }
@@ -1,2 +1,11 @@
1
1
  = stylesheet_link_tag 'admin/multi_site'
2
- = sites_chooser_thing.html_safe
2
+
3
+ - if admin? && defined?(Site) && defined?(controller) && controller.sited_model? && controller.template_name == 'index' && Site.several?
4
+ %nav#site_chooser
5
+ %ul#nav
6
+ %li
7
+ = "Current Site: #{current_site.name}"
8
+ %ul.expansion
9
+ - Site.all.each do |site|
10
+ %li
11
+ = link_to( site.name, "#{request.path}?site_id=#{site.id}", :class => site == current_site ? 'fg site-link' : 'site-link')
@@ -3,27 +3,34 @@
3
3
  - render_region :form do |form|
4
4
 
5
5
  - form.edit_name do
6
- %p.title
6
+ %fieldset.title
7
+ %h1
8
+ %i.fa.fa-sitemap
9
+ Site Information
7
10
  %label{:for => "site_name"} Site title
8
- = f.text_field :name, :class => "textbox"
9
-
10
- %p.subtitle
11
+ = f.text_field :name, :class => "textbox", :size => 50
12
+ %br
11
13
  %label{:for => "site_subtitle"} and subtitle
12
14
  = f.text_field :subtitle, :class => "textbox"
13
-
14
15
 
15
16
  - form.edit_domain do
16
- %p.domain
17
- %label{:for => "site_domain"}
17
+ %fieldset.domain
18
+ %h1
19
+ %i.fa.fa-lightbulb-o
20
+ Domain Information
21
+ %label{:for => "site_domain"}
18
22
  Domain pattern
19
- = f.text_field :domain, :class => "textbox"
20
- %p.domain
21
- %label{:for => "site_base_domain"}
23
+ = f.text_field :domain, :class => "textbox", :size => 50
24
+ %br
25
+ %label{:for => "site_base_domain"}
22
26
  Base domain name
23
- = f.text_field :base_domain, :class => "textbox"
24
-
27
+ = f.text_field :base_domain, :class => "textbox", :size => 50
28
+
25
29
  - form.edit_homepage do
26
- %p.homepage
30
+ %fieldset.homepage
31
+ %h1
32
+ %i.fa.fa-home
33
+ Homepage ID
27
34
  %label{:for => "site_homepage_id"} Homepage ID
28
35
  = f.text_field :homepage_id, :class => "textbox"
29
36
 
@@ -30,9 +30,9 @@ class MultiSiteExtension < TrustyCms::Extension
30
30
  Admin::PagesController.send :include, MultiSite::PagesControllerExtensions
31
31
  Admin::ResourceController.send :helper, MultiSite::SiteChooserHelper
32
32
  Admin::PagesController.send :helper, MultiSite::SiteChooserHelper
33
- admin.layouts.index.add(:top, "site_chooser")
34
- admin.pages.index.add(:top, "admin/layouts/site_chooser")
35
- admin.snippets.index.add(:top, "admin/layouts/site_chooser")
33
+ admin.layouts.index.add(:before_nav, "admin/layouts/site_chooser")
34
+ admin.pages.index.add(:before_nav, "admin/layouts/site_chooser")
35
+ admin.snippets.index.add(:before_nav, "admin/layouts/site_chooser")
36
36
  Layout.send :is_site_scoped
37
37
  Snippet.send :is_site_scoped
38
38
  User.send :is_site_scoped, :shareable => true
@@ -4,7 +4,7 @@ require "trusty-multi-site-extension"
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "trusty-multi-site-extension"
7
- s.version = "2.0.0-beta"
7
+ s.version = "2.0.1-beta"
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.authors = ["Sean Cribbs", "Eric Sipple", "Danielle Greaves"]
10
10
  s.description = %q{Extends Trusty CMS Layouts to support multiple sites, defined by domain}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trusty-multi-site-extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre.beta
4
+ version: 2.0.1.pre.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Cribbs
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-07-21 00:00:00.000000000 Z
13
+ date: 2015-08-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: acts_as_list
@@ -69,8 +69,9 @@ files:
69
69
  - app/assets/images/admin/move_to_bottom.png
70
70
  - app/assets/images/admin/move_to_top.png
71
71
  - app/assets/images/admin/remove.png
72
+ - app/assets/stylesheets/admin/_multi_site_main.scss
73
+ - app/assets/stylesheets/admin/_site_chooser.scss
72
74
  - app/assets/stylesheets/admin/multi_site.scss
73
- - app/assets/stylesheets/admin/site_chooser.scss
74
75
  - app/controllers/admin/sites_controller.rb
75
76
  - app/helpers/scoped_helper.rb
76
77
  - app/helpers/sites_helper.rb
File without changes