meurio_ui 1.1.1 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ $(function(){
2
+ $('header.meurio_header .icon-arrow-box').click(function(e){ $('.other_apps').toggle(); e.stopPropagation(); return false; });
3
+ $(document).click(function(){ $('.other_apps').hide(); });
4
+
5
+ $('header.meurio_header .icon-triangle-down').click(function(e){ $('.current_user_links').toggle(); e.stopPropagation(); return false; });
6
+ $(document).click(function(){ $('.current_user_links').hide(); });
7
+ });
@@ -0,0 +1,118 @@
1
+ header.meurio_header
2
+ .row
3
+ overflow: visible
4
+ .meurio_logo_and_user_menu
5
+ background: $green
6
+ line-height: 35px
7
+ .meurio_logo
8
+ padding: 7px 0
9
+ .user_menu
10
+ text-align: right
11
+ color: white
12
+ position: relative
13
+ padding: 7px 0
14
+ .current_user
15
+ img
16
+ width: 35px
17
+ +border-radius(35px)
18
+ vertical-align: middle
19
+ margin-right: .5em
20
+ .icon-triangle-down
21
+ top: 6px
22
+ position: relative
23
+ margin-left: 1em
24
+ cursor: pointer
25
+ +user-select(none)
26
+ .current_user_links
27
+ position: absolute
28
+ top: 40px
29
+ background: $green
30
+ z-index: 1000
31
+ right: 0
32
+ display: none
33
+ a
34
+ display: block
35
+ padding: 0 1em
36
+ color: white
37
+
38
+ .meurio_apps_and_application_menu
39
+ line-height: 59px
40
+ .meurio_apps
41
+ cursor: pointer
42
+ position: relative
43
+ overflow: visible
44
+ padding: 10px 0
45
+ font-size: 20px
46
+ font-weight: bold
47
+ a
48
+ color: black
49
+ .current_app
50
+ img
51
+ vertical-align: middle
52
+ margin-right: .5em
53
+ float: left
54
+ span
55
+ display: block
56
+ float: left
57
+ span.icon-arrow-box
58
+ position: relative
59
+ top: 19px
60
+ margin-left: 1em
61
+ color: #a7a8ac
62
+ font-size: .9em
63
+ .other_apps
64
+ position: absolute
65
+ background: white
66
+ top: 79px
67
+ z-index: 1000
68
+ width: 600px
69
+ padding: 1em
70
+ display: none
71
+ .meurio_app
72
+ font-size: .7em
73
+ font-weight: normal
74
+ display: block
75
+ color: black
76
+ float: left
77
+ width: 80px
78
+ margin: 0 10px
79
+ text-align: center
80
+ line-height: normal
81
+ span
82
+ display: block
83
+ img
84
+ display: inline-block
85
+
86
+ .application_menu
87
+ text-align: right
88
+ padding: 10px 0
89
+ a
90
+ display: inline-block
91
+ margin-left: 1.5em
92
+ font-size: 16px
93
+ font-weight: bold
94
+ color: black
95
+ &.btn
96
+ background: $orange
97
+ color: white
98
+ padding: .5em
99
+ display: inline-block
100
+ width: auto
101
+ line-height: normal
102
+ &:hover
103
+ text-decoration: none
104
+ &:hover
105
+ text-decoration: underline
106
+
107
+ a.hollow_btn
108
+ color: white
109
+ border: 1px solid white
110
+ padding: 5px 10px
111
+ font-weight: bold
112
+ +border-radius(3px)
113
+ &:hover
114
+ color: $green
115
+ background: white
116
+
117
+ .clear
118
+ clear: both
@@ -1 +1,2 @@
1
1
  @import meurio_ui/icomoon
2
+ @import meurio_ui/meurio_header
@@ -0,0 +1,11 @@
1
+ require "meurio_ui/view_helpers"
2
+
3
+ module MeurioUi
4
+ module Rails
5
+ class Railtie < ::Rails::Railtie
6
+ initializer "meurio_ui.view_helpers" do
7
+ ActionView::Base.send :include, ViewHelpers
8
+ end
9
+ end
10
+ end
11
+ end
@@ -1,5 +1,5 @@
1
1
  module MeurioUi
2
2
  module Rails
3
- VERSION = "1.1.1"
3
+ VERSION = "1.2.1"
4
4
  end
5
5
  end
@@ -0,0 +1,79 @@
1
+ # coding: utf-8
2
+
3
+ module MeurioUi
4
+ module ViewHelpers
5
+ def meurio_header_for app
6
+ content_tag(:header, class: :meurio_header) do
7
+ meurio_brand_and_user_panel + application_menu
8
+ end
9
+ end
10
+
11
+ def meurio_brand_and_user_panel
12
+ content_tag(:div, class: :meurio_logo_and_user_menu) do
13
+ content_tag(:div, class: :row) do
14
+ content_tag(:div, class: :meurio_logo) do
15
+ link_to image_tag('meurio.png'), 'http://meurio.org.br/'
16
+ end +
17
+ content_tag(:div, class: :user_menu) do
18
+ if current_user.present?
19
+ content_tag(:div, class: :current_user) do
20
+ image_tag(current_user.avatar_url) + current_user.name + content_tag(:span, nil, class: 'icon-triangle-down')
21
+ end +
22
+ content_tag(:div, class: :current_user_links) do
23
+ link_to('Minhas campanhas', user_campaigns_path(current_user)) +
24
+ if can?(:moderate, Campaign)
25
+ link_to('Moderar campanhas', unmoderated_campaigns_path)
26
+ end +
27
+ if can?(:export, User)
28
+ link_to("Exportar todos os usuários", users_path(:format => :csv))
29
+ end
30
+ end
31
+ else
32
+ link_to 'Entrar', "http://accounts.meurio.org.br/?redirect_url=#{request.url}", class: :hollow_btn
33
+ end
34
+ end +
35
+ content_tag(:div, nil, class: :clear)
36
+ end
37
+ end
38
+ end
39
+
40
+ def application_menu
41
+ content_tag(:div, class: :meurio_apps_and_application_menu) do
42
+ content_tag(:div, class: :row) do
43
+ content_tag(:div, class: :meurio_apps) do
44
+ content_tag(:div, class: :current_app) do
45
+ link_to(root_path) do
46
+ image_tag('pdp.png') + content_tag(:span, 'Panela de Pressão')
47
+ end +
48
+ content_tag(:span, nil, class: 'icon-arrow-box')
49
+ end +
50
+ content_tag(:div, class: :other_apps) do
51
+ link_to('http://meurio.org.br/', class: :meurio_app) do
52
+ image_tag('mr.png') + content_tag(:span, 'Ação em Rede')
53
+ end +
54
+ link_to('http://paneladepressao.meurio.org.br/', class: :meurio_app) do
55
+ image_tag('pdp.png') + content_tag(:span, 'Panela de Pressão')
56
+ end +
57
+ link_to('http://imagine.meurio.org.br/', class: :meurio_app) do
58
+ image_tag('imagine.png') + content_tag(:span, 'Imagine')
59
+ end +
60
+ link_to('https://apoie.meurio.org.br/', class: :meurio_app) do
61
+ image_tag('apoie.png') + content_tag(:span, 'Faça Acontecer')
62
+ end +
63
+ link_to('http://deolho.meurio.org.br/', class: :meurio_app) do
64
+ image_tag('deolho.png') + content_tag(:span, 'De Olho')
65
+ end +
66
+ link_to('http://deguarda.meurio.org.br/', class: :meurio_app) do
67
+ image_tag('deguarda.png') + content_tag(:span, 'De Guarda')
68
+ end
69
+ end
70
+ end +
71
+ content_tag(:div, class: :application_menu) do
72
+ link_to('Como funciona?', about_path) + link_to('Descubra as campanhas', explore_path) + link_to('Crie sua campanha', new_campaign_path, class: :btn)
73
+ end +
74
+ content_tag(:div, nil, class: :clear)
75
+ end
76
+ end
77
+ end
78
+ end
79
+ end
data/lib/meurio_ui.rb CHANGED
@@ -1,2 +1,3 @@
1
1
  require "meurio_ui/engine"
2
2
  require "meurio_ui/version"
3
+ require "meurio_ui/railtie" if defined?(Rails)
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meurio_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.1
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Nícolas Iensen
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-10-07 00:00:00.000000000 Z
12
+ date: 2013-11-20 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :development
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
@@ -27,15 +30,17 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: rake
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
- - - '>='
35
+ - - ! '>='
32
36
  - !ruby/object:Gem::Version
33
37
  version: '0'
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
- - - '>='
43
+ - - ! '>='
39
44
  - !ruby/object:Gem::Version
40
45
  version: '0'
41
46
  description: Meu Rio UI is a Rails engine that provides user interface components
@@ -57,34 +62,39 @@ files:
57
62
  - app/assets/fonts/meurio_ui/icomoon.svg
58
63
  - app/assets/fonts/meurio_ui/icomoon.ttf
59
64
  - app/assets/fonts/meurio_ui/icomoon.woff
65
+ - app/assets/javascripts/meurio_ui.js
60
66
  - app/assets/stylesheets/meurio_ui.css.sass
61
67
  - app/assets/stylesheets/meurio_ui/icomoon.css.scss
68
+ - app/assets/stylesheets/meurio_ui/meurio_header.css.sass
62
69
  - lib/meurio_ui.rb
63
70
  - lib/meurio_ui/engine.rb
71
+ - lib/meurio_ui/railtie.rb
64
72
  - lib/meurio_ui/version.rb
73
+ - lib/meurio_ui/view_helpers.rb
65
74
  - meurio_ui.gemspec
66
75
  homepage: https://github.com/meurio/meurio_ui
67
76
  licenses:
68
77
  - MIT
69
- metadata: {}
70
78
  post_install_message:
71
79
  rdoc_options: []
72
80
  require_paths:
73
81
  - lib
74
82
  required_ruby_version: !ruby/object:Gem::Requirement
83
+ none: false
75
84
  requirements:
76
- - - '>='
85
+ - - ! '>='
77
86
  - !ruby/object:Gem::Version
78
87
  version: '0'
79
88
  required_rubygems_version: !ruby/object:Gem::Requirement
89
+ none: false
80
90
  requirements:
81
- - - '>='
91
+ - - ! '>='
82
92
  - !ruby/object:Gem::Version
83
93
  version: '0'
84
94
  requirements: []
85
95
  rubyforge_project:
86
- rubygems_version: 2.0.6
96
+ rubygems_version: 1.8.23
87
97
  signing_key:
88
- specification_version: 4
98
+ specification_version: 3
89
99
  summary: Default UI elements for Meu Rio projects
90
100
  test_files: []
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 691114dcaff31038d00708a84e0ba646e0f29b4c
4
- data.tar.gz: a816bb083656dd493d9f2f6795566924354cab30
5
- SHA512:
6
- metadata.gz: 5c8252d50a3c2476a3a2b04983704dfdb3caec18e71e8a8fd246fcb34c9a095a2400178335730b7e4417f0cad33b9bf600af61d36707a3316bb44589a654fbbe
7
- data.tar.gz: 9aa8bf8fc1bd4b899a18ea4ff422e519ad181eff0c1520b3774f5dba14074ece2e1be6515c5ba71d1cb93a479e2cb244b2c7664b574a59949aa87fa29a1bcda2