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.
@@ -1,44 +1,41 @@
1
1
  <% content_for :head do %>
2
- <script type="text/javascript">
3
- $(function() {
4
- $('#user_email').autocomplete({
5
- source: '/users/find.json',
6
- minLength: 3
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
- <h1>Benutzer zu Gruppe hinzufügen</h1>
14
+ <div class="page-header">
15
+ <h1>Benutzer zu Gruppe hinzufügen</h1>
16
+ </div>
13
17
 
14
- <%= form_for(@groups_user) do |f| %>
15
- <% if @groups_user.errors.any? %>
16
- <div id="error_explanation">
17
- <h2><%= pluralize(@groups_user.errors.count, "error") %> prohibited this groups_user from being saved:</h2>
18
-
19
- <ul>
20
- <% @groups_user.errors.full_messages.each do |msg| %>
21
- <li><%= msg %></li>
22
- <% end %>
23
- </ul>
24
- </div>
25
- <% end %>
26
-
27
- <%= f.hidden_field :group_id, :value => @group.id %>
28
- <div class="row">
29
- <%= f.label 'Gruppe' %>
30
- <div class="input uneditable-input">
31
- <%= @groups_user.group.name %>
32
- </div>
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
- <div class="row">
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
- <head>
4
- <title>GIS-Browser Admin</title>
5
- <%= stylesheet_link_tag :application, :media => "all" %>
6
- <% if HOST_ZONE[request.host] == 'intranet' %>
7
- <%= stylesheet_link_tag 'http://www.intranet.ktzh.ch/css/global.css' %>
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
- <body>
32
- <div id="wrapper">
33
- <div role="banner" id="logo">
34
- <img alt="Kanton Zürich" src="/img/logo.gif" class="logo">
35
- <div>
36
- <p class="identity one-line">
37
- <strong>Kanton Zürich</strong><a class="home" href="http://www.zh.ch/">Startseite</a>
38
- </p>
39
- </div>
40
- </div>
41
- <div id="nav-meta" role="navigation">
42
- <ul>
43
- <% if user_signed_in? %>
44
- <li><%= link_to current_user.login, edit_user_path(current_user) %></li>
45
- <li><%= link_to('Usergruppen', groups_users_path) %></li>
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
- <div id="main-area">
57
- <div id="content-column">
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
- <% if flash.present? %>
61
- <% flash.each do |key, value| %>
62
- <div class='<%= key == :alert ? 'error-required-box' : "alert-message #{key}" %>'>
63
- <p>
64
- <%= value %>
65
- </p>
66
- <br/>
67
- </div>
68
- <% end %>
69
- <% end %>
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
- <%= yield %>
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
- <hr />
74
- </div>
75
- </div>
76
+ <div class="container">
77
+ <%= yield %>
78
+ </div>
76
79
 
77
- <div id="footer" role="complementary">
78
-
79
- <h1 class="hidden">Hier finden Sie die Nutzungsregelungen und das Impressum</h1>
80
-
81
- <ul>
82
- <li class="copyright">
83
- &copy; 2013 Kanton Zürich
84
- </li>
85
- <li >
86
- <a href="http://www.zh.ch/internet/de/service/nav/footer/nutzungsregelungen.html" target="_blank">Nutzungsregelungen</a>
87
- </li>
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
+ &copy; 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
- <h2>Registrierung</h2>
1
+ <div class="page-header">
2
+ <h1>Registrierung</h1>
3
+ </div>
2
4
 
3
- <p>Besten Dank für die Registrierung!</p>
4
- <p>Sie werden benachrichtigt, sobald die Gruppe für Sie freigeschaltet ist.</p>
5
-
6
- <%= link_to "GIS-Browser starten", root_path %>
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
- <h2>Edit <%= resource_name.to_s.humanize %></h2>
1
+ <div class="page-header">
2
+ <h1>Login-Daten bearbeiten</h1>
3
+ </div>
2
4
 
3
- <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
4
- <%= devise_error_messages! %>
5
-
6
- <div class="row">
7
- <%= f.label :login %>
8
- <%= f.text_field :login %>
9
- </div>
10
-
11
- <div class="row">
12
- <%= f.label :email %>
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
- <div class="row">
36
- <%= f.label :token_authentication_key %>
37
- <p><%= resource.authentication_token.blank? ? "Token Empty" : resource.authentication_token %></p>
38
- </div>
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
- <div class="row">
41
- <%= link_to "Generate Token", token_authentications_path(:user_id => resource.id), :method => :post, :confirm => "Are you sure?" %>
42
- <%= link_to "Delete Token", token_authentication_path(resource), :method => :delete, :confirm => "Are you sure?" %>
43
- </div>
44
-
45
- <div class="row">
46
- <% if resource.authentication_token %>
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>&nbsp;</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 %>