gb_mapfish_appserver 1.0.2 → 1.0.3
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.
- data/app/assets/stylesheets/bootstrap/bootstrap.min.css +5 -0
- data/app/controllers/application_controller.rb +5 -3
- data/app/controllers/groups_users_controller.rb +10 -3
- data/app/controllers/print_controller.rb +1 -1
- data/app/controllers/users_controller.rb +3 -0
- data/app/models/geo_model.rb +2 -2
- data/app/models/layer.rb +2 -6
- data/app/views/devise/passwords/edit.html.erb +41 -11
- data/app/views/devise/passwords/new.html.erb +33 -8
- data/app/views/devise/sessions/new.html.erb +45 -12
- data/app/views/groups_users/_form.html.erb +42 -35
- data/app/views/groups_users/edit.html.erb +8 -4
- data/app/views/groups_users/index.html.erb +49 -65
- data/app/views/groups_users/new.html.erb +35 -38
- data/app/views/groups_users/show_group.html.erb +77 -0
- data/app/views/layouts/application.html.erb +82 -87
- data/app/views/registrations/confirm.html.erb +10 -5
- data/app/views/registrations/edit.html.erb +67 -47
- data/app/views/registrations/index.html.erb +10 -5
- data/app/views/registrations/new.html.erb +105 -49
- data/app/views/users/edit.html.erb +66 -56
- data/app/views/users/show.html.erb +62 -0
- data/config/routes.rb +1 -0
- data/lib/gb_mapfish_appserver/version.rb +1 -1
- data/test/dummy/app/assets/javascripts/application.js +2 -0
- metadata +55 -93
- checksums.yaml +0 -15
@@ -1,44 +1,41 @@
|
|
1
1
|
<% content_for :head do %>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
<%= javascript_include_tag 'jquery.ui.autocomplete' %>
|
3
|
+
<%= stylesheet_link_tag 'jquery.ui.autocomplete' %>
|
4
|
+
<script type="text/javascript">
|
5
|
+
$(function() {
|
6
|
+
$('#user_email').autocomplete({
|
7
|
+
source: '/users/find.json',
|
8
|
+
minLength: 3
|
9
|
+
});
|
7
10
|
});
|
8
|
-
|
9
|
-
</script>
|
11
|
+
</script>
|
10
12
|
<% end %>
|
11
13
|
|
12
|
-
<
|
14
|
+
<div class="page-header">
|
15
|
+
<h1>Benutzer zu Gruppe hinzufügen</h1>
|
16
|
+
</div>
|
13
17
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
<
|
22
|
-
|
23
|
-
</
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
18
|
+
<div class="panel panel-default">
|
19
|
+
<div class="panel-body">
|
20
|
+
<%= form_for(@groups_user, :html => {:class => 'form-horizontal'}) do |f| %>
|
21
|
+
<%= f.hidden_field :group_id, :value => @group.id %>
|
22
|
+
<div class="form-group">
|
23
|
+
<%= f.label 'Gruppe', :class => 'col-sm-2 control-label' %>
|
24
|
+
<div class="col-sm-8">
|
25
|
+
<p class="form-control-static"><%= @groups_user.group.name %></p>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
<div class="form-group">
|
29
|
+
<%= f.label :user_email, 'Benutzer E-Mail', :class => 'col-sm-2 control-label' %>
|
30
|
+
<div class="col-sm-8">
|
31
|
+
<%= text_field_tag :user_email, nil, :class => 'form-control' %>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
<div class="form-group">
|
35
|
+
<div class="col-sm-offset-2 col-sm-10">
|
36
|
+
<%= f.submit "Benutzer hinzufügen", :class => 'btn btn-primary' %>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
<% end %>
|
33
40
|
</div>
|
34
|
-
|
35
|
-
<%= f.label :user_email, 'Benutzer E-Mail' %>
|
36
|
-
<%= text_field_tag :user_email %>
|
37
|
-
</div>
|
38
|
-
|
39
|
-
<div class="actions">
|
40
|
-
<%= f.submit "Benutzer hinzufügen" %>
|
41
|
-
</div>
|
42
|
-
<% end %>
|
43
|
-
|
44
|
-
<%= link_to 'Zurück', groups_users_path %>
|
41
|
+
</div>
|
@@ -0,0 +1,77 @@
|
|
1
|
+
<% content_for :head do %>
|
2
|
+
<style type="text/css">
|
3
|
+
.user_app_infos .dl-horizontal dt {
|
4
|
+
width: 100px;
|
5
|
+
}
|
6
|
+
.user_app_infos .dl-horizontal dd {
|
7
|
+
margin-left: 120px;
|
8
|
+
}
|
9
|
+
</style>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<div class="page-header">
|
13
|
+
<h1>Benutzergruppe <small><%= @group.name %></small></h1>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<div class="panel panel-default">
|
17
|
+
<div class="panel-heading">Registrier-Link</div>
|
18
|
+
<div class="panel-body">
|
19
|
+
<%= link_to new_user_registration_url(:group => @group.name), new_user_registration_path(:group => @group.name) %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<div class="panel panel-default">
|
24
|
+
<div class="panel-heading">Benutzer</div>
|
25
|
+
<div class="panel-body">
|
26
|
+
|
27
|
+
<%= link_to 'Benutzer hinzufügen', new_groups_user_path({:group => @group}), :class => 'btn btn-primary' %>
|
28
|
+
|
29
|
+
<table class="table table-striped">
|
30
|
+
<thead>
|
31
|
+
<tr>
|
32
|
+
<th>Login</th>
|
33
|
+
<th>Benutzer</th>
|
34
|
+
<th>E-Mail</th>
|
35
|
+
<th>Freigeschaltet</th>
|
36
|
+
<th>Info</th>
|
37
|
+
<th></th>
|
38
|
+
<th></th>
|
39
|
+
<th></th>
|
40
|
+
</tr>
|
41
|
+
</thead>
|
42
|
+
<tbody>
|
43
|
+
<% @groups_users.each do |groups_user| %>
|
44
|
+
<tr>
|
45
|
+
<td><%= groups_user.user.login %></td>
|
46
|
+
<td><%= groups_user.user.name %></td>
|
47
|
+
<td><%= groups_user.user.email %></td>
|
48
|
+
<td>
|
49
|
+
<span class="label label-<%= groups_user.granted ? 'success' : 'danger' %>">
|
50
|
+
<%= groups_user.granted ? "ja" : "nein" %>
|
51
|
+
</span>
|
52
|
+
</td>
|
53
|
+
<td class="user_app_infos">
|
54
|
+
<% unless groups_user.user.app_infos.nil? %>
|
55
|
+
<dl class="dl-horizontal">
|
56
|
+
<% groups_user.user.app_infos.sort.each do |key, value| %>
|
57
|
+
<dt><%= key %></dt>
|
58
|
+
<dd><%= value %></dd>
|
59
|
+
<% end %>
|
60
|
+
</dl>
|
61
|
+
<% end %>
|
62
|
+
</td>
|
63
|
+
<td>
|
64
|
+
<%= link_to "Freigabe", edit_groups_user_path(groups_user), :class => 'btn btn-primary' %>
|
65
|
+
</td>
|
66
|
+
<td>
|
67
|
+
<%= link_to "Bearbeiten", edit_user_path(groups_user.user), :class => 'btn btn-default' %>
|
68
|
+
</td>
|
69
|
+
<td>
|
70
|
+
<%= link_to "Entfernen", groups_user, :confirm => 'Benutzer aus Gruppe entfernen?', :method => :delete, :class => 'btn btn-danger' %>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
<% end %>
|
74
|
+
</tbody>
|
75
|
+
</table>
|
76
|
+
</div>
|
77
|
+
</div>
|
@@ -1,98 +1,93 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
<%= stylesheet_link_tag 'http://www.intranet.ktzh.ch/css/intranet.css' %>
|
9
|
-
<% else %>
|
10
|
-
<%= stylesheet_link_tag 'http://www.zh.ch/css/global.css' %>
|
11
|
-
<% end %>
|
12
|
-
<style type="text/css">
|
13
|
-
div.alert-message {
|
14
|
-
background-color: #F2FBF2;
|
15
|
-
border: 2px solid #23C123;
|
16
|
-
color: #23C123;
|
17
|
-
margin-bottom: 30px;
|
18
|
-
padding: 5px 51px 5px 10px;
|
19
|
-
}
|
20
|
-
div.alert-message.error {
|
21
|
-
background-color: #FBF2F2;
|
22
|
-
border: 2px solid #C12323;
|
23
|
-
color: #C12323;
|
24
|
-
}
|
25
|
-
</style>
|
26
|
-
<%= javascript_include_tag :application %>
|
27
|
-
<%= csrf_meta_tags %>
|
28
|
-
<%= yield :head %>
|
29
|
-
</head>
|
3
|
+
<head>
|
4
|
+
<title>GIS-Browser Admin</title>
|
5
|
+
<%= stylesheet_link_tag :application, :media => "all" %>
|
6
|
+
<%= javascript_include_tag :application %>
|
7
|
+
<%= csrf_meta_tags %>
|
30
8
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
<% else %>
|
47
|
-
<li><%= link_to "Anmelden", new_user_session_path %></li>
|
48
|
-
<% end%>
|
49
|
-
<li><%= link_to "Karte", root_path %></li>
|
50
|
-
<% if user_signed_in? %>
|
51
|
-
<li><%= link_to "Abmelden", destroy_user_session_path %></li>
|
52
|
-
<% end %>
|
53
|
-
</ul>
|
54
|
-
</div>
|
9
|
+
<%= stylesheet_link_tag 'bootstrap/bootstrap.min' %>
|
10
|
+
<style type="text/css">
|
11
|
+
body {
|
12
|
+
padding-top: 70px;
|
13
|
+
}
|
14
|
+
.gb-footer {
|
15
|
+
margin-bottom: 0;
|
16
|
+
}
|
17
|
+
.page-header {
|
18
|
+
margin-top: 20px;
|
19
|
+
}
|
20
|
+
.form-horizontal input[type="checkbox"], .form-horizontal input[type="radio"] {
|
21
|
+
margin-top: 0;
|
22
|
+
}
|
23
|
+
</style>
|
55
24
|
|
56
|
-
|
57
|
-
|
25
|
+
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
26
|
+
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
27
|
+
<!--[if lt IE 9]>
|
28
|
+
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
29
|
+
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
30
|
+
<![endif]-->
|
58
31
|
|
32
|
+
<%= yield :head %>
|
33
|
+
</head>
|
59
34
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
35
|
+
<body>
|
36
|
+
<nav class="navbar navbar-default navbar-fixed-top">
|
37
|
+
<div class="container">
|
38
|
+
<div class="navbar-header">
|
39
|
+
<%= link_to "GIS-Browser Admin", "#", :class => 'navbar-brand' %>
|
40
|
+
</div>
|
41
|
+
<div>
|
42
|
+
<ul class="nav navbar-nav">
|
43
|
+
<li>
|
44
|
+
<%= link_to "GIS-Browser", root_path, :target => '_blank' %>
|
45
|
+
</li>
|
46
|
+
<% if user_signed_in? %>
|
47
|
+
<li class="<%= "active" if controller_name == 'groups_users' %>">
|
48
|
+
<%= link_to "Benutzergruppen", groups_users_path %>
|
49
|
+
</li>
|
50
|
+
<li class="<%= "active" if controller_name == 'users' %>">
|
51
|
+
<%= link_to current_user.login, user_path(current_user) %>
|
52
|
+
</li>
|
53
|
+
<li>
|
54
|
+
<%= link_to "Abmelden", destroy_user_session_path %>
|
55
|
+
</li>
|
56
|
+
<% else %>
|
57
|
+
<li class="<%= "active" if controller_name == 'sessions' %>">
|
58
|
+
<%= link_to "Anmelden", new_user_session_path %>
|
59
|
+
</li>
|
60
|
+
<% end %>
|
61
|
+
</ul>
|
62
|
+
</div>
|
63
|
+
</div>
|
64
|
+
</nav>
|
70
65
|
|
71
|
-
|
66
|
+
<% if flash.present? %>
|
67
|
+
<div class="container">
|
68
|
+
<% flash.each do |name, msg| %>
|
69
|
+
<div class="alert alert-<%= name == :notice ? 'success' : 'danger' %>" role="alert">
|
70
|
+
<%= msg %>
|
71
|
+
</div>
|
72
|
+
<% end %>
|
73
|
+
</div>
|
74
|
+
<% end %>
|
72
75
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
+
<div class="container">
|
77
|
+
<%= yield %>
|
78
|
+
</div>
|
76
79
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
<li >
|
89
|
-
<a href="http://www.zh.ch/internet/de/service/nav/footer/impressum.html" target="_blank">Impressum</a>
|
90
|
-
</li>
|
91
|
-
</ul>
|
92
|
-
<div class="clear"></div>
|
93
|
-
</div>
|
94
|
-
</div>
|
95
|
-
|
96
|
-
</body>
|
80
|
+
<div class="navbar gb-footer">
|
81
|
+
<div class="container">
|
82
|
+
<ul class="nav navbar-nav">
|
83
|
+
<li>
|
84
|
+
<p class="navbar-text">
|
85
|
+
© 2015 <%= link_to "Mapfish Appserver", "https://github.com/mapfish-appserver/gb_mapfish_appserver", :target => '_blank' %>
|
86
|
+
</p>
|
87
|
+
</li>
|
88
|
+
</ul>
|
89
|
+
</div>
|
90
|
+
</div>
|
97
91
|
|
92
|
+
</body>
|
98
93
|
</html>
|
@@ -1,6 +1,11 @@
|
|
1
|
-
<
|
1
|
+
<div class="page-header">
|
2
|
+
<h1>Registrierung</h1>
|
3
|
+
</div>
|
2
4
|
|
3
|
-
<
|
4
|
-
<
|
5
|
-
|
6
|
-
|
5
|
+
<div class="panel panel-default">
|
6
|
+
<div class="panel-body">
|
7
|
+
<p>Besten Dank für die Registrierung!</p>
|
8
|
+
<p>Sie werden benachrichtigt, sobald die Gruppe für Sie freigeschaltet ist.</p>
|
9
|
+
<p><%= link_to "GIS-Browser starten", root_path %></p>
|
10
|
+
</div>
|
11
|
+
</div>
|
@@ -1,55 +1,75 @@
|
|
1
|
-
<
|
1
|
+
<div class="page-header">
|
2
|
+
<h1>Login-Daten bearbeiten</h1>
|
3
|
+
</div>
|
2
4
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
<%= f.text_field :email %>
|
14
|
-
</div>
|
15
|
-
|
16
|
-
<div class="row">
|
17
|
-
<%= f.label :password %> <i>(leave blank if you don't want to change it)</i>
|
18
|
-
<%= f.password_field :password %>
|
19
|
-
</div>
|
20
|
-
|
21
|
-
<div class="row">
|
22
|
-
<%= f.label :password_confirmation %>
|
23
|
-
<%= f.password_field :password_confirmation %>
|
24
|
-
</div>
|
25
|
-
|
26
|
-
<div class="row">
|
27
|
-
<%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i>
|
28
|
-
<%= f.password_field :current_password %>
|
29
|
-
</div>
|
30
|
-
|
31
|
-
<div class="row">
|
32
|
-
<%= f.submit "Update" %>
|
33
|
-
</div>
|
5
|
+
<div class="panel panel-default">
|
6
|
+
<div class="panel-heading">Benutzer</div>
|
7
|
+
<div class="panel-body">
|
8
|
+
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :class => 'form-horizontal' }) do |f| %>
|
9
|
+
<div class="form-group">
|
10
|
+
<%= f.label :login, "Benutzername", :class => 'col-sm-2 control-label' %>
|
11
|
+
<div class="col-sm-8">
|
12
|
+
<p class="form-control-static"><%= resource.login %></p>
|
13
|
+
</div>
|
14
|
+
</div>
|
34
15
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
16
|
+
<div class="form-group">
|
17
|
+
<%= f.label :email, "E-Mail", :class => 'col-sm-2 control-label' %>
|
18
|
+
<div class="col-sm-8">
|
19
|
+
<p class="form-control-static"><%= resource.email %></p>
|
20
|
+
</div>
|
21
|
+
</div>
|
39
22
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
<p>You can use this url to login<br />
|
48
|
-
<%= link_to "http://maps.zh.ch#{root_path(:user_token => resource.authentication_token)}", root_path(:user_token => resource.authentication_token) %></p>
|
49
|
-
<% end %>
|
50
|
-
</div>
|
23
|
+
<div class="form-group">
|
24
|
+
<%= f.label :password, "Passwort", :class => 'col-sm-2 control-label' %>
|
25
|
+
<div class="col-sm-8">
|
26
|
+
<%= f.password_field :password, :class => 'form-control' %>
|
27
|
+
<span class="help-block">freilassen, wenn Sie das nicht ändern wollen</span>
|
28
|
+
</div>
|
29
|
+
</div>
|
51
30
|
|
31
|
+
<div class="form-group">
|
32
|
+
<%= f.label :password_confirmation, "Passwortbestätigung", :class => 'col-sm-2 control-label' %>
|
33
|
+
<div class="col-sm-8">
|
34
|
+
<%= f.password_field :password_confirmation, :class => 'form-control' %>
|
35
|
+
</div>
|
36
|
+
</div>
|
52
37
|
|
38
|
+
<div class="form-group">
|
39
|
+
<%= f.label :current_password, "Bisheriges Passwort", :class => 'col-sm-2 control-label' %>
|
40
|
+
<div class="col-sm-8">
|
41
|
+
<%= f.password_field :current_password, :class => 'form-control' %>
|
42
|
+
<span class="help-block">wir benötigen Ihr aktuelles Passwort, um die Änderung zu bestätigen</span>
|
43
|
+
</div>
|
44
|
+
</div>
|
53
45
|
|
46
|
+
<div class="form-group">
|
47
|
+
<div class="col-sm-offset-2 col-sm-10">
|
48
|
+
<%= f.submit "Speichern", :class => 'btn btn-primary' %>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
<% end %>
|
52
|
+
</div>
|
53
|
+
</div>
|
54
54
|
|
55
|
+
<%# FIXME: generating tokens does not work %>
|
56
|
+
<% if false %>
|
57
|
+
<div class="panel panel-default">
|
58
|
+
<div class="panel-heading">Token</div>
|
59
|
+
<div class="panel-body">
|
60
|
+
<dl class="dl-horizontal">
|
61
|
+
<dt>Token</dt>
|
62
|
+
<dd><%= resource.authentication_token.blank? ? "Kein Token" : resource.authentication_token %></dd>
|
63
|
+
<dt></dt>
|
64
|
+
<dd> </dd>
|
65
|
+
<dt></dt>
|
66
|
+
<dd><%= link_to "Token erzeugen", token_authentications_path(:user_id => resource.id), :method => :post, :confirm => "Sind Sie sicher?", :class => 'btn btn-default' %>
|
67
|
+
<%= link_to "Token löschen", token_authentication_path(resource), :method => :delete, :confirm => "Sind Sie sicher?", :class => 'btn btn-danger' %></dd>
|
68
|
+
</dl>
|
69
|
+
<% if resource.authentication_token %>
|
70
|
+
Sie können diese URL zum Anmelden benutzen
|
71
|
+
<%= link_to "http://maps.zh.ch#{root_path(:user_token => resource.authentication_token)}", root_path(:user_token => resource.authentication_token) %>
|
72
|
+
<% end %>
|
73
|
+
</div>
|
74
|
+
</div>
|
55
75
|
<% end %>
|