adminpanel 2.1.3 → 2.1.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2a62132c9e4fb208f8ba36a33c457128ed0a790e
4
- data.tar.gz: 9a2b4ffc2fb96a36f51bf8d4925aa4e6ed34d272
3
+ metadata.gz: 50a4558fb1b120ccab1cffbfb11cf877d59e2b81
4
+ data.tar.gz: 2980c65b9afe641a8ed4a4fd3acfee9272cabe6b
5
5
  SHA512:
6
- metadata.gz: b0a069de0a2f71e9a7741482eba89df1e66f4c1d0b0ab03a27560c1a74306dcb1ec3bdd213f5b056980a7856ca0ac498916a035f2a905851dedd626cc63ec0fb
7
- data.tar.gz: 2280cbafd12000d5d8f16f57901140344c3119aa973aad0d2f7759856d16620bdcd6bf64d44d0b5b4a223696212687d52d6e4aa6b67e95812f862cb495e32f9f
6
+ metadata.gz: 7d8ac895cbcf90906bd85c7633beb4a8b815cfe253799d58ef400e318dd9fb4bcb47f6a19b05cd6cb1a0e81aa1ee873e68f56bab5e658b7467e5fcd4caf9f9e3
7
+ data.tar.gz: ecd03f0c8a74d459835384dc07583da6b9ef975f1796d528bcc6f6f67444f5a01f8902048f360a335db93e2ea311846ddf1dafce5de04d1c9f73f4bed6a663e1
@@ -1,9 +1,9 @@
1
1
  /*------- RESPONSIVE -------*/
2
2
 
3
3
  *{
4
- -webkit-box-sizing: border-box;
5
- -moz-box-sizing: border-box;
6
- box-sizing: border-box;
4
+ -webkit-box-sizing: border-box;
5
+ -moz-box-sizing: border-box;
6
+ box-sizing: border-box;
7
7
  }
8
8
  html, body{
9
9
  height: auto !important;
@@ -1574,3 +1574,9 @@ table.table thead .sorting_desc_disabled { background: url(<%= asset_path 'admin
1574
1574
  margin: 0 90px 0 15px;
1575
1575
  }
1576
1576
  }
1577
+
1578
+ .widget-tasks-statistics{
1579
+ .userstats{
1580
+ .white.facebook-insights { z-index: 0; }
1581
+ }
1582
+ }
@@ -8,7 +8,7 @@ module Adminpanel
8
8
  # end
9
9
  # end
10
10
  # return total
11
- metric.first['values'].first['value'].to_f
11
+ metric.first['values'].last['value'].to_f
12
12
  end
13
13
 
14
14
  def days_to_substract
@@ -24,7 +24,6 @@ module Adminpanel
24
24
  end
25
25
 
26
26
  def divide_metrics(metric_1, metric_2)
27
- debugger
28
27
  if first_fb_value(metric_2) != 0.0
29
28
  return first_fb_value(metric_1) / first_fb_value(metric_2)
30
29
  else
@@ -27,6 +27,10 @@ module Adminpanel
27
27
  ]
28
28
  end
29
29
 
30
+ def self.icon
31
+ 'cubes'
32
+ end
33
+
30
34
  def self.display_name
31
35
  'Cuenta'
32
36
  end
@@ -0,0 +1,10 @@
1
+ <i class="fa fa-dashboard"></i>
2
+ <h5>
3
+ <%= yield :page_title %>
4
+ <%= link_to google_analytics_path do %>
5
+ <i class="fa fa-google"></i>
6
+ <% end %>
7
+ <%= link_to fb_analytics_path do %>
8
+ <i class="fa fa-facebook"></i>
9
+ <% end %>
10
+ </h5>
@@ -1,7 +1,7 @@
1
1
  <div class="widget-tasks-statistics">
2
- <div class="userstats clearfix" style="margin-top: 25px;">
2
+ <div class="userstats clearfix" style="margin-top: 25px; background-color: none;">
3
3
  <%= link_to '#', data: { toggle: 'modal', target: "##{metric(inside)}" } do %>
4
- <div class="white">
4
+ <div class="white facebook-insights">
5
5
  <i style="color:<%= color %>" class="fa fa-<%= icon %>"></i>
6
6
  <p style="color:<%= color %>" >
7
7
  <%= "#{first_fb_value(inside).to_i} #{placeholder}" %>
@@ -1,98 +1,106 @@
1
1
  <% provide(:page_title, I18n.t('analytics.facebook')) -%>
2
- <%= form_tag fb_analytics_path, method: :get %>
3
- <%=
4
- select_tag(
5
- 'insight',
6
- options_for_select(
7
- [
8
- [I18n.t('analytics.now'), 'day'],
9
- [I18n.t('analytics.week'), 'week'],
10
- [I18n.t('analytics.month'), 'days_28']
11
- ],
12
- params[:insight]
13
- )
14
- )
15
- %>
16
- <%= button_tag(I18n.t('analytics.search'), type: 'submit', class: 'btn btn-info') %>
17
- <h3><%= I18n.t('analytics.for') %> <%= I18n.t("analytics.#{insight}") %></h3>
18
- <% date = Date.parse @new_likes.first['values'].first['end_time'] %>
19
- <h5><%= date - days_to_substract %> - <%= date %></h5>
20
- <div class="overview_boxes">
21
- <div class="box_row clearfix">
22
- <%=
23
- render(
24
- 'widget_task_statistics',
25
- inside: @new_likes,
26
- outside: @total_likes,
27
- placeholder: '+',
28
- icon: 'thumbs-up',
29
- color: '#98AEEA',
30
- label: 'Likes'
31
- )
32
- %>
2
+ <div class="row-fluid">
3
+ <div class="widget widget-padding span12">
4
+ <div class="widget-header">
5
+ <%= render 'header' %>
6
+ </div>
7
+ <div class="widget-body">
8
+ <%= form_tag fb_analytics_path, method: :get %>
9
+ <%=
10
+ select_tag(
11
+ 'insight',
12
+ options_for_select(
13
+ [
14
+ [I18n.t('analytics.now'), 'day'],
15
+ [I18n.t('analytics.week'), 'week'],
16
+ [I18n.t('analytics.month'), 'days_28']
17
+ ],
18
+ params[:insight]
19
+ )
20
+ )
21
+ %>
22
+ <%= button_tag(I18n.t('analytics.search'), type: 'submit', class: 'btn btn-info') %>
23
+ <h4>Haz click en los íconos para ver su descripción</h4>
24
+ <% date = Date.parse @new_likes.first['values'].last['end_time'] %>
25
+ <h3><%= I18n.t('analytics.for') %> <%= date - days_to_substract %> - <%= date %></h3>
26
+ <div class="overview_boxes">
27
+ <div class="box_row clearfix">
28
+ <%=
29
+ render(
30
+ 'widget_task_statistics',
31
+ inside: @new_likes,
32
+ outside: @total_likes,
33
+ placeholder: '+',
34
+ icon: 'thumbs-up',
35
+ color: '#98AEEA',
36
+ label: 'Likes'
37
+ )
38
+ %>
33
39
 
34
- <%=
35
- render(
36
- 'widget_task_statistics',
37
- inside: @impressions_unique,
38
- outside: @impressions,
39
- placeholder: I18n.t('analytics.unique'),
40
- icon: 'ticket',
41
- color: '#6CD0F7',
42
- label: I18n.t('analytics.impressions')
43
- )
44
- %>
40
+ <%=
41
+ render(
42
+ 'widget_task_statistics',
43
+ inside: @impressions_unique,
44
+ outside: @impressions,
45
+ placeholder: I18n.t('analytics.unique'),
46
+ icon: 'ticket',
47
+ color: '#6CD0F7',
48
+ label: I18n.t('analytics.impressions')
49
+ )
50
+ %>
45
51
 
46
- <%=
47
- render(
48
- 'widget_task_statistics',
49
- inside: @views_unique,
50
- outside: @views,
51
- placeholder: 'únicas',
52
- icon: 'eye',
53
- color: '#6CD0F7',
54
- label: 'Vistas'
55
- )
56
- %>
52
+ <%=
53
+ render(
54
+ 'widget_task_statistics',
55
+ inside: @views_unique,
56
+ outside: @views,
57
+ placeholder: 'únicas',
58
+ icon: 'eye',
59
+ color: '#6CD0F7',
60
+ label: 'Vistas'
61
+ )
62
+ %>
57
63
 
58
- <%=
59
- render(
60
- 'widget_task_statistics',
61
- inside: @stories,
62
- outside: @stories,
63
- placeholder: '',
64
- icon: 'bullhorn',
65
- color: '#6CD0F7',
66
- label: 'Hablando de ti'
67
- )
68
- %>
64
+ <%=
65
+ render(
66
+ 'widget_task_statistics',
67
+ inside: @stories,
68
+ outside: @stories,
69
+ placeholder: '',
70
+ icon: 'bullhorn',
71
+ color: '#6CD0F7',
72
+ label: 'Hablando de ti'
73
+ )
74
+ %>
69
75
 
70
- <%=
71
- render(
72
- 'widget_task_statistics',
73
- inside: @consumptions_unique,
74
- outside: @consumptions,
75
- placeholder: 'únicas',
76
- icon: 'crosshairs',
77
- color: '#6CD0F7',
78
- label: 'Consumptions'
79
- )
80
- %>
76
+ <%=
77
+ render(
78
+ 'widget_task_statistics',
79
+ inside: @consumptions_unique,
80
+ outside: @consumptions,
81
+ placeholder: 'únicas',
82
+ icon: 'crosshairs',
83
+ color: '#6CD0F7',
84
+ label: 'Consumptions'
85
+ )
86
+ %>
81
87
 
82
- <%=
83
- render(
84
- 'widget_task_statistics',
85
- inside: @hidden_unique,
86
- outside: @hidden,
87
- placeholder: '-',
88
- icon: 'thumbs-down',
89
- color: '#E28270',
90
- label: 'Dislike o Hide'
91
- )
92
- %>
88
+ <%=
89
+ render(
90
+ 'widget_task_statistics',
91
+ inside: @hidden_unique,
92
+ outside: @hidden,
93
+ placeholder: '-',
94
+ icon: 'thumbs-down',
95
+ color: '#E28270',
96
+ label: 'Dislike o Hide'
97
+ )
98
+ %>
93
99
 
100
+ </div>
101
+ </div>
94
102
 
103
+ </div>
95
104
  </div>
96
105
  </div>
97
-
98
106
  <%= yield :modals %>
@@ -1,11 +1,11 @@
1
- <% provide(:page_title, "Google Analytics") -%>
1
+ <% provide(:page_title, 'Google Analytics') -%>
2
2
  <% content_for :scripts do %>
3
3
  <%#= javascript_include_tag "adminpanel/analytics/analytics" %>
4
4
  <% end %>
5
5
  <div class="row-fluid">
6
6
  <div class="widget widget-padding span12">
7
7
  <div class="widget-header">
8
- <i class="fa fa-dashboard"></i><h5>Estadísticas del Sitio</h5>
8
+ <%= render 'header' %>
9
9
  </div>
10
10
  <%= content_tag "div", :id => "graphic-container", :class => "widget-body", :data => { :visits => @visits, :dates => @visitDates } do %>
11
11
  <% end %>
@@ -107,7 +107,7 @@ es:
107
107
  impressions: 'Impresiones'
108
108
  unique: 'Únicas'
109
109
  for: 'Estadísticas para '
110
- facebook: 'Estadísticas de Facebook'
110
+ facebook: 'Facebook Insights'
111
111
  explanation: 'Explicación de las métricas'
112
112
  description:
113
113
  page_stories: '(Periodo) El número de historias creadas acerca de tu página (Cuenta total)'
@@ -20,6 +20,7 @@ Adminpanel::Engine.routes.draw do
20
20
  when :analytics
21
21
  resources :analytics, resources_parameters(resource).merge({ only: [:index] }) do
22
22
  collection do
23
+ get :google, to: 'analytics#index', as: 'google', path: 'google'
23
24
  get :fb, to:'analytics#fb', as: 'fb', path:'facebook'
24
25
  end
25
26
  end
@@ -1,3 +1,3 @@
1
1
  module Adminpanel
2
- VERSION = "2.1.3"
2
+ VERSION = "2.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adminpanel
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jose Ramon Camacho
@@ -482,7 +482,7 @@ files:
482
482
  - app/assets/stylesheets/adminpanel/fullcalendar.css
483
483
  - app/assets/stylesheets/adminpanel/fullcalendar.print.css
484
484
  - app/assets/stylesheets/adminpanel/select2.css
485
- - app/assets/stylesheets/adminpanel/theme.css.erb
485
+ - app/assets/stylesheets/adminpanel/theme.css.scss.erb
486
486
  - app/assets/stylesheets/adminpanel/timepicker.css
487
487
  - app/assets/stylesheets/application-admin.css
488
488
  - app/controllers/adminpanel/analytics_controller.rb
@@ -518,6 +518,7 @@ files:
518
518
  - app/models/contact.rb
519
519
  - app/uploaders/adminpanel/gallery_uploader.rb
520
520
  - app/views/adminpanel/.DS_Store
521
+ - app/views/adminpanel/analytics/_header.html.erb
521
522
  - app/views/adminpanel/analytics/_widget_task_statistics.html.erb
522
523
  - app/views/adminpanel/analytics/fb.html.erb
523
524
  - app/views/adminpanel/analytics/index.html.erb