nice_admin 0.0.4 → 0.0.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.
@@ -1,9 +1,12 @@
1
1
  //= require jquery
2
2
  //= require jquery-ui
3
3
  //= require jquery_ujs
4
+ //= require swfobject.js
5
+ //= require jquery.uploadify.v2.1.4.min.js
4
6
  //= require_tree .
5
7
 
6
8
  $(function(){
9
+
7
10
  $('.nice_admin_notice').show('fade');
8
11
  setTimeout(function() {
9
12
  $('.nice_admin_notice').hide('bounce', 400);
@@ -0,0 +1,24 @@
1
+ $(function(){
2
+
3
+ $('.flash_upload_form').each(function(item){
4
+ var uploadify_script_data = {};
5
+ var csrf_token = $('meta[name=csrf-token]').attr('content');
6
+ var csrf_param = $('meta[name=csrf-param]').attr('content');
7
+ var key = $('#key').html();
8
+ var session = $('#session').html();
9
+ uploadify_script_data[csrf_param] = encodeURIComponent(encodeURIComponent(csrf_token));
10
+ uploadify_script_data[key] = session;
11
+ form_url = $(this).attr('action');
12
+
13
+ $(this).find('input:file').uploadify({
14
+ 'uploader' : "<%= asset_path 'uploadify.swf' %>",
15
+ 'script' : form_url,
16
+ 'cancelImg' : "<%= asset_path 'cancel.png' %>",
17
+ 'buttonText': 'Select Files',
18
+ 'multi' : true,
19
+ 'auto' : true,
20
+ 'scriptData' : uploadify_script_data
21
+ });
22
+ })
23
+
24
+ });
@@ -18,6 +18,7 @@
18
18
  font: 16px "Lucida Grande";
19
19
  padding: 10px 0px 0px 0px;
20
20
  color: #181818;
21
+ text-align: center;
21
22
  }
22
23
 
23
24
  .nice_admin_alert{
@@ -38,4 +39,5 @@
38
39
  font: 16px "Lucida Grande";
39
40
  padding: 10px 0px 0px 0px;
40
41
  color: #FFF;
42
+ text-align: center;
41
43
  }
@@ -58,6 +58,7 @@ h1.site_name {
58
58
  box-shadow: 0px 0px 5px 2px #202020;
59
59
 
60
60
  margin-bottom:50px;
61
+ padding-bottom: 20px;
61
62
 
62
63
  /* text-align:center;*/
63
64
  }
@@ -81,13 +82,11 @@ h2{
81
82
  a{
82
83
  text-decoration: none;
83
84
  color: #2B64BF;
84
- padding: 0px 0px 10px 19px;
85
+ /* padding: 0px 0px 10px 19px;*/
85
86
  }
86
87
 
87
88
 
88
- p{
89
- padding: 0px 0px 10px 19px;
90
- }
89
+
91
90
 
92
91
  ul{
93
92
  list-style: none;
@@ -24,4 +24,6 @@
24
24
  color: #FFF;
25
25
  line-height: 44px;
26
26
  -webkit-font-smoothing: antialiased;
27
+
28
+ margin-left: 10px;
27
29
  }
@@ -1,6 +1,6 @@
1
1
  /*
2
- *= require_self
3
2
  *= require na/reset
4
3
  *= require formtastic
4
+ *= require_self
5
5
  *= require_tree .
6
6
  */
@@ -0,0 +1,31 @@
1
+ .uploadifyQueueItem {
2
+ font: 11px Verdana, Geneva, sans-serif;
3
+ margin-top: 20px;
4
+ padding: 0px;
5
+ width: 350px;
6
+ }
7
+
8
+ .uploadifyError {
9
+ background-color: #FDE5DD !important;
10
+ border: 2px solid #FBCBBC !important;
11
+ }
12
+
13
+ .uploadifyQueueItem .cancel {
14
+ float: right;
15
+ }
16
+
17
+ .uploadifyQueue .completed {
18
+ background-color: #E5E5E5;
19
+ }
20
+
21
+ .uploadifyProgress {
22
+ background-color: #E5E5E5;
23
+ margin-top: 10px;
24
+ width: 100%;
25
+ }
26
+
27
+ .uploadifyProgressBar {
28
+ background-color: #0099FF;
29
+ height: 3px;
30
+ width: 1px;
31
+ }
@@ -0,0 +1,16 @@
1
+ p.sub_label{
2
+ font: 12px "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
3
+ margin-top: 10px;
4
+ color: #9A9A9A;
5
+ }
6
+
7
+ p{
8
+ text-align: left;
9
+ padding: 0px 0px 5px 20px;
10
+ font: 14px "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
11
+ color: #4B4B4B;
12
+ }
13
+
14
+ .null_object{
15
+ color: #768C9A;
16
+ }
Binary file
Binary file
@@ -23,6 +23,8 @@ module NiceAdminHelper
23
23
  attribute = model_item.try(field)
24
24
  if attribute.class == ActiveSupport::TimeWithZone
25
25
  string << "<td>#{attribute.to_s(:long)}</td>"
26
+ elsif attribute.class == FalseClass
27
+ string << "<td>#{attribute ? "Yes" : "No"}</td>"
26
28
  else
27
29
  string << "<td>#{attribute}</td>"
28
30
  end
@@ -44,6 +46,8 @@ module NiceAdminHelper
44
46
  when 'edit'
45
47
  edit_array = [:edit]
46
48
  string << "<td>#{link_to "Edit", edit_array + link_array}</td>"
49
+ when 'show'
50
+ string << "<td>#{link_to "View", link_array}</td>"
47
51
  when 'destroy'
48
52
  string << "<td>#{link_to "Delete", link_array, :method => :delete, :confirm => "Are you sure?"}</td>"
49
53
  else
metadata CHANGED
@@ -1,8 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nice_admin
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.0.4
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 5
9
+ version: 0.0.5
6
10
  platform: ruby
7
11
  authors:
8
12
  - Alex Barlow
@@ -10,17 +14,18 @@ autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
16
 
13
- date: 2011-07-17 00:00:00 +01:00
17
+ date: 2011-07-26 00:00:00 +01:00
14
18
  default_executable:
15
19
  dependencies:
16
20
  - !ruby/object:Gem::Dependency
17
21
  name: kaminari
18
22
  prerelease: false
19
23
  requirement: &id001 !ruby/object:Gem::Requirement
20
- none: false
21
24
  requirements:
22
25
  - - ">="
23
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
24
29
  version: "0"
25
30
  type: :runtime
26
31
  version_requirements: *id001
@@ -28,10 +33,11 @@ dependencies:
28
33
  name: formtastic
29
34
  prerelease: false
30
35
  requirement: &id002 !ruby/object:Gem::Requirement
31
- none: false
32
36
  requirements:
33
37
  - - ">="
34
38
  - !ruby/object:Gem::Version
39
+ segments:
40
+ - 0
35
41
  version: "0"
36
42
  type: :runtime
37
43
  version_requirements: *id002
@@ -54,6 +60,7 @@ files:
54
60
  - app/assets/fonts/Chunkfive.otf
55
61
  - app/assets/images/bg.png
56
62
  - app/assets/javascripts/nice_admin.js
63
+ - app/assets/javascripts/uploadify.js.erb
57
64
  - app/assets/stylesheets/button.css
58
65
  - app/assets/stylesheets/flash.css
59
66
  - app/assets/stylesheets/forms.css
@@ -63,6 +70,10 @@ files:
63
70
  - app/assets/stylesheets/nav.css
64
71
  - app/assets/stylesheets/nice_admin.css
65
72
  - app/assets/stylesheets/tables.css
73
+ - app/assets/stylesheets/uploads.css
74
+ - app/assets/stylesheets/view.css
75
+ - app/assets/uploadify/cancel.png
76
+ - app/assets/uploadify/uploadify.swf
66
77
  - app/controller/nice_admin_controller.rb
67
78
  - app/helpers/nice_admin_helper.rb
68
79
  - app/views/application/_admin_flash.html.erb
@@ -78,21 +89,23 @@ rdoc_options: []
78
89
  require_paths:
79
90
  - lib
80
91
  required_ruby_version: !ruby/object:Gem::Requirement
81
- none: false
82
92
  requirements:
83
93
  - - ">="
84
94
  - !ruby/object:Gem::Version
95
+ segments:
96
+ - 0
85
97
  version: "0"
86
98
  required_rubygems_version: !ruby/object:Gem::Requirement
87
- none: false
88
99
  requirements:
89
100
  - - ">="
90
101
  - !ruby/object:Gem::Version
102
+ segments:
103
+ - 0
91
104
  version: "0"
92
105
  requirements: []
93
106
 
94
107
  rubyforge_project:
95
- rubygems_version: 1.6.2
108
+ rubygems_version: 1.3.6
96
109
  signing_key:
97
110
  specification_version: 3
98
111
  summary: A prebuild admin, becuase, making an admin for everything sucks