gdonald-railsdb 0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. data/LICENSE.txt +674 -0
  2. data/README.txt +40 -0
  3. data/README_RAILS.txt +204 -0
  4. data/Rakefile +31 -0
  5. data/app/controllers/application.rb +24 -0
  6. data/app/controllers/database_controller.rb +274 -0
  7. data/app/controllers/home_controller.rb +366 -0
  8. data/app/helpers/application_helper.rb +43 -0
  9. data/app/helpers/home_helper.rb +2 -0
  10. data/app/models/database.rb +113 -0
  11. data/app/models/driver.rb +8 -0
  12. data/app/models/field.rb +117 -0
  13. data/app/models/group.rb +12 -0
  14. data/app/models/group_permission.rb +6 -0
  15. data/app/models/permission.rb +9 -0
  16. data/app/models/row.rb +26 -0
  17. data/app/models/switch.rb +85 -0
  18. data/app/models/table.rb +155 -0
  19. data/app/models/user.rb +98 -0
  20. data/app/models/user_group.rb +6 -0
  21. data/app/views/database/_field.html.erb +20 -0
  22. data/app/views/database/_field_form.html.erb +28 -0
  23. data/app/views/database/_insert_form.html.erb +37 -0
  24. data/app/views/database/_new_field.html.erb +43 -0
  25. data/app/views/database/_new_field_header.html.erb +12 -0
  26. data/app/views/database/_pagination.html.erb +14 -0
  27. data/app/views/database/_row.html.erb +16 -0
  28. data/app/views/database/_table.html.erb +22 -0
  29. data/app/views/database/_table_form.html.erb +45 -0
  30. data/app/views/database/add_fields.html.erb +3 -0
  31. data/app/views/database/add_table.html.erb +3 -0
  32. data/app/views/database/blank_field.rjs +6 -0
  33. data/app/views/database/browse.html.erb +30 -0
  34. data/app/views/database/del_field.html.erb +31 -0
  35. data/app/views/database/del_table.html.erb +31 -0
  36. data/app/views/database/edit_field.html.erb +23 -0
  37. data/app/views/database/edit_row.html.erb +22 -0
  38. data/app/views/database/index.html.erb +23 -0
  39. data/app/views/database/insert.html.erb +3 -0
  40. data/app/views/database/table.html.erb +30 -0
  41. data/app/views/home/_database.html.erb +8 -0
  42. data/app/views/home/_database_form.html.erb +68 -0
  43. data/app/views/home/_driver.html.erb +5 -0
  44. data/app/views/home/_driver_form.html.erb +25 -0
  45. data/app/views/home/_group.html.erb +10 -0
  46. data/app/views/home/_group_form.html.erb +25 -0
  47. data/app/views/home/_group_permission.html.erb +4 -0
  48. data/app/views/home/_permission.html.erb +6 -0
  49. data/app/views/home/_permission_form.html.erb +32 -0
  50. data/app/views/home/_user.html.erb +10 -0
  51. data/app/views/home/_user_form.html.erb +64 -0
  52. data/app/views/home/_user_group.html.erb +4 -0
  53. data/app/views/home/add_database.html.erb +3 -0
  54. data/app/views/home/add_driver.html.erb +3 -0
  55. data/app/views/home/add_group.html.erb +4 -0
  56. data/app/views/home/add_permission.html.erb +3 -0
  57. data/app/views/home/add_user.html.erb +62 -0
  58. data/app/views/home/bottom.html.erb +17 -0
  59. data/app/views/home/databases.html.erb +22 -0
  60. data/app/views/home/del_database.html.erb +31 -0
  61. data/app/views/home/del_driver.html.erb +32 -0
  62. data/app/views/home/del_group.html.erb +32 -0
  63. data/app/views/home/del_group_permission.html.erb +32 -0
  64. data/app/views/home/del_permission.html.erb +32 -0
  65. data/app/views/home/del_user.html.erb +33 -0
  66. data/app/views/home/del_user_group.html.erb +32 -0
  67. data/app/views/home/drivers.html.erb +20 -0
  68. data/app/views/home/edit_database.html.erb +3 -0
  69. data/app/views/home/edit_driver.html.erb +3 -0
  70. data/app/views/home/edit_group.html.erb +4 -0
  71. data/app/views/home/edit_permission.html.erb +4 -0
  72. data/app/views/home/edit_user.html.erb +84 -0
  73. data/app/views/home/group_permissions.html.erb +38 -0
  74. data/app/views/home/groups.html.erb +20 -0
  75. data/app/views/home/index.html.erb +21 -0
  76. data/app/views/home/login.html.erb +42 -0
  77. data/app/views/home/menu.html.erb +33 -0
  78. data/app/views/home/permissions.html.erb +21 -0
  79. data/app/views/home/top.html.erb +22 -0
  80. data/app/views/home/user_groups.html.erb +44 -0
  81. data/app/views/home/users.html.erb +27 -0
  82. data/app/views/layouts/application.html.erb +18 -0
  83. data/config/boot.rb +109 -0
  84. data/config/database.yml +14 -0
  85. data/config/environment.rb +114 -0
  86. data/config/environments/development.rb +18 -0
  87. data/config/environments/production.rb +19 -0
  88. data/config/environments/test.rb +22 -0
  89. data/config/initializers/inflections.rb +10 -0
  90. data/config/initializers/mime_types.rb +5 -0
  91. data/config/routes.rb +135 -0
  92. data/db/migrate/001_create_sessions.rb +17 -0
  93. data/db/migrate/002_create_users.rb +26 -0
  94. data/db/migrate/003_create_groups.rb +17 -0
  95. data/db/migrate/004_create_permissions.rb +18 -0
  96. data/db/migrate/005_create_group_permissions.rb +22 -0
  97. data/db/migrate/006_create_user_groups.rb +19 -0
  98. data/db/migrate/007_create_drivers.rb +17 -0
  99. data/db/migrate/008_create_databases.rb +43 -0
  100. data/db/schema.rb +91 -0
  101. data/lib/ignore +0 -0
  102. data/log/ignore +0 -0
  103. data/public/404.html +30 -0
  104. data/public/422.html +30 -0
  105. data/public/500.html +30 -0
  106. data/public/dispatch.cgi +10 -0
  107. data/public/dispatch.fcgi +24 -0
  108. data/public/dispatch.rb +10 -0
  109. data/public/favicon.ico +0 -0
  110. data/public/images/rails.png +0 -0
  111. data/public/images/ss1.png +0 -0
  112. data/public/images/ss2.png +0 -0
  113. data/public/images/ss3.png +0 -0
  114. data/public/images/ss4.png +0 -0
  115. data/public/images/ss5.png +0 -0
  116. data/public/images/ss6.png +0 -0
  117. data/public/javascripts/application.js +25 -0
  118. data/public/javascripts/controls.js +963 -0
  119. data/public/javascripts/dragdrop.js +972 -0
  120. data/public/javascripts/effects.js +1120 -0
  121. data/public/javascripts/prototype.js +4225 -0
  122. data/public/robots.txt +4 -0
  123. data/public/stylesheets/railsdb.css +227 -0
  124. data/script/about +3 -0
  125. data/script/console +3 -0
  126. data/script/destroy +3 -0
  127. data/script/generate +3 -0
  128. data/script/performance/benchmarker +3 -0
  129. data/script/performance/profiler +3 -0
  130. data/script/performance/request +3 -0
  131. data/script/plugin +3 -0
  132. data/script/process/inspector +3 -0
  133. data/script/process/reaper +3 -0
  134. data/script/process/spawner +3 -0
  135. data/script/runner +3 -0
  136. data/script/server +3 -0
  137. data/test/fixtures/databases.yml +7 -0
  138. data/test/fixtures/drivers.yml +7 -0
  139. data/test/fixtures/group_permissions.yml +7 -0
  140. data/test/fixtures/groups.yml +7 -0
  141. data/test/fixtures/permissions.yml +7 -0
  142. data/test/fixtures/user_groups.yml +7 -0
  143. data/test/fixtures/users.yml +18 -0
  144. data/test/functional/home_controller_test.rb +8 -0
  145. data/test/test_helper.rb +38 -0
  146. data/test/unit/database_test.rb +8 -0
  147. data/test/unit/driver_test.rb +8 -0
  148. data/test/unit/group_permission_test.rb +8 -0
  149. data/test/unit/group_test.rb +8 -0
  150. data/test/unit/permission_test.rb +8 -0
  151. data/test/unit/user_group_test.rb +8 -0
  152. data/test/unit/user_test.rb +9 -0
  153. data/tmp/pids/ignore +0 -0
  154. data/tmp/sessions/ignore +0 -0
  155. data/tmp/sockets/ignore +0 -0
  156. metadata +287 -0
@@ -0,0 +1,32 @@
1
+ <h2><%= link_to 'Drivers', :controller => 'home', :action => 'drivers' %> &#187; Delete Driver</h2>
2
+
3
+ <table class="form">
4
+ <thead>
5
+ <tr>
6
+ <td>Delete Confirmation</td>
7
+ </tr>
8
+ </thead>
9
+ <tbody>
10
+ <tr<%= alt %>>
11
+ <td>Are you sure you want to delete this driver?<br /><br />All data associated with this driver will also be deleted.</td>
12
+ </tr>
13
+ </tbody>
14
+ <tfoot>
15
+ <tr>
16
+ <td align="right">
17
+ <table class="tight">
18
+ <tr>
19
+ <% form_tag( { :controller => 'home', :action => 'drivers' }, :method => 'get' ) do -%>
20
+ <td class="cancel"><input type="submit" name="submit" value="Cancel"></td>
21
+ <% end -%>
22
+ <% form_for :driver do |f| -%>
23
+ <%= f.hidden_field :id, :value => @driver.id %>
24
+ <td><input type="submit" name="submit" value="Delete"></td>
25
+ <% end -%>
26
+ </tr>
27
+ </table>
28
+ </td>
29
+ </tr>
30
+ </tfoot>
31
+ </table>
32
+
@@ -0,0 +1,32 @@
1
+ <h2><%= link_to 'Groups', :controller => 'home', :action => 'groups' %> &#187; Delete Group</h2>
2
+
3
+ <table class="form">
4
+ <thead>
5
+ <tr>
6
+ <td>Delete Confirmation</td>
7
+ </tr>
8
+ </thead>
9
+ <tbody>
10
+ <tr<%= alt %>>
11
+ <td>Are you sure you want to delete this group?<br /><br />All data associated with this group will also be deleted.</td>
12
+ </tr>
13
+ </tbody>
14
+ <tfoot>
15
+ <tr>
16
+ <td align="right">
17
+ <table class="tight">
18
+ <tr>
19
+ <% form_tag( { :controller => 'home', :action => 'groups' }, :method => 'get' ) do -%>
20
+ <td class="cancel"><input type="submit" name="submit" value="Cancel"></td>
21
+ <% end -%>
22
+ <% form_for :group do |f| -%>
23
+ <%= f.hidden_field :id, :value => @group.id %>
24
+ <td><input type="submit" name="submit" value="Delete"></td>
25
+ <% end -%>
26
+ </tr>
27
+ </table>
28
+ </td>
29
+ </tr>
30
+ </tfoot>
31
+ </table>
32
+
@@ -0,0 +1,32 @@
1
+ <h2><%= link_to 'Groups', :controller => 'home', :action => 'groups' %> &#187; <%= link_to "&quot;#{h @group.name}&quot; Permissions", :controller => 'home', :action => 'group_permissions', :id => @group.id %> &#187; Delete &quot;<%= h @permission.name %>&quot; Permission</h2>
2
+
3
+ <table class="form">
4
+ <thead>
5
+ <tr>
6
+ <td>Delete Confirmation</td>
7
+ </tr>
8
+ </thead>
9
+ <tbody>
10
+ <tr<%= alt %>>
11
+ <td>Are you sure you want to delete this group?<br /><br />All data associated with this group will also be deleted.</td>
12
+ </tr>
13
+ </tbody>
14
+ <tfoot>
15
+ <tr>
16
+ <td align="right">
17
+ <table class="tight">
18
+ <tr>
19
+ <% form_tag( { :controller => 'home', :action => 'group_permissions', :id => @group.id }, :method => 'get' ) do -%>
20
+ <td class="cancel"><input type="submit" name="submit" value="Cancel"></td>
21
+ <% end -%>
22
+ <% form_for :group_permission do |f| -%>
23
+ <%= f.hidden_field :id, :value => @group_permission.id %>
24
+ <td><input type="submit" name="submit" value="Delete"></td>
25
+ <% end -%>
26
+ </tr>
27
+ </table>
28
+ </td>
29
+ </tr>
30
+ </tfoot>
31
+ </table>
32
+
@@ -0,0 +1,32 @@
1
+ <h2><%= link_to 'Permissions', :controller => 'home', :action => 'permissions' %> &#187; Delete Permission</h2>
2
+
3
+ <table class="form">
4
+ <thead>
5
+ <tr>
6
+ <td>Delete Confirmation</td>
7
+ </tr>
8
+ </thead>
9
+ <tbody>
10
+ <tr<%= alt %>>
11
+ <td>Are you sure you want to delete this permission?<br /><br />All data associated with this permission will also be deleted.</td>
12
+ </tr>
13
+ </tbody>
14
+ <tfoot>
15
+ <tr>
16
+ <td align="right">
17
+ <table class="tight">
18
+ <tr>
19
+ <% form_tag( { :controller => 'home', :action => 'permissions' }, :method => 'get' ) do -%>
20
+ <td class="cancel"><input type="submit" name="submit" value="Cancel"></td>
21
+ <% end -%>
22
+ <% form_for :permission do |f| -%>
23
+ <%= f.hidden_field :id, :value => @permission.id %>
24
+ <td><input type="submit" name="submit" value="Delete"></td>
25
+ <% end -%>
26
+ </tr>
27
+ </table>
28
+ </td>
29
+ </tr>
30
+ </tfoot>
31
+ </table>
32
+
@@ -0,0 +1,33 @@
1
+ <h2><%= link_to 'Users', :controller => 'home', :action => 'users' %> &#187; Delete User &quot;<%= @user.lname %>, <%= @user.fname %>&quot;</h2>
2
+
3
+ <table class="form">
4
+ <thead>
5
+ <tr>
6
+ <td>Delete Confirmation</td>
7
+ </tr>
8
+ </thead>
9
+ <tbody>
10
+ <tr<%= alt %>>
11
+ <td>Are you sure you want to delete this user?<br /><br />Any data associated with this user will also be deleted.</td>
12
+ </tr>
13
+ </tbody>
14
+ <tfoot>
15
+ <tr>
16
+ <td align="right">
17
+ <table class="tight">
18
+ <tr>
19
+ <% form_tag( { :controller => 'home', :action => 'users' }, :method => 'get' ) do -%>
20
+ <td class="cancel"><input type="submit" name="submit" value="Cancel"></td>
21
+ <% end -%>
22
+ <% form_for :user do |f| -%>
23
+ <%= f.hidden_field :id, :value => @user.id %>
24
+ <td><input type="submit" name="submit" value="Delete"></td>
25
+ <% end -%>
26
+ </tr>
27
+ </table>
28
+ </td>
29
+ </tr>
30
+ </tfoot>
31
+ </table>
32
+
33
+
@@ -0,0 +1,32 @@
1
+ <h2>Delete &quot;<%= h @user_group.group.name %>&quot; Group</h2>
2
+
3
+ <table class="form">
4
+ <thead>
5
+ <tr>
6
+ <td>Delete Confirmation</td>
7
+ </tr>
8
+ </thead>
9
+ <tbody>
10
+ <tr<%= alt %>>
11
+ <td>Are you sure you want to delete this group? All<br />data associated with this group will also be deleted.</td>
12
+ </tr>
13
+ </tbody>
14
+ <tfoot>
15
+ <tr>
16
+ <td>
17
+ <table class="tight">
18
+ <tr>
19
+ <% form_tag( { :controller => 'home', :action => 'user_groups', :id => @user_group.user.id }, :method => 'get' ) do -%>
20
+ <td class="cancel"><input type="submit" name="submit" value="Cancel"></td>
21
+ <% end -%>
22
+ <% form_for :user_group do |f| -%>
23
+ <%= f.hidden_field :id, :value => @user_group.id %>
24
+ <td><input type="submit" name="submit" value="Delete"></td>
25
+ <% end -%>
26
+ </tr>
27
+ </table>
28
+ </td>
29
+ </tr>
30
+ </tfoot>
31
+ </table>
32
+
@@ -0,0 +1,20 @@
1
+ <h2>Drivers</h2>
2
+
3
+ <table class="data">
4
+ <thead>
5
+ <tr>
6
+ <td>Name</td>
7
+ <td colspan="2" align="right"><%= link_to 'Add', { :controller => 'home', :action => 'add_driver' }, :class => 'add' %></td>
8
+ </tr>
9
+ </thead>
10
+ <tbody>
11
+ <% if @drivers.size > 0 -%>
12
+ <%= render :partial => 'home/driver', :collection => @drivers %>
13
+ <% else -%>
14
+ <tr<%= alt %>>
15
+ <td colspan="3">No drivers found</td>
16
+ </tr>
17
+ <% end -%>
18
+ </tbody>
19
+ </table>
20
+
@@ -0,0 +1,3 @@
1
+ <h2><%= link_to 'Databases', :controller => 'home', :action => 'databases' %> &#187; Edit Database</h2>
2
+
3
+ <%= render :partial => 'home/database_form' %>
@@ -0,0 +1,3 @@
1
+ <h2><%= link_to 'Drivers', :controller => 'home', :action => 'drivers' %> &#187; Edit Driver</h2>
2
+
3
+ <%= render :partial => 'home/driver_form' %>
@@ -0,0 +1,4 @@
1
+ <h2><%= link_to 'Groups', :controller => 'home', :action => 'groups' %> &#187; Edit Group</h2>
2
+
3
+ <%= render :partial => 'home/group_form' %>
4
+
@@ -0,0 +1,4 @@
1
+ <h2><%= link_to 'Permissions', :controller => 'home', :action => 'permissions' %> &#187; Edit Permission</h2>
2
+
3
+ <%= render :partial => 'home/permission_form' %>
4
+
@@ -0,0 +1,84 @@
1
+ <h2><%= link_to 'Users', :controller => 'home', :action => 'users' %> &#187; Edit <%= @user.lname %>, <%= @user.fname %></h2>
2
+
3
+ <% form_for :user do |f| -%>
4
+ <%= f.hidden_field :id, :value => @user.id %>
5
+
6
+ <table class="form">
7
+ <thead>
8
+ <tr>
9
+ <td colspan="2">User Form</td>
10
+ </tr>
11
+ </thead>
12
+ <tbody>
13
+ <tr<%= alt %>>
14
+ <td>First Name:</td>
15
+ <td><%= f.text_field :fname, :size => 16 %>
16
+ <% if @user.errors['fname'] -%>
17
+ <span class="error"><%= @user.errors['fname'] %></span>
18
+ <% end -%></td>
19
+ </tr>
20
+ <tr<%= alt %>>
21
+ <td>Last Name:</td>
22
+ <td><%= f.text_field :lname, :size => 16 %>
23
+ <% if @user.errors['lname'] -%>
24
+ <span class="error"><%= @user.errors['lname'] %></span>
25
+ <% end -%></td>
26
+ </tr>
27
+ <tr<%= alt %>>
28
+ <td>Username:</td>
29
+ <td><%= f.text_field :username, :size => 12 %>
30
+ <% if @user.errors['username'] -%>
31
+ <span class="error"><%= @user.errors['username'] %></span>
32
+ <% end -%></td>
33
+ </tr>
34
+ <tr<%= alt %>>
35
+ <td>Email:</td>
36
+ <td><%= f.text_field :email, :size => 24 %>
37
+ <% if @user.errors['email'] -%>
38
+ <span class="error"><%= @user.errors['email'] %></span>
39
+ <% end -%></td>
40
+ </tr>
41
+ </tbody>
42
+ <tfoot>
43
+ <tr class="label">
44
+ <td colspan="2" align="right"><input type="submit" name="submit" value="Submit"></td>
45
+ </tr>
46
+ </tfoot>
47
+ </table>
48
+
49
+ <% end -%>
50
+
51
+ <% form_for :user, :url => { :controller => 'home', :action => 'update_pass' } do |f| -%>
52
+ <%= f.hidden_field :id, :value => @user.id %>
53
+
54
+ <table class="form">
55
+ <thead>
56
+ <tr>
57
+ <td colspan="2">Update Password</td>
58
+ </tr>
59
+ </thead>
60
+ <tbody>
61
+ <tr<%= alt %>>
62
+ <td>Password:</td>
63
+ <td><%= f.password_field :password, :size => 16 %>
64
+ <% if @user.errors['password'] -%>
65
+ <span class="error"><%= @user.errors['password'] %></span>
66
+ <% end -%></td>
67
+ </tr>
68
+ <tr<%= alt %>>
69
+ <td>Confirm Password:</td>
70
+ <td><%= f.password_field :password_confirmation, :size => 16 %>
71
+ <% if @user.errors['password_confirmation'] -%>
72
+ <span class="error"><%= @user.errors['password_confirmation'] %></span>
73
+ <% end -%></td>
74
+ </tr>
75
+ </tbody>
76
+ <tfoot>
77
+ <tr class="label">
78
+ <td colspan="2" align="right"><input type="submit" name="submit" value="Submit"></td>
79
+ </tr>
80
+ </tfoot>
81
+ </table>
82
+
83
+ <% end -%>
84
+
@@ -0,0 +1,38 @@
1
+ <h2><%= link_to 'Groups', :controller => 'home', :action => 'groups' %> &#187; &quot;<%= @group.name %>&quot; Permissions</h2>
2
+
3
+ <table class="data">
4
+ <thead>
5
+ <tr>
6
+ <td colspan="2">Group</td>
7
+ </tr>
8
+ </thead>
9
+ <tbody>
10
+ <% if @group_permissions.size > 0 -%>
11
+ <%= render :partial => 'home/group_permission', :collection => @group_permissions %>
12
+ <% else -%>
13
+ <tr class="alt">
14
+ <td colspan="2">No group permissions found</td>
15
+ </tr>
16
+ <% end -%>
17
+ </tbody>
18
+ </table>
19
+
20
+ <% form_tag :controller => 'home', :action => 'add_group_permission' do -%>
21
+ <%= hidden_field_tag 'group_id', @group.id %>
22
+
23
+ <table class="form">
24
+ <thead>
25
+ <tr>
26
+ <td colspan="2">Add Permission</td>
27
+ </tr>
28
+ </thead>
29
+ <tbody>
30
+ <tr<%= alt %>>
31
+ <td><%= select_tag 'permission_id', '<option value="">&nbsp;</option>' + options_from_collection_for_select( @permissions, 'id', 'name' ) %></td>
32
+ <td><%= submit_tag 'Add' %></td>
33
+ </tr>
34
+ </tbody>
35
+ </table>
36
+
37
+ <% end -%>
38
+
@@ -0,0 +1,20 @@
1
+ <h2>Groups</h2>
2
+
3
+ <table class="data">
4
+ <thead>
5
+ <tr>
6
+ <td>Name</td>
7
+ <td>Permissions</td>
8
+ <td colspan="2" align="right"><%= link_to 'Add', { :controller => 'home', :action => 'add_group' }, :class => 'add' %></td>
9
+ </tr>
10
+ </thead>
11
+ <tbody>
12
+ <% if @groups.size > 0 -%>
13
+ <%= render :partial => 'home/group', :collection => @groups %>
14
+ <% else -%>
15
+ <tr<%= alt %>>
16
+ <td colspan="4">No groups found</td>
17
+ </tr>
18
+ <% end -%>
19
+ </tbody>
20
+ </table>
@@ -0,0 +1,21 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6
+ <title><%= SITE_TITLE %></title>
7
+ <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
8
+ <script language="javascript" type="text/javascript">
9
+ if(top.location != self.location) top.location = self.location;
10
+ </script>
11
+ <base target="main" />
12
+ </head>
13
+ <frameset rows="60,*,18" border="0" frameborder="0">
14
+ <frame src="<%= url_for :controller => 'home', :action => 'top' %>" name="top" border="0" frameborder="0" />
15
+ <frameset cols="160,*" border="0" frameborder="0">
16
+ <frame src="<%= url_for :controller => 'home', :action => 'menu' %>" name="menu" border="0" frameborder="0" />
17
+ <frame src="<%= url_for :controller => 'home', :action => 'databases' %>" name="main" border="0" frameborder="0" />
18
+ </frameset>
19
+ <frame src="<%= url_for :controller => 'home', :action => 'bottom' %>" name="bottom" border="0" frameborder="0" />
20
+ </frameset>
21
+ </html>
@@ -0,0 +1,42 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html>
4
+ <head>
5
+ <title><%= SITE_TITLE %> Login</title>
6
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
7
+ <script language="javascript" type="text/javascript">
8
+ if(top.location != self.location) top.location = self.location;
9
+ </script>
10
+ <%= stylesheet_link_tag 'railsdb' %>
11
+ </head>
12
+ <body>
13
+ <h1 style="text-align:center"><%= SITE_TITLE %></h1>
14
+ <% form_tag :controller => 'home', :action => 'login' do -%>
15
+ <% if flash[:notice] -%>
16
+ <p class="error" style="text-align:center; margin: 8px 0 0 0;"><%= flash[:notice] %></p>
17
+ <% end -%>
18
+ <table class="form" style="margin: 10px auto;">
19
+ <thead>
20
+ <tr>
21
+ <td colspan="2">Login</td>
22
+ </tr>
23
+ </thead>
24
+ <tbody>
25
+ <tr class="alt2">
26
+ <td class="label">Username/Email:</td>
27
+ <td><%= text_field :login, 'username', :size => 12 %></td>
28
+ </tr>
29
+ <tr class="alt2">
30
+ <td class="label">Password:</td>
31
+ <td><%= password_field :login, 'password', :size => 12 %></td>
32
+ </tr>
33
+ </tbody>
34
+ <tfoot>
35
+ <tr>
36
+ <td colspan="2"><%= submit_tag 'Login', "class" => "button" %></td>
37
+ </tr>
38
+ </tfoot>
39
+ </table>
40
+ <% end -%>
41
+ </body>
42
+ </html>