esp-views 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2012 YOURNAME
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,28 @@
1
+ = EspViews
2
+
3
+ == Usage
4
+
5
+ Gemfile
6
+
7
+ gem 'esp-views'
8
+
9
+ Layout
10
+
11
+ <body>
12
+ <%= render :partial => "esp/views/header" %>
13
+ ...
14
+ <%= yield %>
15
+ ...
16
+ <%= render :partial => "esp/views/footer" %>
17
+ </body>
18
+
19
+ Stylesheet
20
+
21
+ *= require ...
22
+ *= require esp/views // common styles
23
+ *= require custom_esp_views // customize styles
24
+ */
25
+
26
+ == License
27
+
28
+ This project rocks and uses MIT-LICENSE.
data/Rakefile ADDED
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env rake
2
+ begin
3
+ require 'bundler/setup'
4
+ rescue LoadError
5
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
+ end
7
+ begin
8
+ require 'rdoc/task'
9
+ rescue LoadError
10
+ require 'rdoc/rdoc'
11
+ require 'rake/rdoctask'
12
+ RDoc::Task = Rake::RDocTask
13
+ end
14
+
15
+ RDoc::Task.new(:rdoc) do |rdoc|
16
+ rdoc.rdoc_dir = 'rdoc'
17
+ rdoc.title = 'EspViews'
18
+ rdoc.options << '--line-numbers'
19
+ rdoc.rdoc_files.include('README.rdoc')
20
+ rdoc.rdoc_files.include('lib/**/*.rb')
21
+ end
22
+
23
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,84 @@
1
+ @import 'compass/utilities'
2
+ @import 'compass/css3'
3
+
4
+ $esp_views_body_margin_top: 35px !default
5
+ $esp_views_body_margin_bottom: 40px !default
6
+
7
+ $esp_views_font_size: 11px !default
8
+ $esp_views_font_family: Arial, Verdana, sans-serif !default
9
+
10
+ $esp_views_text_color: #000 !default
11
+ $esp_views_background_color: window !default
12
+ $esp_views_link_color: #031074 !default
13
+ $esp_views_underline_link: true !default
14
+ $esp_views_hover_link_color: #000055 !default
15
+ $esp_views_underline_hover_link: false !default
16
+
17
+ body
18
+ margin-top: $esp_views_body_margin_top
19
+ margin-bottom: $esp_views_body_margin_bottom
20
+
21
+ =fixed_block
22
+ +nested-reset
23
+ +single-box-shadow
24
+ font-size: $esp_views_font_size
25
+ font-family: $esp_views_font_family
26
+ background-color: $esp_views_background_color
27
+ line-height: 1.5
28
+ color: $esp_views_text_color
29
+ position: fixed
30
+ width: 100%
31
+ z-index: 99999
32
+ a
33
+ color: $esp_views_link_color
34
+ @if $esp_views_underline_link
35
+ text-decoration: underline
36
+ @else
37
+ text-decoration: none
38
+ &:hover
39
+ color: $esp_views_hover_link_color
40
+ @if $esp_views_underline_hover_link
41
+ text-decoration: underline
42
+ @else
43
+ text-decoration: none
44
+ &.selected
45
+ color: $esp_views_text_color
46
+ @if $esp_views_underline_link
47
+ text-decoration: none
48
+ @else
49
+ text-decoration: underline
50
+
51
+ .esp_views_header_wrapper
52
+ +fixed_block
53
+ top: 0
54
+ left: 0
55
+ border-bottom: 1px solid #999
56
+
57
+ .esp_views_header
58
+ +clearfix
59
+ margin: 5px 10px
60
+ .navigation
61
+ float: left
62
+ a
63
+ margin-right: 5px
64
+ .auth
65
+ float: right
66
+ .current_user
67
+ margin-right: 5px
68
+
69
+
70
+ .esp_views_footer_wrapper
71
+ +fixed_block
72
+ bottom: 0
73
+ left: 0
74
+ border-top: 1px solid #999
75
+
76
+ .esp_views_footer
77
+ +clearfix
78
+ margin: 5px 10px
79
+ .info
80
+ float: left
81
+ .developer
82
+ float: right
83
+ .range
84
+ margin-right: 5px
@@ -0,0 +1,11 @@
1
+ <div class='esp_views_footer_wrapper'>
2
+ <div class='esp_views_footer'>
3
+ <div class='info'>
4
+ <%= request.env['HTTP_USER_AGENT'] %>
5
+ </div>
6
+ <div class='developer'>
7
+ <span class='range'>2011&ndash;<%= Date.today.year %></span>
8
+ <a href='http://openteam.ru/' title='Сделано с любовью в OpenTeam'>OpenTeam</a>
9
+ </div>
10
+ </div>
11
+ </div>
@@ -0,0 +1,26 @@
1
+ <div class='esp_views_header_wrapper'>
2
+ <div class='esp_views_header'>
3
+ <% if current_user %>
4
+ <% controller_namespace = controller_path.split('/').map(&:inquiry) %>
5
+ <div class='navigation'>
6
+ <% if can? :manage, :application %>
7
+ <%= link_to 'Публичный вид', '/', :class => controller_namespace[0].manage? || controller_namespace[0].esp_views? ? nil : 'selected' %>
8
+ <% if content_for?(:esp_views_manage_links) %>
9
+ <%= yield(:esp_views_manage_links) %>
10
+ <% else %>
11
+ <%= link_to 'Система управления', '/manage', :class => controller_namespace[0].manage? ? 'selected' : nil %>
12
+ <% end %>
13
+ <% end %>
14
+ <% if can? :manage, :permissions %>
15
+ <%= link_to 'Права доступа', esp_views.root_path, :class => controller_namespace[0].esp_views? && controller_name != 'audits'? 'selected' : nil %>
16
+ <% end %>
17
+ <% if can? :manage, :audits %>
18
+ <%= link_to 'Журнал операций', esp_views.audits_path, :class => controller_namespace[0].esp_views? && controller_name == 'audits' ? 'selected' : nil %>
19
+ <% end %>
20
+ </div>
21
+ <% end %>
22
+ <div class='auth'>
23
+ <%= render :partial => 'sso-auth/shared/user_box' %>
24
+ </div>
25
+ </div>
26
+ </div>
@@ -0,0 +1,5 @@
1
+ module EspAuth
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace EspAuth
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ module EspViews
2
+ VERSION = "0.0.1"
3
+ end
data/lib/esp/views.rb ADDED
@@ -0,0 +1 @@
1
+ require "esp/views/engine"
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: esp-views
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - http://openteam.ru
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-12-14 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: sso-auth
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ description: Description of EspViews.
31
+ email:
32
+ - mail@openteam.ru
33
+ executables: []
34
+ extensions: []
35
+ extra_rdoc_files: []
36
+ files:
37
+ - app/assets/stylesheets/esp/views.sass
38
+ - app/views/esp/views/_footer.html.erb
39
+ - app/views/esp/views/_header.html.erb
40
+ - lib/esp/views/engine.rb
41
+ - lib/esp/views/version.rb
42
+ - lib/esp/views.rb
43
+ - MIT-LICENSE
44
+ - Rakefile
45
+ - README.rdoc
46
+ homepage:
47
+ licenses: []
48
+ post_install_message:
49
+ rdoc_options: []
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ! '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ segments:
59
+ - 0
60
+ hash: 2747464425254864179
61
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ! '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ segments:
68
+ - 0
69
+ hash: 2747464425254864179
70
+ requirements: []
71
+ rubyforge_project:
72
+ rubygems_version: 1.8.24
73
+ signing_key:
74
+ specification_version: 3
75
+ summary: Summary of EspViews.
76
+ test_files: []