user_interface 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +39 -0
- data/app/assets/images/user_interface/ui/accept.png +0 -0
- data/app/assets/images/user_interface/ui/add-small.png +0 -0
- data/app/assets/images/user_interface/ui/add.png +0 -0
- data/app/assets/images/user_interface/ui/alert.png +0 -0
- data/app/assets/images/user_interface/ui/download.png +0 -0
- data/app/assets/images/user_interface/ui/edit-small.png +0 -0
- data/app/assets/images/user_interface/ui/edit.png +0 -0
- data/app/assets/images/user_interface/ui/en_flag.png +0 -0
- data/app/assets/images/user_interface/ui/en_uk_flag.png +0 -0
- data/app/assets/images/user_interface/ui/en_us_flag.png +0 -0
- data/app/assets/images/user_interface/ui/export.png +0 -0
- data/app/assets/images/user_interface/ui/fr_flag.png +0 -0
- data/app/assets/images/user_interface/ui/kml.png +0 -0
- data/app/assets/images/user_interface/ui/notice.png +0 -0
- data/app/assets/images/user_interface/ui/remove-small.png +0 -0
- data/app/assets/images/user_interface/ui/remove.png +0 -0
- data/app/assets/images/user_interface/ui/viewer.png +0 -0
- data/app/assets/images/user_interface/ui/warning.png +0 -0
- data/app/assets/stylesheets/user_interface.css +7 -0
- data/app/assets/stylesheets/user_interface/_layout.scss +330 -0
- data/app/assets/stylesheets/user_interface/_layout.scss~ +290 -0
- data/app/controllers/languages_controller.rb +23 -0
- data/app/helpers/flash_helper.rb +9 -0
- data/app/helpers/languages_helper.rb +16 -0
- data/app/helpers/tabs_helper.rb +9 -0
- data/app/views/devise/_links.erb +41 -0
- data/app/views/devise/confirmations/new.html.erb +13 -0
- data/app/views/devise/mailer/confirmation_instructions.fr.html.erb +6 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/invitation_instructions.fr.html.erb +8 -0
- data/app/views/devise/mailer/invitation_instructions.html.erb +9 -0
- data/app/views/devise/mailer/reset_password_instructions.fr.html.erb +9 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +17 -0
- data/app/views/devise/passwords/new.html.erb +13 -0
- data/app/views/devise/registrations/edit.html.erb +27 -0
- data/app/views/devise/registrations/new.html.erb +16 -0
- data/app/views/devise/sessions/new.html.erb +19 -0
- data/app/views/devise/shared/links.erb +32 -0
- data/app/views/devise/unlocks/new.html.erb +12 -0
- data/config/locales/devise.fr.yml +86 -0
- data/config/locales/devise.yml +79 -0
- data/config/routes.rb +3 -0
- data/lib/tasks/user_interface_tasks.rake +4 -0
- data/lib/user_interface.rb +4 -0
- data/lib/user_interface/engine.rb +18 -0
- data/lib/user_interface/language_support.rb +25 -0
- data/lib/user_interface/version.rb +3 -0
- metadata +179 -0
@@ -0,0 +1,290 @@
|
|
1
|
+
html {color:#000;}
|
2
|
+
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td {margin:0;padding:0;}
|
3
|
+
table {border-collapse:collapse;border-spacing:0;}
|
4
|
+
fieldset,img {border:0;}
|
5
|
+
address,caption,cite,code,dfn,em,strong,b,i,th,var {font-style:normal;font-weight:normal;}
|
6
|
+
li {list-style:none;}
|
7
|
+
caption,th {text-align:left;}
|
8
|
+
h1,h2,h3,h4,h5,h6 {font-size:100%;font-weight:normal;}
|
9
|
+
q:before,q:after {content:'';}
|
10
|
+
abbr,acronym {border:0;font-variant:normal;}
|
11
|
+
sup {vertical-align:text-top;}
|
12
|
+
sub {vertical-align:text-bottom;}
|
13
|
+
input,textarea,select {font-family:inherit;font-size:inherit;font-weight:inherit;}
|
14
|
+
input,textarea,select {*font-size:100%;}
|
15
|
+
legend {color:#000;}
|
16
|
+
a { text-decoration: none; color: #000 }
|
17
|
+
|
18
|
+
/* Red theme */
|
19
|
+
$header_background: #900 !default;
|
20
|
+
$header_color: white !default;
|
21
|
+
$tabs_background: #C00 !default;
|
22
|
+
$tabs_color: white !default;
|
23
|
+
$text_color: #222 !default;
|
24
|
+
|
25
|
+
body {
|
26
|
+
font-family: "Lucida Grande", verdana, arial, helvetica, sans-serif;
|
27
|
+
color: $text_color;
|
28
|
+
font-size: 14px;
|
29
|
+
background: #E5E5E5;
|
30
|
+
}
|
31
|
+
|
32
|
+
a, a:visited {
|
33
|
+
color: $text_color;
|
34
|
+
}
|
35
|
+
|
36
|
+
#header {
|
37
|
+
background: $header_background;
|
38
|
+
|
39
|
+
.tabs {
|
40
|
+
height: 26px;
|
41
|
+
margin: 0 30px 0 30px;
|
42
|
+
|
43
|
+
li {
|
44
|
+
display: inline;
|
45
|
+
float: left;
|
46
|
+
line-height: 24px;
|
47
|
+
|
48
|
+
a:link, a:visited {
|
49
|
+
font-size: 12px;
|
50
|
+
padding: 5px 9px 7px;
|
51
|
+
margin-right: 3px;
|
52
|
+
background-color: $tabs_background;
|
53
|
+
color: $tabs_color;
|
54
|
+
}
|
55
|
+
|
56
|
+
a.current {
|
57
|
+
color: $text_color;
|
58
|
+
font-weight: bold;
|
59
|
+
background: -webkit-gradient(linear, left top, left bottom, from(#FDFDFD), to(#E5E5E5));
|
60
|
+
background: -moz-linear-gradient(top, #FDFDFD, #E5E5E5);
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
li.admin {
|
65
|
+
float: right;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
.infos{
|
70
|
+
height: 70px;
|
71
|
+
|
72
|
+
h1 {
|
73
|
+
font-size: 20px;
|
74
|
+
font-weight: normal;
|
75
|
+
color: $header_color;
|
76
|
+
padding: 10px 0 0 30px;
|
77
|
+
}
|
78
|
+
|
79
|
+
h1.dashboard {
|
80
|
+
font-size: 24px;
|
81
|
+
padding-top: 20px;
|
82
|
+
}
|
83
|
+
|
84
|
+
a.back_to_upper_menu {
|
85
|
+
color: $tabs_color;
|
86
|
+
text-decoration: underline;
|
87
|
+
padding: 10px 0 0 30px;
|
88
|
+
font-size: 0.8em;
|
89
|
+
display: block;
|
90
|
+
}
|
91
|
+
|
92
|
+
ul.user {
|
93
|
+
float: right;
|
94
|
+
color: $tabs_color;
|
95
|
+
margin: 0 30px 0 0;
|
96
|
+
|
97
|
+
li {
|
98
|
+
font-size: 13px;
|
99
|
+
display: inline;
|
100
|
+
margin: 0 3px;
|
101
|
+
}
|
102
|
+
|
103
|
+
a {
|
104
|
+
color: $tabs_color;
|
105
|
+
text-decoration: underline;
|
106
|
+
line-height: 55px;
|
107
|
+
}
|
108
|
+
|
109
|
+
li.language, li.home {
|
110
|
+
margin: 0 1px;
|
111
|
+
text-decoration: none;
|
112
|
+
}
|
113
|
+
|
114
|
+
span.help {
|
115
|
+
color: $header_background;
|
116
|
+
font-size: 11px;
|
117
|
+
border-radius:6px;
|
118
|
+
-moz-border-radius: 6px;
|
119
|
+
background-color: white;
|
120
|
+
padding: 3px 5px;
|
121
|
+
}
|
122
|
+
}
|
123
|
+
}
|
124
|
+
}
|
125
|
+
|
126
|
+
.actions {
|
127
|
+
a {
|
128
|
+
padding-left: 20px;
|
129
|
+
text-decoration: underline;
|
130
|
+
}
|
131
|
+
|
132
|
+
a.visit_site{
|
133
|
+
background: url(image-path('user_interface/ui/site.png')) no-repeat;
|
134
|
+
}
|
135
|
+
|
136
|
+
a.visit_event{
|
137
|
+
background: url(image-path('user_interface/ui/event.png')) no-repeat;
|
138
|
+
}
|
139
|
+
|
140
|
+
a.visit_page{
|
141
|
+
background: url(image-path('user_interface/ui/page.png')) no-repeat;
|
142
|
+
}
|
143
|
+
|
144
|
+
a.add {
|
145
|
+
background: url(image-path('user_interface/ui/add.png')) no-repeat;
|
146
|
+
}
|
147
|
+
a.edit {
|
148
|
+
background: url(image-path('user_interface/ui/edit.png')) no-repeat;
|
149
|
+
}
|
150
|
+
a.remove {
|
151
|
+
background: url(image-path('user_interface/ui/remove.png')) no-repeat;
|
152
|
+
}
|
153
|
+
li {
|
154
|
+
margin: 10px 0;
|
155
|
+
}
|
156
|
+
}
|
157
|
+
|
158
|
+
#body {
|
159
|
+
min-width: 1000px;
|
160
|
+
|
161
|
+
a{ text-decoration: underline;}
|
162
|
+
}
|
163
|
+
|
164
|
+
#workspace, #sidebar {
|
165
|
+
float: left;
|
166
|
+
}
|
167
|
+
|
168
|
+
#workspace {
|
169
|
+
width: 70%;
|
170
|
+
background: white;
|
171
|
+
margin: 15px 30px;
|
172
|
+
padding: 0 15px 10px 15px;
|
173
|
+
|
174
|
+
-moz-box-shadow: 3px 3px 4px #BBB;
|
175
|
+
-webkit-box-shadow: 3px 3px 4px #BBB;
|
176
|
+
box-shadow: 3px 3px 4px #BBB;
|
177
|
+
border-right: 1px solid #BBB;
|
178
|
+
border-bottom: 1px solid #BBB;
|
179
|
+
|
180
|
+
h2,h3 {
|
181
|
+
background: white;
|
182
|
+
padding: 15px 0;
|
183
|
+
font-weight: bold;
|
184
|
+
}
|
185
|
+
|
186
|
+
h2{font-size: 16px;}
|
187
|
+
h3{font-size: 14px;}
|
188
|
+
|
189
|
+
li span.author {
|
190
|
+
float: right;
|
191
|
+
font-size: 12px;
|
192
|
+
}
|
193
|
+
|
194
|
+
.site_summary {
|
195
|
+
float: left;
|
196
|
+
margin-bottom: 20px;
|
197
|
+
width: 100%;
|
198
|
+
|
199
|
+
img {
|
200
|
+
float: left;
|
201
|
+
margin-right: 20px;
|
202
|
+
}
|
203
|
+
a {
|
204
|
+
display: block;
|
205
|
+
margin: 25px 0 0;
|
206
|
+
}
|
207
|
+
}
|
208
|
+
.site_summary:after {
|
209
|
+
content: " ";
|
210
|
+
display: block;
|
211
|
+
height: 0;
|
212
|
+
clear: both;
|
213
|
+
visibility: hidden;
|
214
|
+
}
|
215
|
+
|
216
|
+
p { margin: 7px 0; }
|
217
|
+
|
218
|
+
fieldset.buttons{
|
219
|
+
margin: 10px;
|
220
|
+
}
|
221
|
+
|
222
|
+
}
|
223
|
+
|
224
|
+
#body #flash {
|
225
|
+
width: 72%;
|
226
|
+
margin: 15px 0 0 30px;
|
227
|
+
|
228
|
+
div {
|
229
|
+
padding: 10px 10px 10px 50px;
|
230
|
+
}
|
231
|
+
.alert {
|
232
|
+
color: #c01100;
|
233
|
+
background: #ffbdbd url(image-path('user_interface/ui/alert.png')) no-repeat 15px;
|
234
|
+
}
|
235
|
+
.notice {
|
236
|
+
background: #EDF3FE url(image-path('user_interface/ui/notice.png')) no-repeat 15px;
|
237
|
+
}
|
238
|
+
}
|
239
|
+
|
240
|
+
#body #sidebar {
|
241
|
+
width: 20%;
|
242
|
+
padding-top: 20px;
|
243
|
+
|
244
|
+
a {
|
245
|
+
color: #666;
|
246
|
+
}
|
247
|
+
|
248
|
+
.actions {
|
249
|
+
margin-bottom: 20px;
|
250
|
+
}
|
251
|
+
|
252
|
+
h3 {
|
253
|
+
padding: 6px 8px;
|
254
|
+
font-weight: bold;
|
255
|
+
background: #F0F0F0;
|
256
|
+
border-bottom: 1px solid gainsboro;
|
257
|
+
margin-bottom: 10px;
|
258
|
+
}
|
259
|
+
|
260
|
+
h4 {
|
261
|
+
font-weight: bold;
|
262
|
+
padding: 6px 8px;
|
263
|
+
font-size: 0.9em;
|
264
|
+
}
|
265
|
+
|
266
|
+
p {
|
267
|
+
font-size: 12px;
|
268
|
+
}
|
269
|
+
|
270
|
+
fieldset
|
271
|
+
{
|
272
|
+
background-color: #ECECEC;
|
273
|
+
padding: 10px;
|
274
|
+
border: 1px solid black;
|
275
|
+
|
276
|
+
legend{
|
277
|
+
font-weight: bold;
|
278
|
+
padding: 0 5px;
|
279
|
+
}
|
280
|
+
|
281
|
+
p{
|
282
|
+
margin-top: 5px;
|
283
|
+
label{ font-size: 12px;}
|
284
|
+
span{
|
285
|
+
font-style: oblique;
|
286
|
+
font-size:12px;
|
287
|
+
}
|
288
|
+
}
|
289
|
+
}
|
290
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class LanguagesController < ApplicationController
|
2
|
+
skip_filter :authenticate_user!
|
3
|
+
|
4
|
+
def show
|
5
|
+
change_language
|
6
|
+
end
|
7
|
+
|
8
|
+
def update
|
9
|
+
change_language
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def change_language
|
15
|
+
self.current_language = params[:id]
|
16
|
+
redirect_to (referer_path or root_path)
|
17
|
+
end
|
18
|
+
|
19
|
+
def referer_path
|
20
|
+
request.env["HTTP_REFERER"]
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module LanguagesHelper
|
2
|
+
|
3
|
+
def selected_language?( lang)
|
4
|
+
(session[:language].nil? && lang=="fr") || lang==session[:language].to_s
|
5
|
+
end
|
6
|
+
def language_class( lang)
|
7
|
+
"language #{lang}".tap do |css_classes|
|
8
|
+
css_classes << " selected" if selected_language?(lang)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def link_to_language(language)
|
13
|
+
link_to image_tag("user_interface/ui/#{language}_flag.png"), language_path(language), :method => :put
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
module TabsHelper
|
2
|
+
|
3
|
+
def tab_link_to(model_or_name, link, current=nil)
|
4
|
+
model_or_name = model_or_name.model_name.human(:count => 2).capitalize if Class === model_or_name
|
5
|
+
current ||= request.path.start_with?(link)
|
6
|
+
link_to model_or_name, link, :class => ("current" if current)
|
7
|
+
end
|
8
|
+
|
9
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<% content_for :sidebar do %>
|
2
|
+
<ul class="actions">
|
3
|
+
<li>
|
4
|
+
<%- if controller_name != 'sessions' %>
|
5
|
+
<%= link_to t(".sign_in"), new_session_path(resource_name) %><br />
|
6
|
+
<% end -%>
|
7
|
+
</li>
|
8
|
+
|
9
|
+
<li>
|
10
|
+
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
11
|
+
<%= link_to t(".sign_up"), new_registration_path(resource_name) %><br />
|
12
|
+
<% end -%>
|
13
|
+
</li>
|
14
|
+
|
15
|
+
<li>
|
16
|
+
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
|
17
|
+
<%= link_to t(".new_password"), new_password_path(resource_name) %><br />
|
18
|
+
<% end -%>
|
19
|
+
</li>
|
20
|
+
|
21
|
+
<li>
|
22
|
+
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
23
|
+
<%= link_to t(".new_confirmation"), new_confirmation_path(resource_name) %><br />
|
24
|
+
<% end -%>
|
25
|
+
</li>
|
26
|
+
|
27
|
+
<li>
|
28
|
+
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
29
|
+
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
|
30
|
+
<% end -%>
|
31
|
+
</li>
|
32
|
+
|
33
|
+
<li>
|
34
|
+
<%- if devise_mapping.omniauthable? %>
|
35
|
+
<%- resource_class.omniauth_providers.each do |provider| %>
|
36
|
+
<%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
|
37
|
+
<% end -%>
|
38
|
+
<% end -%>
|
39
|
+
</li>
|
40
|
+
</ul>
|
41
|
+
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%= title_tag t('.title') %>
|
2
|
+
|
3
|
+
<%= semantic_form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |form| %>
|
4
|
+
|
5
|
+
<%= form.input :email %>
|
6
|
+
|
7
|
+
<%= form.actions do %>
|
8
|
+
<%= form.action :submit, :as => :button, :label => t('.title') %>
|
9
|
+
<%= form.action :cancel, :as => :link %>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<%= render "links" %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<p>Bonjour <%= @resource.email %>,</p>
|
2
|
+
|
3
|
+
<p>Ce message est une invitation pour accéder à <%= link_to nil, root_url %>, vous pouvez l'accepter en cliquant sur le lien suivant :</p>
|
4
|
+
|
5
|
+
<p><%= link_to "Accepter l'invitation", accept_invitation_url(@resource, :invitation_token => @resource.invitation_token) %></p>
|
6
|
+
|
7
|
+
<p>Si vous ne souhaitez pas accepter cette invitation, ignorez ce message.<br />
|
8
|
+
Votre compte ne sera pas créé tant que vous n'accédez pas au lien ci-dessus et que vous ne définissez un mot de passe.</p>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<p>Hello <%= @resource.email %>!</p>
|
2
|
+
|
3
|
+
<p>Someone has invited you to <%= root_url %>, you can accept it through the link below.</p>
|
4
|
+
|
5
|
+
<p><%= link_to 'Accept invitation', accept_invitation_url(@resource, :invitation_token => @resource.invitation_token) %></p>
|
6
|
+
|
7
|
+
<p>If you don't want to accept the invitation, please ignore this email.<br />
|
8
|
+
Your account won't be created until you access the link above and set your password.</p>
|
9
|
+
|