dry_crud 1.2.5 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/README.rdoc +17 -7
  2. data/Rakefile +15 -2
  3. data/VERSION +1 -1
  4. data/lib/generators/dry_crud/templates/INSTALL +1 -1
  5. data/lib/generators/dry_crud/templates/app/controllers/crud_controller.rb +41 -27
  6. data/lib/generators/dry_crud/templates/app/controllers/list_controller.rb +2 -3
  7. data/lib/generators/dry_crud/templates/app/helpers/crud_helper.rb +33 -14
  8. data/lib/generators/dry_crud/templates/app/helpers/list_helper.rb +1 -2
  9. data/lib/generators/dry_crud/templates/app/helpers/standard_form_builder.rb +32 -3
  10. data/lib/generators/dry_crud/templates/app/helpers/standard_helper.rb +38 -20
  11. data/lib/generators/dry_crud/templates/app/views/crud/_attrs.html.erb +1 -1
  12. data/lib/generators/dry_crud/templates/app/views/crud/edit.html.erb +3 -3
  13. data/lib/generators/dry_crud/templates/app/views/crud/new.html.erb +3 -3
  14. data/lib/generators/dry_crud/templates/app/views/crud/show.html.erb +4 -2
  15. data/lib/generators/dry_crud/templates/app/views/layouts/_menu.html.erb +0 -0
  16. data/lib/generators/dry_crud/templates/app/views/layouts/crud.html.erb +22 -9
  17. data/lib/generators/dry_crud/templates/app/views/list/_search.html.erb +1 -3
  18. data/lib/generators/dry_crud/templates/app/views/list/index.html.erb +4 -4
  19. data/lib/generators/dry_crud/templates/public/images/actions/add.png +0 -0
  20. data/lib/generators/dry_crud/templates/public/images/actions/delete.png +0 -0
  21. data/lib/generators/dry_crud/templates/public/images/actions/edit.png +0 -0
  22. data/lib/generators/dry_crud/templates/public/images/actions/list.png +0 -0
  23. data/lib/generators/dry_crud/templates/public/images/actions/show.png +0 -0
  24. data/lib/generators/dry_crud/templates/public/stylesheets/crud.css +136 -18
  25. data/lib/generators/dry_crud/templates/test/crud_test_model.rb +4 -3
  26. data/lib/generators/dry_crud/templates/test/custom_assertions.rb +1 -1
  27. data/lib/generators/dry_crud/templates/test/functional/crud_test_models_controller_test.rb +21 -1
  28. data/lib/generators/dry_crud/templates/test/unit/helpers/crud_helper_test.rb +0 -5
  29. data/lib/generators/dry_crud/templates/test/unit/helpers/standard_form_builder_test.rb +22 -0
  30. data/test/templates/app/models/city.rb +13 -1
  31. data/test/templates/app/models/person.rb +1 -1
  32. data/test/templates/app/views/ajax/_actions_index.html.erb +1 -1
  33. data/test/templates/app/views/cities/_form.html.erb +1 -1
  34. data/test/templates/app/views/cities/_list.html.erb +2 -2
  35. data/test/templates/app/views/layouts/_menu.html.erb +3 -0
  36. data/test/templates/app/views/people/_attrs.html.erb +5 -7
  37. data/test/templates/config/routes.rb +2 -0
  38. data/test/templates/db/seeds.rb +5 -1
  39. data/test/templates/test/functional/cities_controller_test.rb +10 -0
  40. metadata +11 -6
  41. data/test/templates/app/views/layouts/application.html.erb +0 -33
  42. data/test/templates/public/stylesheets/demo.css +0 -113
@@ -1,113 +0,0 @@
1
- body {
2
- text-align: center;
3
- margin: 0pt;
4
- background-color: #ddf;
5
- }
6
-
7
- #content {
8
- padding: 20pt 20pt;
9
- margin: 0 auto;
10
- text-align: left;
11
- width: 600pt;
12
- height: 100%;
13
- background-color: #f6f6ff;
14
- }
15
-
16
- h1 {
17
- font-size: 150%;
18
- margin: 30px 0;
19
- }
20
-
21
- table {
22
- border-collapse: collapse;
23
- width: 100%;
24
- padding: 0;
25
- }
26
-
27
- td {
28
- padding: 2px 4px;
29
- }
30
-
31
- th {
32
- text-align: left;
33
- background-color: #2580a2;
34
- color: white;
35
- font-weight: bold;
36
- padding: 2px 4px;
37
- }
38
-
39
- th a {
40
- text-decoration: none;
41
- color: white;
42
- }
43
-
44
- th a:hover {
45
- text-decoration: underline;
46
- }
47
-
48
- table.list th a {
49
- color: white;
50
- }
51
-
52
- a {
53
- color: #2580a2;
54
- text-decoration: none;
55
- }
56
-
57
- a:visited {
58
- color: #2580a2;
59
- }
60
-
61
- a:hover {
62
- text-decoration: underline;
63
- }
64
-
65
- a.action {
66
- color: #2580a2;
67
- text-decoration: none;
68
- }
69
-
70
- a:visited.action {
71
- color: #2580a2;
72
- }
73
-
74
- a.action:hover {
75
- text-decoration: none;
76
-
77
- }
78
-
79
- #menu {
80
- background: #333;
81
- -moz-box-shadow: 0px 3px 3px #2580a2;
82
- -webkit-box-shadow: 0px 3px 3px #2580a2;
83
- box-shadow: 0px 3px 3px #2580a2;
84
- float: left;
85
- list-style: none;
86
- margin: -20pt;
87
- padding: 0 20px;
88
- width: 610pt;
89
-
90
- }
91
-
92
- #menu li {
93
- float: left;
94
- font-size: 110%;
95
- margin: 0;
96
- padding: 0;
97
- }
98
-
99
- #menu a {
100
- background: #333 bottom right no-repeat;
101
- color: #ddd;
102
- display: block;
103
- float: left;
104
- margin: 0;
105
- padding: 4px 12px;
106
- text-decoration: none;
107
- }
108
-
109
- #menu a:hover {
110
- background: #2580a2 bottom center no-repeat;
111
- color: #fff;
112
- padding-bottom: 4px;
113
- }