i_reach 0.0.2 → 0.1.0
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 +8 -8
- data/README.md +38 -17
- data/Rakefile +3 -0
- data/app/assets/javascripts/i_reach/application.js +2 -1
- data/app/assets/javascripts/i_reach/jquery-ui-timepicker-addon.js +2134 -0
- data/app/assets/stylesheets/i_reach/admin.css +4 -4
- data/app/assets/stylesheets/i_reach/application.css +3 -1
- data/app/assets/stylesheets/i_reach/nav.css +36 -211
- data/app/assets/stylesheets/i_reach/timepicker.css +11 -0
- data/app/controllers/i_reach/welcome_controller.rb +4 -0
- data/app/helpers/layout_helper.rb +24 -0
- data/app/views/admin/_admin_menu_navigation.html.erb +24 -0
- data/app/views/admin/admin_user/_form.html.erb +17 -0
- data/app/views/admin/admin_user/edit.html.erb +9 -0
- data/app/views/admin/admin_user/list.html.erb +26 -0
- data/app/views/admin/admin_user/new.html.erb +8 -0
- data/app/views/admin/admin_user/show.html.erb +8 -0
- data/app/views/admin/home/index.html.erb +1 -0
- data/app/views/admin/menu/_form.html.erb +28 -0
- data/app/views/admin/menu/edit.html.erb +9 -0
- data/app/views/admin/menu/export.html.erb +1 -0
- data/app/views/admin/menu/imp_exp.html.erb +11 -0
- data/app/views/admin/menu/import.html.erb +1 -0
- data/app/views/admin/menu/list.html.erb +33 -0
- data/app/views/admin/menu/new.html.erb +8 -0
- data/app/views/admin/menu/show.html.erb +8 -0
- data/app/views/admin/user/_form.html.erb +49 -0
- data/app/views/admin/user/edit.html.erb +9 -0
- data/app/views/admin/user/list.html.erb +27 -0
- data/app/views/admin/user/new.html.erb +8 -0
- data/app/views/admin/user/show.html.erb +8 -0
- data/app/views/client/index.html.erb +1 -0
- data/app/views/i_reach/welcome/index.html.erb +43 -0
- data/app/views/layouts/i_reach/admin.html.erb +131 -0
- data/app/views/layouts/i_reach/application.html.erb +64 -2
- data/app/views/public/index.html.erb +2 -0
- data/config/routes.rb +2 -0
- data/config/spring.rb +1 -0
- data/lib/i_reach/engine.rb +7 -0
- data/lib/i_reach/version.rb +1 -1
- data/lib/i_reach.rb +5 -1
- metadata +74 -2
@@ -141,7 +141,7 @@ input.button {
|
|
141
141
|
font-family: Arial, Helvetica, sans-serif;
|
142
142
|
font-weight: bold;
|
143
143
|
border: 0;
|
144
|
-
background: url(/
|
144
|
+
background: url(/assets/i_reach/button_imgs/button1.gif) no-repeat;
|
145
145
|
color: #555;
|
146
146
|
height: 22px;
|
147
147
|
overflow: visible; /* supposed to fix IE spacing */
|
@@ -163,7 +163,7 @@ a.button:link, a.button:visited {
|
|
163
163
|
font-weight: bold;
|
164
164
|
text-decoration: none;
|
165
165
|
border: 0;
|
166
|
-
background: url(/
|
166
|
+
background: url(/assets/i_reach/button_imgs/button1.gif) no-repeat;
|
167
167
|
color: #555;
|
168
168
|
height: 22px;
|
169
169
|
/* used to catch the buttonEnding */
|
@@ -184,7 +184,7 @@ div.buttonEnding {
|
|
184
184
|
margin-top: 6px;
|
185
185
|
width: 17px;
|
186
186
|
height: 22px;
|
187
|
-
background: url(/
|
187
|
+
background: url(/assets/i_reach/button_imgs/end1.gif) no-repeat;
|
188
188
|
}
|
189
189
|
|
190
190
|
div.linkbuttonEnding{
|
@@ -194,7 +194,7 @@ div.linkbuttonEnding{
|
|
194
194
|
margin-top: -3px;
|
195
195
|
width: 17px;
|
196
196
|
height: 22px;
|
197
|
-
background: url(/
|
197
|
+
background: url(/assets/i_reach/button_imgs/end1.gif) no-repeat;
|
198
198
|
}
|
199
199
|
|
200
200
|
.newsletter_parts_group {
|
@@ -1,216 +1,41 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
width:100%;
|
27
|
-
float:left;
|
28
|
-
}
|
29
|
-
|
30
|
-
h1 {
|
31
|
-
font-size: 16pt;
|
32
|
-
color: #599c41;
|
33
|
-
}
|
34
|
-
|
35
|
-
/*Content------------------------------------------------*/
|
36
|
-
#content {
|
37
|
-
margin:0;
|
38
|
-
padding:10px 15px 15px 15px;
|
39
|
-
clear:both;
|
40
|
-
font-family: Arial, Helvetica, sans-serif;
|
41
|
-
border-top: 1px solid #c4c1a8;
|
42
|
-
}
|
43
|
-
|
44
|
-
#content table {
|
45
|
-
font-family:Arial, Helvetica, sans-serif;
|
46
|
-
font-size: 14px;
|
47
|
-
}
|
48
|
-
|
49
|
-
hr {
|
50
|
-
margin: 0 0 0 10px;
|
51
|
-
width: 620px;
|
52
|
-
text-align:center;
|
53
|
-
color: #636343;
|
54
|
-
}
|
55
|
-
|
56
|
-
|
57
|
-
/* tables used as lists ------------------------------*/
|
58
|
-
table.list {
|
59
|
-
margin:10px 0 20px 20px;
|
60
|
-
padding: 0;
|
61
|
-
border-top: 1px solid #599c41;
|
62
|
-
border-right: 1px solid #599c41;
|
63
|
-
border-left: 1px solid #599c41;
|
64
|
-
font-size: 10pt;
|
65
|
-
border-collapse: collapse;
|
66
|
-
}
|
67
|
-
|
68
|
-
table.list th {
|
69
|
-
background-color: #fef1de;
|
70
|
-
border-bottom: 2px solid #599c41;
|
71
|
-
padding: 3px 10px 0;
|
72
|
-
}
|
73
|
-
|
74
|
-
table.list td {
|
75
|
-
margin:0;
|
76
|
-
padding: 5px 5px 5px;
|
77
|
-
border-bottom: 1px solid #599c41;
|
78
|
-
}
|
79
|
-
|
80
|
-
table.list tr.title {
|
81
|
-
font-weight: bold;
|
82
|
-
color: #ffffff;
|
83
|
-
font-size: 11pt;
|
84
|
-
background: #599c41;
|
85
|
-
white-space: nowrap;
|
86
|
-
}
|
87
|
-
|
88
|
-
|
89
|
-
/* none of the hover stuff will work in IE
|
90
|
-
* without a proper DOCTYPE declaration.
|
91
|
-
* HTML 1.0 Transitional//EN works, as does
|
92
|
-
* XHTML 1.0 Strict//EN
|
93
|
-
*/
|
94
|
-
|
95
|
-
table.list tr.odd {
|
96
|
-
background: #d9eabd;
|
97
|
-
}
|
98
|
-
table.list tr.even:hover {
|
99
|
-
background: #d9dcd3;
|
100
|
-
}
|
101
|
-
|
102
|
-
table.list tr.odd:hover {
|
103
|
-
background: #e0f2c3;
|
104
|
-
}
|
105
|
-
|
106
|
-
table.list tr.even {
|
107
|
-
background: #e2e8d9;
|
108
|
-
}
|
109
|
-
|
110
|
-
|
111
|
-
/* form labels have different alignment*/
|
112
|
-
label {font-size: 11pt;
|
1
|
+
.line
|
2
|
+
{ color: #d9eabd;
|
3
|
+
width:160px;
|
4
|
+
background: #d9eabd;
|
5
|
+
border:none;
|
6
|
+
height:1px;
|
7
|
+
margin:4px 0;
|
8
|
+
|
9
|
+
}
|
10
|
+
|
11
|
+
.menu {font-size: 10pt;
|
12
|
+
font-family: helvetica, arial, sans-serif;
|
13
|
+
font-weight: bold;
|
14
|
+
line-height: 12pt;
|
15
|
+
color: #000000;
|
16
|
+
width:176px;
|
17
|
+
}
|
18
|
+
.menu a:link { color: #000000; text-decoration: none; }
|
19
|
+
.menu a:visited { color: #000000; text-decoration: none; }
|
20
|
+
.menu a:active { color: #000000; text-decoration: none; }
|
21
|
+
.menu a:hover { color: #Fc6; text-decoration: none; }
|
22
|
+
|
23
|
+
.category:hover { color:#FC6; text-decoration: none; }
|
24
|
+
|
25
|
+
.menuSM {font-size: 9pt;
|
113
26
|
font-family: helvetica, arial, sans-serif;
|
114
27
|
font-weight: bold;
|
115
|
-
|
116
|
-
color
|
117
|
-
|
118
|
-
|
119
|
-
input, select, textarea {
|
120
|
-
margin: 6px 0;
|
121
|
-
padding: 2px;
|
122
|
-
text-align: left;
|
123
|
-
color: #444;
|
124
|
-
border: 1px solid #599c41;
|
125
|
-
font-size: 10pt;
|
126
|
-
background-color: #e2e8d9;
|
127
|
-
}
|
128
|
-
|
129
|
-
|
130
|
-
/*Input style buttons within table*/
|
131
|
-
|
132
|
-
input.button {
|
133
|
-
width: auto;
|
134
|
-
padding-left: 8px;
|
135
|
-
padding-bottom: 3px;
|
136
|
-
padding-right: 5px;
|
137
|
-
/* Firefox wants the margin below */
|
138
|
-
margin-right: 5px;
|
139
|
-
font-size: 11pt;
|
140
|
-
text-decoration: none;
|
141
|
-
font-family: Arial, Helvetica, sans-serif;
|
142
|
-
font-weight: bold;
|
143
|
-
border: 0;
|
144
|
-
background: url(/images/button_imgs/button1.gif) no-repeat;
|
145
|
-
color: #555;
|
146
|
-
height: 22px;
|
147
|
-
overflow: visible; /* supposed to fix IE spacing */
|
148
|
-
/* used to catch the buttonEnding */
|
149
|
-
position: relative;
|
150
|
-
cursor: pointer;
|
151
|
-
}
|
152
|
-
|
153
|
-
input.button:hover {
|
154
|
-
color: #a1ac85;
|
155
|
-
}
|
156
|
-
|
157
|
-
a.button:link, a.button:visited {
|
158
|
-
padding-left: 10px;
|
159
|
-
padding-right: 10px;
|
160
|
-
padding-top: 3px;
|
161
|
-
padding-bottom: 3px;
|
162
|
-
font-size: 11pt;
|
163
|
-
font-weight: bold;
|
164
|
-
text-decoration: none;
|
165
|
-
border: 0;
|
166
|
-
background: url(/images/button_imgs/button1.gif) no-repeat;
|
167
|
-
color: #555;
|
168
|
-
height: 22px;
|
169
|
-
/* used to catch the buttonEnding */
|
170
|
-
position: relative;
|
171
|
-
cursor: pointer;
|
172
|
-
}
|
173
|
-
|
174
|
-
a.button:hover {
|
175
|
-
color: #efaa45;
|
176
|
-
}
|
177
|
-
|
178
|
-
div.buttonEnding {
|
179
|
-
position: absolute;
|
180
|
-
display: inline;
|
181
|
-
/* Firefox really wants -7px margin-left and somehow there is space to the right of the button text in IE*/
|
182
|
-
margin-left: -10px;
|
183
|
-
/* Firefox doesn't like the margin-top below */
|
184
|
-
margin-top: 6px;
|
185
|
-
width: 17px;
|
186
|
-
height: 22px;
|
187
|
-
background: url(/images/button_imgs/end1.gif) no-repeat;
|
188
|
-
}
|
189
|
-
|
190
|
-
div.linkbuttonEnding{
|
191
|
-
position: absolute;
|
192
|
-
display: inline;
|
193
|
-
margin-left: -6px;
|
194
|
-
margin-top: -3px;
|
195
|
-
width: 17px;
|
196
|
-
height: 22px;
|
197
|
-
background: url(/images/button_imgs/end1.gif) no-repeat;
|
28
|
+
line-height: 12pt;
|
29
|
+
color: #a42529;
|
30
|
+
|
198
31
|
}
|
32
|
+
.menuSM a:link { color:#Fff; text-decoration: none; }
|
33
|
+
.menuSM a:visited { color: #fff; text-decoration: none; }
|
34
|
+
.menuSM a:active { color: #fff; text-decoration: none; }
|
35
|
+
.menuSM a:hover { color:#FC6; text-decoration: none; }
|
199
36
|
|
200
|
-
.
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
background-color: #eee;
|
37
|
+
.table-bk {
|
38
|
+
background: url(/assets/i_reach/menuMain.gif) no-repeat top right;
|
39
|
+
padding-top: 20px;
|
40
|
+
padding-left:3px;
|
205
41
|
}
|
206
|
-
|
207
|
-
a:link{
|
208
|
-
color: #F60;
|
209
|
-
text-decoration:none;}
|
210
|
-
|
211
|
-
a:visited{
|
212
|
-
color:#F60;
|
213
|
-
text-decoration:none;}
|
214
|
-
|
215
|
-
a:hover{
|
216
|
-
color: #efaa45;}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
|
2
|
+
.ui-timepicker-div dl { text-align: left; }
|
3
|
+
.ui-timepicker-div dl dt { float: left; clear:left; padding: 0 0 0 5px; }
|
4
|
+
.ui-timepicker-div dl dd { margin: 0 10px 10px 45%; }
|
5
|
+
.ui-timepicker-div td { font-size: 90%; }
|
6
|
+
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
|
7
|
+
|
8
|
+
.ui-timepicker-rtl{ direction: rtl; }
|
9
|
+
.ui-timepicker-rtl dl { text-align: right; padding: 0 5px 0 0; }
|
10
|
+
.ui-timepicker-rtl dl dt{ float: right; clear: right; }
|
11
|
+
.ui-timepicker-rtl dl dd { margin: 0 45% 10px 10px; }
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# These helper methods can be called in your template to set variables to be used in the layout
|
2
|
+
# This module should be included in all views globally,
|
3
|
+
# to do so you may need to add this line to your ApplicationController
|
4
|
+
# helper :layout
|
5
|
+
# Pulled from Ryan Bate's Nifty Generators
|
6
|
+
module LayoutHelper
|
7
|
+
def title(page_title, show_title = true)
|
8
|
+
@content_for_title = page_title.to_s
|
9
|
+
@show_title = show_title
|
10
|
+
end
|
11
|
+
|
12
|
+
def show_title?
|
13
|
+
@show_title
|
14
|
+
end
|
15
|
+
|
16
|
+
def stylesheet(*args)
|
17
|
+
content_for(:head) { stylesheet_link_tag(*args.map(&:to_s)) }
|
18
|
+
end
|
19
|
+
|
20
|
+
def javascript(*args)
|
21
|
+
args = args.map { |arg| arg == :defaults ? arg : arg.to_s }
|
22
|
+
content_for(:head) { javascript_include_tag(*args) }
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<% content_tag :ul, html_options do %>
|
2
|
+
<% admin_nav_menu.reverse.each do |menu_item| %>
|
3
|
+
<% if menu_item.is_visible && menu_item.authorized(session[:admin][:user_id]) %>
|
4
|
+
|
5
|
+
<% if menu_item.has_viewable_children?(session[:admin][:user_id])
|
6
|
+
menu_html_options = {:class => 'dir'}
|
7
|
+
else
|
8
|
+
menu_html_options = {}
|
9
|
+
end %>
|
10
|
+
<% content_tag :li, menu_html_options do %>
|
11
|
+
<% if menu_item.path.blank? %>
|
12
|
+
<% content_tag :span do %><%= menu_item.description %><% end %>
|
13
|
+
<% else %>
|
14
|
+
<%= link_to menu_item.description, "/#{menu_item.path}" %>
|
15
|
+
<% end %>
|
16
|
+
<% if menu_item.has_viewable_children?(session[:admin][:user_id]) %>
|
17
|
+
<%= render :partial => 'admin/admin_menu_navigation',
|
18
|
+
:locals => {:admin_nav_menu => menu_item.children, :html_options => {}}%>
|
19
|
+
<% end %>
|
20
|
+
|
21
|
+
<% end %>
|
22
|
+
<% end %>
|
23
|
+
<% end %>
|
24
|
+
<% end %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<%= error_messages_for 'admin_user' %>
|
2
|
+
|
3
|
+
<!--[form:admin_user]-->
|
4
|
+
<p><label for="admin_user_name">Name</label><br/>
|
5
|
+
<%= text_field 'admin_user', 'name', { :class => "textbox" } %></p>
|
6
|
+
|
7
|
+
<p><span class="title"><label for="admin_user_password">Password</label></span><br/>
|
8
|
+
<%= text_field 'admin_user', 'password', { :class => "textbox" } %></p>
|
9
|
+
|
10
|
+
<p><span class="title"><label for="admin_user_admin_menus">Admin Menus</label></span><br/>
|
11
|
+
<select class="dropdown" name='admin_menu_ids[]' multiple>
|
12
|
+
<!-- <%= options_from_collection_for_select( @admin_menus, 'id', 'description', @selected_menus ) %> -->
|
13
|
+
<%= options_from_admin_menu_for_multiselect( @admin_menus, @selected_menus ) %>
|
14
|
+
</select></p>
|
15
|
+
|
16
|
+
<!--[eoform:admin_user]-->
|
17
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<p class="header">Editing admin_user</p>
|
2
|
+
|
3
|
+
<% form_tag :action => 'update', :id => @admin_user do %>
|
4
|
+
<%= render :partial => 'form' %>
|
5
|
+
<%= submit_tag 'Edit', { :class => "submitbutton" } %>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<span class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to 'Show', :action => 'show', :id => @admin_user %></span> |
|
9
|
+
<span class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to 'Back', :action => 'list' %></span>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<p class="header">Listing admin_users</p>
|
2
|
+
|
3
|
+
<table cellspacing="0" cellpadding="1" class="descrip">
|
4
|
+
<tr>
|
5
|
+
<% for column in AdminUser.content_columns %>
|
6
|
+
<th><%= column.human_name %></th>
|
7
|
+
<% end %>
|
8
|
+
</tr>
|
9
|
+
|
10
|
+
<% for admin_user in @admin_users %>
|
11
|
+
<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'">
|
12
|
+
<% for column in AdminUser.content_columns %>
|
13
|
+
<td><%=h admin_user.send(column.name) %></td>
|
14
|
+
<% end %>
|
15
|
+
<td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to 'Show', :action => 'show', :id => admin_user %></td>
|
16
|
+
<td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to 'Edit', :action => 'edit', :id => admin_user %></td>
|
17
|
+
<td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to 'Delete', { :action => 'destroy', :id => admin_user }, :confirm => 'Are you sure?', :method => :post %></td>
|
18
|
+
</tr>
|
19
|
+
<% end %>
|
20
|
+
</table>
|
21
|
+
|
22
|
+
<span class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= will_paginate @admin_users %></span>
|
23
|
+
|
24
|
+
<br />
|
25
|
+
|
26
|
+
<span class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to 'New admin_user', :action => 'new' %></span>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<p class="header">New admin_user</p>
|
2
|
+
|
3
|
+
<% form_tag :action => 'create' do %>
|
4
|
+
<%= render :partial => 'form' %>
|
5
|
+
<%= submit_tag "Create", { :class => "submitbutton" } %>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<span class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to 'Back', :action => 'list' %></span>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<% for column in AdminUser.content_columns %>
|
2
|
+
<p>
|
3
|
+
<b><%= column.human_name %>:</b> <%=h @admin_user.send(column.name) %>
|
4
|
+
</p>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<span class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to 'Edit', :action => 'edit', :id => @admin_user %></span> |
|
8
|
+
<span class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to 'Back', :action => 'list' %></span>
|
@@ -0,0 +1 @@
|
|
1
|
+
Welcome to the Admin Site!
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<%= error_messages_for 'admin_menu' %>
|
2
|
+
|
3
|
+
<!--[form:admin_menu]-->
|
4
|
+
<%= hidden_field 'admin_menu', 'parent_id' %>
|
5
|
+
|
6
|
+
<p><span class="title"><label for="admin_menu_description">Description</label></span><br/>
|
7
|
+
<%= text_field 'admin_menu', 'description', { :class => "textbox" } %></p>
|
8
|
+
|
9
|
+
<p><span class="title"><label for="admin_menu_path">Path</label></span><br/>
|
10
|
+
<%= text_field 'admin_menu', 'path', { :class => "textbox" } %></p>
|
11
|
+
|
12
|
+
<p><span class="title"><label for="admin_menu_menu_order">Menu order</label></span><br/>
|
13
|
+
<%= text_field 'admin_menu', 'menu_order', { :class => "textbox" } %></p>
|
14
|
+
|
15
|
+
<p><%= check_box "admin_menu", "is_visible" %> <label for="admin_menu_is_visible">Is visible</label></p>
|
16
|
+
|
17
|
+
<p><%= check_box "admin_menu", "auth_all" %> <label for="admin_menu_auth_all">Authorize All (all actions beneath this path are automatically allowed)</label></p>
|
18
|
+
|
19
|
+
<p><span class="title"><label for="admin_menu_requires_class">Requires Class</label></span><br/>
|
20
|
+
<%= text_field 'admin_menu', 'requires_class', { :class => "textbox" } %></p>
|
21
|
+
|
22
|
+
<p><span class="title"><label for="admin_user_admin_menus">Admin Users</label></span><br/>
|
23
|
+
<select class="dropdown" name='admin_user_ids[]' multiple>
|
24
|
+
<%= options_from_collection_for_select( @admin_users, 'id', 'name', @selected_user_ids ) %>
|
25
|
+
</select></p>
|
26
|
+
|
27
|
+
<!--[eoform:admin_menu]-->
|
28
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<p class="header">Editing admin_menu</p>
|
2
|
+
|
3
|
+
<% form_tag :action => 'update', :id => @admin_menu do %>
|
4
|
+
<%= render :partial => 'form' %>
|
5
|
+
<%= submit_tag 'Edit', { :class => "submitbutton" } %>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<span class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to 'Show', :action => 'show', :id => @admin_menu %></span> |
|
9
|
+
<span class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to 'Back', :action => 'list', :parent_id => @parent.nil? ? nil : @parent.id %></span>
|
@@ -0,0 +1 @@
|
|
1
|
+
<pre><%= @export_text %></pre>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<h1>Admin Menu Import/Export</h1>
|
2
|
+
|
3
|
+
To export the current menu heirarchy to text <%= link_to "click here", :action => :export %>.<br/>
|
4
|
+
<br/>
|
5
|
+
<% form_tag :action => :import do %>
|
6
|
+
To import a previous menu heirarchy from text, paste the text below and click submit. Warning, this will empty all existing admin menus from the database.<br/>
|
7
|
+
<textarea name="import_text" rows="30" cols="80"></textarea><br/>
|
8
|
+
<br/>
|
9
|
+
<input type="submit" value="Submit">
|
10
|
+
<% end %>
|
11
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
Feature not yet implemented
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<p class="header">Listing admin_menus: <%= @parent.nil? ? 'Main Menu' : @parent.description %></p>
|
2
|
+
<input type="hidden" name="parent_id" value="<%= @parent.nil? ? nil : @parent.id %>">
|
3
|
+
|
4
|
+
<table cellspacing="0" cellpadding="1" class="descrip">
|
5
|
+
<tr>
|
6
|
+
<% for column in AdminMenu.content_columns %>
|
7
|
+
<th><%= column.human_name %></th>
|
8
|
+
<% end %>
|
9
|
+
</tr>
|
10
|
+
|
11
|
+
<% for admin_menu in @admin_menus %>
|
12
|
+
<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'">
|
13
|
+
<% for column in AdminMenu.content_columns %>
|
14
|
+
<td><%=h admin_menu.send(column.name) %></td>
|
15
|
+
<% end %>
|
16
|
+
<td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to 'Show', :action => 'show', :id => admin_menu %></td>
|
17
|
+
<td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to 'Edit', :action => 'edit', :id => admin_menu %></td>
|
18
|
+
<td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to 'Children', :action => 'list', :parent_id => admin_menu.id %>
|
19
|
+
<td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to 'Delete', { :action => 'destroy', :id => admin_menu }, :confirm => 'Are you sure?', :method => :post %></td>
|
20
|
+
</tr>
|
21
|
+
<% end %>
|
22
|
+
</table>
|
23
|
+
|
24
|
+
<span class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= will_paginate @admin_menus %></span>
|
25
|
+
|
26
|
+
<br />
|
27
|
+
|
28
|
+
<% if @parent.nil? or @parent.admin_menu_id.nil? %>
|
29
|
+
<span class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to 'New admin_menu', { :action => 'new', :parent_id => @parent.nil? ? nil : @parent.id } %> | </span>
|
30
|
+
<% end %>
|
31
|
+
<span class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to( 'Renumber', { :action => 'renumber', :parent_id => @parent.nil? ? nil : @parent.id }, :confirm => 'This will renumber the menu order in multiples of 10. Do you really want to do this?' ) %> | </span>
|
32
|
+
<span class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to( 'Import/Export', { :action => 'imp_exp' }) %> | </span>
|
33
|
+
<span class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to( 'Back', { :action => 'list', :parent_id => @parent.nil? ? nil : @parent.admin_menu_id } ) %></span>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<p class="header">New admin_menu</p>
|
2
|
+
|
3
|
+
<% form_tag :action => 'create' do %>
|
4
|
+
<%= render :partial => 'form' %>
|
5
|
+
<%= submit_tag "Create", { :class => "submitbutton" } %>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<span class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to 'Back', :action => 'list', :parent_id => @admin_menu.parent_id %></span>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<% for column in AdminMenu.content_columns %>
|
2
|
+
<p>
|
3
|
+
<b><%= column.human_name %>:</b> <%=h @admin_menu.send(column.name) %>
|
4
|
+
</p>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<span class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to 'Edit', :action => 'edit', :id => @admin_menu %></span> |
|
8
|
+
<span class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"><%= link_to 'Back', :action => 'list', :parent_id => @parent_id %></span>
|
@@ -0,0 +1,49 @@
|
|
1
|
+
<%= error_messages_for 'user' %>
|
2
|
+
|
3
|
+
<!--[form:user]-->
|
4
|
+
<p><label for="user_username">Username</label><br/>
|
5
|
+
<%= text_field 'user', 'username' %></p>
|
6
|
+
|
7
|
+
<p><label for="user_password">Site password</label><br/>
|
8
|
+
<%= password_field 'user', 'password' %></p>
|
9
|
+
|
10
|
+
<p><label for="user_password_confirmation">Confirm password</label><br/>
|
11
|
+
<%= password_field 'user', 'password_confirmation' %></p>
|
12
|
+
|
13
|
+
<p><label for="user_firstname">Firstname</label><br/>
|
14
|
+
<%= text_field 'user', 'firstname' %></p>
|
15
|
+
|
16
|
+
<p><label for="user_lastname">Lastname</label><br/>
|
17
|
+
<%= text_field 'user', 'lastname' %></p>
|
18
|
+
|
19
|
+
<p><label for="user_emaillist">Emaillist</label><br/>
|
20
|
+
<select id="user_emaillist" name="user[emaillist]"><option value="false">False</option><option value="true">True</option></select></p>
|
21
|
+
|
22
|
+
<p><label for="user_emailaddr">Emailaddr</label><br/>
|
23
|
+
<%= text_field 'user', 'emailaddr' %></p>
|
24
|
+
|
25
|
+
<p><label for="user_birthday">Birthday</label><br/>
|
26
|
+
<%= date_select 'user', 'birthday' %></p>
|
27
|
+
|
28
|
+
<p><label for="user_modifydate">Modifydate</label><br/>
|
29
|
+
<%= datetime_select 'user', 'modifydate' %></p>
|
30
|
+
|
31
|
+
<p><label for="user_last_ip_address">Last ip address</label><br/>
|
32
|
+
<%= text_field 'user', 'last_ip_address' %></p>
|
33
|
+
|
34
|
+
<p><label for="user_neveremail">Neveremail</label><br/>
|
35
|
+
<select id="user_neveremail" name="user[neveremail]"><option value="false">False</option><option value="true">True</option></select></p>
|
36
|
+
|
37
|
+
<p><label for="user_superuser">Superuser</label><br/>
|
38
|
+
<select id="user_superuser" name="user[superuser]"><option value="false">False</option><option value="true">True</option></select></p>
|
39
|
+
|
40
|
+
<p><label for="user_purchase_auth">Purchase auth</label><br/>
|
41
|
+
<select id="user_purchase_auth" name="user[purchase_auth]"><option value="false">False</option><option value="true">True</option></select></p>
|
42
|
+
|
43
|
+
<p><label for="user_company_id">Company</label><br/>
|
44
|
+
<select name="user[company_id]">
|
45
|
+
<%= options_from_collection_for_select @companies, :id, :name, @user.company_id %>
|
46
|
+
</select></p>
|
47
|
+
|
48
|
+
<!--[eoform:user]-->
|
49
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<h1>Listing users</h1>
|
2
|
+
|
3
|
+
<table>
|
4
|
+
<tr>
|
5
|
+
<% for column in User.content_columns %>
|
6
|
+
<th><%= column.human_name %></th>
|
7
|
+
<% end %>
|
8
|
+
</tr>
|
9
|
+
|
10
|
+
<% for user in @users %>
|
11
|
+
<tr>
|
12
|
+
<% for column in User.content_columns %>
|
13
|
+
<td><%=h user.send(column.name) %></td>
|
14
|
+
<% end %>
|
15
|
+
<td><%= link_to 'Show', :action => 'show', :id => user %></td>
|
16
|
+
<td><%= link_to 'Edit', :action => 'edit', :id => user %></td>
|
17
|
+
<td><%= link_to 'Destroy', { :action => 'destroy', :id => user }, :confirm => 'Are you sure?', :method => :post %></td>
|
18
|
+
</tr>
|
19
|
+
<% end %>
|
20
|
+
</table>
|
21
|
+
|
22
|
+
<%= link_to 'Previous page', { :page => @user_pages.current.previous } if @user_pages.current.previous %>
|
23
|
+
<%= link_to 'Next page', { :page => @user_pages.current.next } if @user_pages.current.next %>
|
24
|
+
|
25
|
+
<br />
|
26
|
+
|
27
|
+
<%= link_to 'New user', :action => 'new' %>
|