dbdoc_engine 0.1.0 → 0.1.1
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 +4 -4
- data/README.md +8 -8
- data/app/controllers/dbdoc_engine/{admin → dbdoc_admin}/base_controller.rb +1 -1
- data/app/controllers/dbdoc_engine/{admin → dbdoc_admin}/dashboard_controller.rb +1 -1
- data/app/controllers/dbdoc_engine/{admin → dbdoc_admin}/data_transfer_controller.rb +1 -1
- data/app/controllers/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables_controller.rb +4 -4
- data/app/controllers/dbdoc_engine/{admin → dbdoc_admin}/db_design_table_groups_controller.rb +6 -6
- data/app/helper/dbdoc_engine/application_helper.rb +1 -1
- data/app/javascript/dbdoc_engine/controllers/column_controller.js +2 -2
- data/app/javascript/dbdoc_engine/controllers/table_group_validation_controller.js +1 -1
- data/app/services/dbdoc_engine/db_design_dynamic_table_handler_service.rb +2 -2
- data/app/views/dbdoc_engine/{admin → dbdoc_admin}/dashboard/_changelog_rows.html.erb +1 -1
- data/app/views/dbdoc_engine/{admin → dbdoc_admin}/dashboard/_filter_fields.html.erb +1 -1
- data/app/views/dbdoc_engine/{admin → dbdoc_admin}/dashboard/index.html.erb +7 -7
- data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables/_deleted_table_index.html.erb +2 -2
- data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables/_form.html.erb +1 -1
- data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables/_recent_activity.html.erb +1 -1
- data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables/_table_index.html.erb +6 -6
- data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables/deleted_tables.html.erb +6 -6
- data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables/edit.html.erb +2 -2
- data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables/export_all_to_excel.xlsx.axlsx +1 -1
- data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables/export_to_excel.xlsx.axlsx +1 -1
- data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables/index.html.erb +6 -6
- data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables/new.html.erb +2 -2
- data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables/show_table_info.html.erb +3 -3
- data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_table_groups/_deleted_table_groups_list.html.erb +3 -3
- data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_table_groups/_form.html.erb +1 -1
- data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_table_groups/_table_groups_list.html.erb +3 -3
- data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_table_groups/deleted_groups.html.erb +5 -5
- data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_table_groups/edit.html.erb +2 -2
- data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_table_groups/index.html.erb +5 -5
- data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_table_groups/new.html.erb +2 -2
- data/app/views/dbdoc_engine/shared/_admin_header.html.erb +3 -3
- data/app/views/dbdoc_engine/shared/_header.html.erb +1 -1
- data/config/routes.rb +1 -1
- data/lib/dbdoc_engine/version.rb +1 -1
- metadata +33 -33
- /data/app/views/dbdoc_engine/{admin → dbdoc_admin}/dashboard/_action_badge.html.erb +0 -0
- /data/app/views/dbdoc_engine/{admin → dbdoc_admin}/dashboard/_changelog_table_headers.html.erb +0 -0
- /data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables/_column_fields.html.erb +0 -0
- /data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables/_foreign_key_fields.html.erb +0 -0
- /data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables/_table_columns.html.erb +0 -0
- /data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables/_table_information.html.erb +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a5c05d1f1df4416bebd53604fa01d1ea4570b864651555749c86d64ed9549922
|
|
4
|
+
data.tar.gz: 1e66a51947dba7bb6d79f1defdb37885db32cf0af1d15cfe321ddfd7ab756dc3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf932578f22434bce6c959ba1e67a151fdca9b9dfc9fe3b809e31b354fd77291da9d6a10c299c617807e608c6a6b563eb8661b823811c88b0ad224841d7a2c2a
|
|
7
|
+
data.tar.gz: 9eb7848a6b4037c5d07444588579526e2e51e935ca6ddeed9e52d3b1e4e6fa77e575b4255d962e04f73cfd4e94e9e7a2c113d2a48453a865a23e0f3d8e4a6c9d
|
data/README.md
CHANGED
|
@@ -141,14 +141,14 @@ All tables are namespaced to avoid conflicts with your application:
|
|
|
141
141
|
|
|
142
142
|
| Method | Path | Description |
|
|
143
143
|
|--------|------|-------------|
|
|
144
|
-
| GET | `/dbdoc/
|
|
145
|
-
| CRUD | `/dbdoc/
|
|
146
|
-
| CRUD | `/dbdoc/
|
|
147
|
-
| GET | `/dbdoc/
|
|
148
|
-
| POST | `/dbdoc/
|
|
149
|
-
| POST | `/dbdoc/
|
|
150
|
-
| GET | `/dbdoc/
|
|
151
|
-
| GET | `/dbdoc/
|
|
144
|
+
| GET | `/dbdoc/dbdoc_admin/dashboard` | Admin dashboard |
|
|
145
|
+
| CRUD | `/dbdoc/dbdoc_admin/db_design_dynamic_tables` | Table management |
|
|
146
|
+
| CRUD | `/dbdoc/dbdoc_admin/db_design_table_groups` | Group management |
|
|
147
|
+
| GET | `/dbdoc/dbdoc_admin/export_data` | Export documentation as JSON |
|
|
148
|
+
| POST | `/dbdoc/dbdoc_admin/import_data` | Import documentation from JSON |
|
|
149
|
+
| POST | `/dbdoc/dbdoc_admin/import_schema` | Import from schema.rb |
|
|
150
|
+
| GET | `/dbdoc/dbdoc_admin/.../export_to_excel` | Export single table as Excel |
|
|
151
|
+
| GET | `/dbdoc/dbdoc_admin/.../export_all_to_excel` | Export all tables as Excel |
|
|
152
152
|
|
|
153
153
|
---
|
|
154
154
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# This is the base controller for all admin-related controllers.
|
|
2
2
|
# It ensures authentication and defines shared helper methods for permission checks.
|
|
3
3
|
module DbdocEngine
|
|
4
|
-
class
|
|
4
|
+
class DbdocAdmin::BaseController < ApplicationController
|
|
5
5
|
# Ensure that only authenticated users can access admin controllers
|
|
6
6
|
before_action :require_authentication
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Dashbord controller
|
|
2
2
|
module DbdocEngine
|
|
3
|
-
class
|
|
3
|
+
class DbdocAdmin::DashboardController < DbdocAdmin::BaseController
|
|
4
4
|
def index
|
|
5
5
|
@groups_count = AdminDashboardQueries.groups_count
|
|
6
6
|
@tables_count = AdminDashboardQueries.tables_count
|
data/app/controllers/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables_controller.rb
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Controller for managing dynamic tables
|
|
2
2
|
module DbdocEngine
|
|
3
|
-
class
|
|
3
|
+
class DbdocAdmin::DbDesignDynamicTablesController < DbdocAdmin::BaseController
|
|
4
4
|
before_action :require_admin, only: %i[new create edit update destroy]
|
|
5
5
|
before_action :require_superadmin, only: [ :deleted_tables ]
|
|
6
6
|
before_action :set_table, only: %i[edit update destroy restore permanent_destroy]
|
|
@@ -60,19 +60,19 @@ module DbdocEngine
|
|
|
60
60
|
# Deletes a table (soft delete)
|
|
61
61
|
def destroy
|
|
62
62
|
handle_table_action(:soft_delete, @table.table_name, I18n.t("dbdoc.table_deletion"),
|
|
63
|
-
|
|
63
|
+
dbdoc_admin_db_design_dynamic_tables_path)
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
# Permanently deletes a table
|
|
67
67
|
def permanent_destroy
|
|
68
68
|
handle_table_action(:permanent_destroy, @table.table_name, I18n.t("dbdoc.table_permanent_deletion"),
|
|
69
|
-
|
|
69
|
+
deleted_tables_dbdoc_admin_db_design_dynamic_tables_path)
|
|
70
70
|
end
|
|
71
71
|
|
|
72
72
|
# Restores a soft-deleted table
|
|
73
73
|
def restore
|
|
74
74
|
handle_table_action(:restore, @table.table_name, I18n.t("dbdoc.table_restore"),
|
|
75
|
-
|
|
75
|
+
deleted_tables_dbdoc_admin_db_design_dynamic_tables_path)
|
|
76
76
|
end
|
|
77
77
|
|
|
78
78
|
# Renders additional column fields dynamically
|
data/app/controllers/dbdoc_engine/{admin → dbdoc_admin}/db_design_table_groups_controller.rb
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Controller for managing table groups in the admin panel.
|
|
2
2
|
# It provides CRUD operations, soft deletion, restoration, and permanent deletion.
|
|
3
3
|
module DbdocEngine
|
|
4
|
-
class
|
|
4
|
+
class DbdocAdmin::DbDesignTableGroupsController < DbdocAdmin::BaseController
|
|
5
5
|
before_action :require_admin, only: %i[new create edit update destroy]
|
|
6
6
|
before_action :require_superadmin, only: [:deleted_groups]
|
|
7
7
|
before_action :set_table_group, only: %i[edit update destroy restore permanent_destroy]
|
|
@@ -34,7 +34,7 @@ module DbdocEngine
|
|
|
34
34
|
|
|
35
35
|
if result[:success]
|
|
36
36
|
flash[:notice] = result[:message]
|
|
37
|
-
redirect_to
|
|
37
|
+
redirect_to dbdoc_admin_db_design_table_groups_path
|
|
38
38
|
else
|
|
39
39
|
flash[:alert] = result[:message]
|
|
40
40
|
@table_group = result[:table_group]
|
|
@@ -51,7 +51,7 @@ module DbdocEngine
|
|
|
51
51
|
|
|
52
52
|
if result[:success]
|
|
53
53
|
flash[:notice] = result[:message]
|
|
54
|
-
redirect_to
|
|
54
|
+
redirect_to dbdoc_admin_db_design_table_groups_path
|
|
55
55
|
else
|
|
56
56
|
flash[:alert] = result[:message]
|
|
57
57
|
render :edit, status: :unprocessable_entity
|
|
@@ -68,7 +68,7 @@ module DbdocEngine
|
|
|
68
68
|
flash[:alert] = result[:errors].join(', ')
|
|
69
69
|
end
|
|
70
70
|
|
|
71
|
-
redirect_to
|
|
71
|
+
redirect_to dbdoc_admin_db_design_table_groups_path
|
|
72
72
|
end
|
|
73
73
|
|
|
74
74
|
# Restores a soft-deleted table group.
|
|
@@ -81,7 +81,7 @@ module DbdocEngine
|
|
|
81
81
|
flash[:alert] = result[:errors].join(', ')
|
|
82
82
|
end
|
|
83
83
|
|
|
84
|
-
redirect_to
|
|
84
|
+
redirect_to deleted_groups_dbdoc_admin_db_design_table_groups_path(show_deleted: true)
|
|
85
85
|
end
|
|
86
86
|
|
|
87
87
|
# Permanently deletes a table group.
|
|
@@ -94,7 +94,7 @@ module DbdocEngine
|
|
|
94
94
|
flash[:alert] = result[:errors].join(', ')
|
|
95
95
|
end
|
|
96
96
|
|
|
97
|
-
redirect_to
|
|
97
|
+
redirect_to deleted_groups_dbdoc_admin_db_design_table_groups_path(show_deleted: true)
|
|
98
98
|
end
|
|
99
99
|
|
|
100
100
|
private
|
|
@@ -9,8 +9,8 @@ export default class extends Controller {
|
|
|
9
9
|
static targets = ["columns", "destroyField", "searchInput"]
|
|
10
10
|
|
|
11
11
|
get adminPath() {
|
|
12
|
-
const match = window.location.pathname.match(/(.+?)\/
|
|
13
|
-
return match ? `${match[1]}/
|
|
12
|
+
const match = window.location.pathname.match(/(.+?)\/dbdoc_admin/);
|
|
13
|
+
return match ? `${match[1]}/dbdoc_admin` : "/dbdoc_admin";
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -25,7 +25,7 @@ export default class extends Controller {
|
|
|
25
25
|
async fetchExistingGroupNames() {
|
|
26
26
|
try {
|
|
27
27
|
const tableGroupId = this.element.dataset.tableGroupId || ""; // Get the group ID (empty if creating)
|
|
28
|
-
const response = await fetch(`/
|
|
28
|
+
const response = await fetch(`/dbdoc_admin/db_design_table_groups/existing_names?id=${tableGroupId}`);
|
|
29
29
|
|
|
30
30
|
if (response.ok) {
|
|
31
31
|
this.existingGroupNames = await response.json();
|
|
@@ -13,7 +13,7 @@ module DbdocEngine
|
|
|
13
13
|
|
|
14
14
|
if result[:success]
|
|
15
15
|
@controller.flash[:notice] = I18n.t("dbdoc.table_creation") # Success message
|
|
16
|
-
@controller.redirect_to @controller.
|
|
16
|
+
@controller.redirect_to @controller.dbdoc_admin_db_design_dynamic_tables_path # Redirect to the table list
|
|
17
17
|
else
|
|
18
18
|
handle_failure(result, :new) # Handle failure (render 'new' view)
|
|
19
19
|
end
|
|
@@ -25,7 +25,7 @@ module DbdocEngine
|
|
|
25
25
|
|
|
26
26
|
if result[:success]
|
|
27
27
|
@controller.flash[:notice] = I18n.t("dbdoc.table_updation") # Success message
|
|
28
|
-
@controller.redirect_to @controller.
|
|
28
|
+
@controller.redirect_to @controller.dbdoc_admin_db_design_dynamic_tables_path # Redirect to the table list
|
|
29
29
|
else
|
|
30
30
|
handle_failure(result, :edit) # Handle failure (render 'edit' view)
|
|
31
31
|
end
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<td class='contents-changelog'><%= log.change_timestamp.strftime('%Y-%m-%d %H:%M:%S') %></td>
|
|
8
8
|
<td>
|
|
9
9
|
<!-- Render a partial to display an action badge based on the action type -->
|
|
10
|
-
<%= render 'dbdoc_engine/
|
|
10
|
+
<%= render 'dbdoc_engine/dbdoc_admin/dashboard/action_badge', action_type: log.action_type %>
|
|
11
11
|
</td>
|
|
12
12
|
<!-- Display the change description with a max width of 250px and text truncation -->
|
|
13
13
|
<td class='contents-changelog'><%= log.changed_by %> <%= log.description %></td>
|
|
@@ -38,6 +38,6 @@
|
|
|
38
38
|
<!-- Button to apply filters -->
|
|
39
39
|
<%= f.submit 'Apply Filters', class: 'btn applybutton' %>
|
|
40
40
|
<!-- Button to clear filters and reset the form -->
|
|
41
|
-
<%= link_to 'Clear Filters', dbdoc_engine.
|
|
41
|
+
<%= link_to 'Clear Filters', dbdoc_engine.dbdoc_admin_dashboard_path, class: 'btn clear-button' %>
|
|
42
42
|
</div>
|
|
43
43
|
</div>
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
<%# Action Cards Row %>
|
|
58
58
|
<div class='dashboard-action-row'>
|
|
59
|
-
<%= link_to dbdoc_engine.
|
|
59
|
+
<%= link_to dbdoc_engine.export_all_to_excel_dbdoc_admin_db_design_dynamic_tables_path(format: :xlsx),
|
|
60
60
|
target: '_blank', data: { turbo: false }, class: 'action-card action-card-excel text-decoration-none' do %>
|
|
61
61
|
<div class='action-card-icon'><i class="bi bi-file-earmark-spreadsheet"></i></div>
|
|
62
62
|
<div class='action-card-body'>
|
|
@@ -118,16 +118,16 @@
|
|
|
118
118
|
<div class='d-flex align-items-center justify-content-between mb-3'>
|
|
119
119
|
<div class='dashboard-section-title mb-0'><i class="bi bi-clock-history me-2"></i><%= t('dbdoc.recentactivity') %></div>
|
|
120
120
|
<div class='filter-buttons'>
|
|
121
|
-
<%= link_to t('dbdoc.allactions'), dbdoc_engine.
|
|
121
|
+
<%= link_to t('dbdoc.allactions'), dbdoc_engine.dbdoc_admin_dashboard_path,
|
|
122
122
|
class: "filter-button #{'active' unless params[:action_type]}",
|
|
123
123
|
data: { turbo_action: 'replace' } %>
|
|
124
|
-
<%= link_to t('dbdoc.create'), dbdoc_engine.
|
|
124
|
+
<%= link_to t('dbdoc.create'), dbdoc_engine.dbdoc_admin_dashboard_path(action_type: 'create'),
|
|
125
125
|
class: "filter-button #{'active' if params[:action_type] == 'create'}",
|
|
126
126
|
data: { turbo_action: 'replace' } %>
|
|
127
|
-
<%= link_to t('dbdoc.update'), dbdoc_engine.
|
|
127
|
+
<%= link_to t('dbdoc.update'), dbdoc_engine.dbdoc_admin_dashboard_path(action_type: 'update'),
|
|
128
128
|
class: "filter-button #{'active' if params[:action_type] == 'update'}",
|
|
129
129
|
data: { turbo_action: 'replace' } %>
|
|
130
|
-
<%= link_to t('dbdoc.delete'), dbdoc_engine.
|
|
130
|
+
<%= link_to t('dbdoc.delete'), dbdoc_engine.dbdoc_admin_dashboard_path(action_type: 'delete'),
|
|
131
131
|
class: "filter-button #{'active' if params[:action_type] == 'delete'}",
|
|
132
132
|
data: { turbo_action: 'replace' } %>
|
|
133
133
|
</div>
|
|
@@ -136,10 +136,10 @@
|
|
|
136
136
|
<div class='table-responsive dashboard_table_scroll'>
|
|
137
137
|
<table class='table table-hover mb-0'>
|
|
138
138
|
<thead class='sticky-top dashboard_table_header'>
|
|
139
|
-
<%= render partial: 'dbdoc_engine/
|
|
139
|
+
<%= render partial: 'dbdoc_engine/dbdoc_admin/dashboard/changelog_table_headers' %>
|
|
140
140
|
</thead>
|
|
141
141
|
<tbody>
|
|
142
|
-
<%= render partial: 'dbdoc_engine/
|
|
142
|
+
<%= render partial: 'dbdoc_engine/dbdoc_admin/dashboard/changelog_rows', locals: { changelogs: @changelogs } %>
|
|
143
143
|
</tbody>
|
|
144
144
|
</table>
|
|
145
145
|
</div>
|
|
@@ -81,14 +81,14 @@
|
|
|
81
81
|
<td>
|
|
82
82
|
<small><div class='d-flex justify-content-end gap-2'>
|
|
83
83
|
<!-- Restore button -->
|
|
84
|
-
<%= button_to dbdoc_engine.
|
|
84
|
+
<%= button_to dbdoc_engine.restore_dbdoc_admin_db_design_dynamic_table_path(table),
|
|
85
85
|
method: :patch,
|
|
86
86
|
data: {turbo: false },
|
|
87
87
|
class: 'btn btn-outline-success btn-sm px-2 shadow-sm' do %>
|
|
88
88
|
<i class='bi bi-arrow-counterclockwise'></i>
|
|
89
89
|
<% end %>
|
|
90
90
|
<!-- Permanent delete button -->
|
|
91
|
-
<%= button_to dbdoc_engine.
|
|
91
|
+
<%= button_to dbdoc_engine.permanent_destroy_dbdoc_admin_db_design_dynamic_table_path(table),
|
|
92
92
|
method: :delete,
|
|
93
93
|
data: { confirm: t('dbdoc.confirm_permanent_delete'), turbo: false },
|
|
94
94
|
class: 'btn btn-outline-danger btn-sm px-2 shadow-sm' do %>
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
<!-- Fixed Bottom Action Buttons -->
|
|
69
69
|
<div class="d-flex justify-content-end p-3 fixed-bottom">
|
|
70
70
|
<%= f.submit t('dbdoc.save_table'), class: 'btn btn-success btn-sm px-4' %>
|
|
71
|
-
<%= link_to t('dbdoc.back'), dbdoc_engine.
|
|
71
|
+
<%= link_to t('dbdoc.back'), dbdoc_engine.dbdoc_admin_db_design_dynamic_tables_path, class: 'btn btn-secondary btn-sm shadow ms-2' %>
|
|
72
72
|
</div>
|
|
73
73
|
|
|
74
74
|
<% end %>
|
data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables/_recent_activity.html.erb
RENAMED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<tr>
|
|
20
20
|
<td class='ps-3'><small><%= log.change_timestamp.strftime('%Y-%m-%d %H:%M:%S') %></small></td>
|
|
21
21
|
<td>
|
|
22
|
-
<%= render 'dbdoc_engine/
|
|
22
|
+
<%= render 'dbdoc_engine/dbdoc_admin/dashboard/action_badge', action_type: log.action_type %>
|
|
23
23
|
</td>
|
|
24
24
|
<td><small><%= log.changed_by %> <%= log.description %></small></td>
|
|
25
25
|
</tr>
|
data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables/_table_index.html.erb
RENAMED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<h5 class='text-muted'><%= t('dbdoc.no_tables_found') %></h5>
|
|
6
6
|
<% if params[:search].present? || params[:group_filter].present? %>
|
|
7
7
|
<%# Show a message with a link to view all tables if search or filter is applied %>
|
|
8
|
-
<p class='text-muted'><small><%= t('dbdoc.try_different_criteria') %><%= link_to t('dbdoc.view_all_tables'), dbdoc_engine.
|
|
8
|
+
<p class='text-muted'><small><%= t('dbdoc.try_different_criteria') %><%= link_to t('dbdoc.view_all_tables'), dbdoc_engine.dbdoc_admin_db_design_dynamic_tables_path %></small></p>
|
|
9
9
|
<% else %>
|
|
10
10
|
<%# If no search or filter is applied, prompt the user to create a new table %>
|
|
11
11
|
<p class='text-muted'><small><%= t('dbdoc.get_started_by_creating_new_table') %></small></p>
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
<% end %>
|
|
47
47
|
<%# Display table name only %>
|
|
48
48
|
<td class='fw-medium'>
|
|
49
|
-
<small><%= link_to table.table_name, dbdoc_engine.
|
|
49
|
+
<small><%= link_to table.table_name, dbdoc_engine.show_table_info_dbdoc_admin_db_design_dynamic_table_path(table), class: 'text-decoration-none text-custom-primary', data: { turbo_frame: "_top" } %></small>
|
|
50
50
|
</td>
|
|
51
51
|
<%# Display physical table name in a separate column %>
|
|
52
52
|
<td class='text-muted'>
|
|
53
|
-
<%= link_to dbdoc_engine.
|
|
53
|
+
<%= link_to dbdoc_engine.show_table_info_dbdoc_admin_db_design_dynamic_table_path(table), class: 'text-decoration-none text-muted', data: { turbo_frame: "_top" } do %>
|
|
54
54
|
<small><%= table.physical_table_name %></small>
|
|
55
55
|
<% end %>
|
|
56
56
|
</td>
|
|
@@ -71,12 +71,12 @@
|
|
|
71
71
|
<div class='d-flex justify-content-end gap-2'>
|
|
72
72
|
<% if can_edit? %>
|
|
73
73
|
<%# Edit button %>
|
|
74
|
-
<%= link_to dbdoc_engine.
|
|
74
|
+
<%= link_to dbdoc_engine.edit_dbdoc_admin_db_design_dynamic_table_path(table), class: 'btn btn-outline-warning btn-sm px-2 shadow-sm', data: { turbo_frame: '_top' } do %>
|
|
75
75
|
<small><i class='bi bi-pencil-square'></i></small>
|
|
76
76
|
<% end %>
|
|
77
77
|
<% end %>
|
|
78
78
|
<%# Export to Excel button with download icon %>
|
|
79
|
-
<%= link_to dbdoc_engine.
|
|
79
|
+
<%= link_to dbdoc_engine.export_to_excel_dbdoc_admin_db_design_dynamic_table_path(table, format: :xlsx),
|
|
80
80
|
class: 'btn btn-outline-primary btn-sm px-2 shadow-sm',
|
|
81
81
|
target: '_blank',
|
|
82
82
|
data: { turbo: false } do %>
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
<% end %>
|
|
85
85
|
<% if can_edit? %>
|
|
86
86
|
<%# Delete button with confirmation prompt %>
|
|
87
|
-
<%= button_to dbdoc_engine.
|
|
87
|
+
<%= button_to dbdoc_engine.dbdoc_admin_db_design_dynamic_table_path(table),
|
|
88
88
|
method: :delete,
|
|
89
89
|
data: { confirm: 'Are you sure?', turbo: false },
|
|
90
90
|
class: 'btn btn-outline-danger btn-sm px-2 shadow-sm' do %>
|
data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables/deleted_tables.html.erb
RENAMED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
<small><i class='bi bi-house-door'></i></small>
|
|
5
5
|
</a>
|
|
6
6
|
<span class='slash'> / </span>
|
|
7
|
-
<a href="<%= dbdoc_engine.
|
|
7
|
+
<a href="<%= dbdoc_engine.dbdoc_admin_dashboard_path(locale: I18n.locale) %>" class='text-decoration-none text-muted'>
|
|
8
8
|
<small><%= t('dbdoc.dashboardbread') %></small>
|
|
9
9
|
</a>
|
|
10
10
|
<span class='slash'> / </span>
|
|
11
|
-
<a href='<%= dbdoc_engine.
|
|
11
|
+
<a href='<%= dbdoc_engine.dbdoc_admin_db_design_dynamic_tables_path %>' class='text-decoration-none text-muted'>
|
|
12
12
|
<small><%= t('dbdoc.dynamic_tables_header') %></small>
|
|
13
13
|
</a>
|
|
14
14
|
<span class='slash'> / </span>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<div class='row mb-3'>
|
|
27
27
|
<!-- Search and Filter Form -->
|
|
28
28
|
<div class='col-lg-8 col-md-7 col-sm-12 mb-2 mb-md-0'>
|
|
29
|
-
<small><%= form_with url:
|
|
29
|
+
<small><%= form_with url: deleted_tables_dbdoc_admin_db_design_dynamic_tables_path, method: :get, data: { controller: 'auto-submit', turbo_frame: 'tables_results' } do |f| %>
|
|
30
30
|
<%= f.hidden_field :locale, value: I18n.locale %>
|
|
31
31
|
<div class='input-group shadow-sm'>
|
|
32
32
|
<!-- Search Icon -->
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
|
|
51
51
|
<!-- Clear Filter Button -->
|
|
52
52
|
<% if params[:search].present? || params[:group_filter].present? %>
|
|
53
|
-
<%= link_to dbdoc_engine.
|
|
53
|
+
<%= link_to dbdoc_engine.deleted_tables_dbdoc_admin_db_design_dynamic_tables_path, class: 'btn btn-outline-secondary' do %>
|
|
54
54
|
<i class='bi bi-x-circle'></i><%= t('dbdoc.clear') %>
|
|
55
55
|
<% end %>
|
|
56
56
|
<% end %>
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
<!-- Action Buttons -->
|
|
62
62
|
<div class='col-lg-4 col-md-5 col-sm-12 d-flex justify-content-md-end justify-content-sm-start mt-2 mt-md-0'>
|
|
63
63
|
<!-- Show Active Tables Button -->
|
|
64
|
-
<small><%= link_to dbdoc_engine.
|
|
64
|
+
<small><%= link_to dbdoc_engine.dbdoc_admin_db_design_dynamic_tables_path, class: 'btn btn-outline-primary shadow-sm d-flex align-items-center' do %>
|
|
65
65
|
<i class='bi bi-eye-fill me-2'></i><span class="d-none d-sm-inline"><small><%= t('dbdoc.show_active') %></span></small>
|
|
66
66
|
<% end %></small>
|
|
67
67
|
</div>
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
<!-- If filters applied and nothing found -->
|
|
80
80
|
<small><p class='text-muted'>
|
|
81
81
|
<%= t('dbdoc.try_different_criteria') %>
|
|
82
|
-
<%= link_to t('dbdoc.view_all_deleted_tables'), dbdoc_engine.
|
|
82
|
+
<%= link_to t('dbdoc.view_all_deleted_tables'), dbdoc_engine.deleted_tables_dbdoc_admin_db_design_dynamic_tables_path %>
|
|
83
83
|
</p></small>
|
|
84
84
|
<% else %>
|
|
85
85
|
<!-- If no deleted tables exist -->
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
<small><i class='bi bi-house-door'></i></small>
|
|
7
7
|
</a>
|
|
8
8
|
<span class='slash'> / </span>
|
|
9
|
-
<a href="<%= dbdoc_engine.
|
|
9
|
+
<a href="<%= dbdoc_engine.dbdoc_admin_dashboard_path(locale: I18n.locale) %>" class='text-decoration-none text-muted'>
|
|
10
10
|
<small><%= t('dbdoc.dashboardbread') %></small>
|
|
11
11
|
</a>
|
|
12
12
|
<span class='slash'> / </span>
|
|
13
|
-
<a href='<%= dbdoc_engine.
|
|
13
|
+
<a href='<%= dbdoc_engine.dbdoc_admin_db_design_dynamic_tables_path %>' class='text-decoration-none text-muted'>
|
|
14
14
|
<small><%= t('dbdoc.dynamic_tables_header') %></small>
|
|
15
15
|
</a>
|
|
16
16
|
<span class='slash'> / </span>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</a>
|
|
10
10
|
</li>
|
|
11
11
|
<li class="breadcrumb-item p-0 m-0">
|
|
12
|
-
<a href="<%= dbdoc_engine.
|
|
12
|
+
<a href="<%= dbdoc_engine.dbdoc_admin_dashboard_path(locale: I18n.locale) %>" class="text-decoration-none text-muted pe-2">
|
|
13
13
|
<small><%= t('dbdoc.dashboardbread') %></small>
|
|
14
14
|
</a>
|
|
15
15
|
</li>
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
<small><i class='bi bi-table text-primary me-2'></i></small>
|
|
38
38
|
<span><small><strong><%= @total_table_count %></strong> <%= t('dbdoc.tables') %></small></span>
|
|
39
39
|
</div>
|
|
40
|
-
<%= link_to dbdoc_engine.
|
|
40
|
+
<%= link_to dbdoc_engine.export_all_to_excel_dbdoc_admin_db_design_dynamic_tables_path(format: :xlsx),
|
|
41
41
|
class: 'btn btn-outline-primary',
|
|
42
42
|
target: '_blank',
|
|
43
43
|
data: { turbo: false } do %>
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
<!-- Combined Search, Filter and Action Buttons Section -->
|
|
49
49
|
<div class='row mb-3'>
|
|
50
50
|
<div class='col-lg-8 col-md-7 col-sm-12 mb-2 mb-md-0'>
|
|
51
|
-
<%= form_with url:
|
|
51
|
+
<%= form_with url: dbdoc_admin_db_design_dynamic_tables_path, method: :get, data: { controller: 'auto-submit', turbo_frame: 'tables_results' } do |f| %>
|
|
52
52
|
<%= f.hidden_field :locale, value: I18n.locale %>
|
|
53
53
|
<div class='input-group'>
|
|
54
54
|
<!-- Search Icon -->
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
|
|
76
76
|
<!-- Clear Button -->
|
|
77
77
|
<% if params[:search].present? || params[:group_filter].present? %>
|
|
78
|
-
<%= link_to dbdoc_engine.
|
|
78
|
+
<%= link_to dbdoc_engine.dbdoc_admin_db_design_dynamic_tables_path, class: 'btn btn-outline-secondary' do %>
|
|
79
79
|
<small><i class='bi bi-x-circle'></i><%= t('dbdoc.clear') %></small>
|
|
80
80
|
<% end %>
|
|
81
81
|
<% end %>
|
|
@@ -88,14 +88,14 @@
|
|
|
88
88
|
<div class='d-flex gap-2'>
|
|
89
89
|
<!-- Show Deleted Tables (only for superadmin) -->
|
|
90
90
|
<% if can_delete? %>
|
|
91
|
-
<%= link_to dbdoc_engine.
|
|
91
|
+
<%= link_to dbdoc_engine.deleted_tables_dbdoc_admin_db_design_dynamic_tables_path, class: 'btn btn-outline-danger btn-sm shadow-sm d-flex align-items-center' do %>
|
|
92
92
|
<small><i class='bi bi-trash me-1'></i><span class="d-none d-sm-inline"><%= t('dbdoc.show_deleted') %></span></small>
|
|
93
93
|
<% end %>
|
|
94
94
|
<% end %>
|
|
95
95
|
|
|
96
96
|
<!-- New Table (for admin and superadmin) -->
|
|
97
97
|
<% if can_edit? %>
|
|
98
|
-
<%= link_to dbdoc_engine.
|
|
98
|
+
<%= link_to dbdoc_engine.new_dbdoc_admin_db_design_dynamic_table_path, class: 'btn btn-outline-success btn-sm shadow-sm d-flex align-items-center' do %>
|
|
99
99
|
<small><i class='bi bi-plus-circle-fill me-1'></i><span class="d-none d-sm-inline"><%= t('dbdoc.new') %></span></small>
|
|
100
100
|
<% end %>
|
|
101
101
|
<% end %>
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
<small><i class='bi bi-house-door'></i></small>
|
|
7
7
|
</a>
|
|
8
8
|
<span class='slash'> / </span>
|
|
9
|
-
<a href="<%= dbdoc_engine.
|
|
9
|
+
<a href="<%= dbdoc_engine.dbdoc_admin_dashboard_path(locale: I18n.locale) %>" class='text-decoration-none text-muted'>
|
|
10
10
|
<small><%= t('dbdoc.dashboardbread') %></small>
|
|
11
11
|
</a>
|
|
12
12
|
<span class='slash'> / </span>
|
|
13
|
-
<a href='<%= dbdoc_engine.
|
|
13
|
+
<a href='<%= dbdoc_engine.dbdoc_admin_db_design_dynamic_tables_path %>' class='text-decoration-none text-muted'>
|
|
14
14
|
<small><%= t('dbdoc.dynamic_tables_header') %></small>
|
|
15
15
|
</a>
|
|
16
16
|
<span class='slash'> / </span>
|
data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables/show_table_info.html.erb
RENAMED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
<i class='bi bi-house-door'></i>
|
|
6
6
|
</a>
|
|
7
7
|
<span class='slash'> / </span>
|
|
8
|
-
<a href="<%= dbdoc_engine.
|
|
8
|
+
<a href="<%= dbdoc_engine.dbdoc_admin_dashboard_path(locale: I18n.locale) %>" class='text-decoration-none text-muted'>
|
|
9
9
|
<small><%= t('dbdoc.dashboardbread') %></small>
|
|
10
10
|
</a>
|
|
11
11
|
<span class='slash'> / </span>
|
|
12
|
-
<a href='<%= dbdoc_engine.
|
|
12
|
+
<a href='<%= dbdoc_engine.dbdoc_admin_db_design_dynamic_tables_path %>' class='text-decoration-none text-muted'>
|
|
13
13
|
<small><%= t('dbdoc.dynamic_tables_header') %></small>
|
|
14
14
|
</a>
|
|
15
15
|
<span class='slash'> / </span>
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
</div>
|
|
110
110
|
<!-- Footer with Export Button -->
|
|
111
111
|
<div class='accordion-footer px-4 py-3 d-flex justify-content-end border-top'>
|
|
112
|
-
<%= link_to dbdoc_engine.
|
|
112
|
+
<%= link_to dbdoc_engine.export_to_excel_dbdoc_admin_db_design_dynamic_table_path(@table, format: :xlsx),
|
|
113
113
|
class: 'btn btn-outline-primary btn-sm px-3 shadow-sm',
|
|
114
114
|
target: '_blank',
|
|
115
115
|
data: { turbo: false } do %>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<i class='bi bi-trash fs-1 text-muted mb-3'></i>
|
|
6
6
|
<h5 class='text-muted'><%= t('dbdoc.no_deleted_table_groups_found') %></h5>
|
|
7
7
|
<% if params[:search].present? %>
|
|
8
|
-
<p class='text-muted'><small><%= t('dbdoc.try_different_criteria') %><%= link_to t('dbdoc.view_all_deleted_groups'), dbdoc_engine.
|
|
8
|
+
<p class='text-muted'><small><%= t('dbdoc.try_different_criteria') %><%= link_to t('dbdoc.view_all_deleted_groups'), dbdoc_engine.deleted_groups_dbdoc_admin_db_design_table_groups_path %></small></p>
|
|
9
9
|
<% end %>
|
|
10
10
|
</div>
|
|
11
11
|
<% else %>
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
</td>
|
|
47
47
|
<td class='text-end'>
|
|
48
48
|
<div class='d-flex justify-content-end gap-2'>
|
|
49
|
-
<%= button_to dbdoc_engine.
|
|
49
|
+
<%= button_to dbdoc_engine.restore_dbdoc_admin_db_design_table_group_path(group),
|
|
50
50
|
method: :patch,
|
|
51
51
|
class: 'btn btn-outline-success btn-sm px-3 shadow-sm',
|
|
52
52
|
data: { turbo: false } do %>
|
|
53
53
|
<small><i class='bi bi-arrow-counterclockwise me-1'></i></small>
|
|
54
54
|
<% end %>
|
|
55
|
-
<%= button_to dbdoc_engine.
|
|
55
|
+
<%= button_to dbdoc_engine.permanent_destroy_dbdoc_admin_db_design_table_group_path(group),
|
|
56
56
|
method: :delete,
|
|
57
57
|
data: { confirm: 'Are you sure? This cannot be undone!', turbo: false },
|
|
58
58
|
class: 'btn btn-outline-danger btn-sm px-3 shadow-sm' do %>
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
<%# Submit button %>
|
|
82
82
|
<%= f.submit t('dbdoc.save_table_group'), class: 'btn btn-success btn-sm px-4 py-2 shadow-sm' %>
|
|
83
83
|
<%# Back button %>
|
|
84
|
-
<%= link_to t('dbdoc.back'), dbdoc_engine.
|
|
84
|
+
<%= link_to t('dbdoc.back'), dbdoc_engine.dbdoc_admin_db_design_table_groups_path, class: 'btn btn-secondary btn-sm shadow px-4 py-2 ms-2' %>
|
|
85
85
|
</div>
|
|
86
86
|
<% end %>
|
|
87
87
|
</div>
|
data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_table_groups/_table_groups_list.html.erb
RENAMED
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
<td>
|
|
38
38
|
<div class='d-flex justify-content-end gap-2'>
|
|
39
39
|
<!-- Edit Group Button -->
|
|
40
|
-
<%= link_to dbdoc_engine.
|
|
40
|
+
<%= link_to dbdoc_engine.edit_dbdoc_admin_db_design_table_group_path(group),
|
|
41
41
|
class: 'btn btn-outline-warning btn-sm px-3 shadow-sm',
|
|
42
42
|
data: { turbo_frame: '_top' } do %>
|
|
43
43
|
<small><i class='bi bi-pencil-square me-1'></i></small>
|
|
44
44
|
<% end %>
|
|
45
45
|
|
|
46
46
|
<!-- Delete Group Button -->
|
|
47
|
-
<%= button_to dbdoc_engine.
|
|
47
|
+
<%= button_to dbdoc_engine.dbdoc_admin_db_design_table_group_path(group), method: :delete, data: { confirm: 'Are you sure?', turbo: false }, class: 'btn btn-outline-danger btn-sm px-3 shadow-sm' do %>
|
|
48
48
|
<small><i class='bi bi-trash-fill me-1'></i></small>
|
|
49
49
|
<% end %>
|
|
50
50
|
</div>
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
<p class='text-muted'>
|
|
71
71
|
<small>
|
|
72
72
|
<%= t('dbdoc.try_different_criteria') %>
|
|
73
|
-
<%= link_to t('dbdoc.view_all_groups'), dbdoc_engine.
|
|
73
|
+
<%= link_to t('dbdoc.view_all_groups'), dbdoc_engine.dbdoc_admin_db_design_table_groups_path %>
|
|
74
74
|
</small>
|
|
75
75
|
</p>
|
|
76
76
|
<% else %>
|
data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_table_groups/deleted_groups.html.erb
RENAMED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
<small><i class='bi bi-house-door'></i></small>
|
|
5
5
|
</a>
|
|
6
6
|
<span class='slash'> / </span>
|
|
7
|
-
<a href="<%= dbdoc_engine.
|
|
7
|
+
<a href="<%= dbdoc_engine.dbdoc_admin_dashboard_path(locale: I18n.locale) %>" class='text-decoration-none text-muted'>
|
|
8
8
|
<small><%= t('dbdoc.dashboardbread') %></small>
|
|
9
9
|
</a>
|
|
10
10
|
<span class='slash'> / </span>
|
|
11
|
-
<a href='<%= dbdoc_engine.
|
|
11
|
+
<a href='<%= dbdoc_engine.dbdoc_admin_db_design_dynamic_tables_path %>' class='text-decoration-none text-muted'>
|
|
12
12
|
<small><%= t('dbdoc.dynamic_tables_header') %></small>
|
|
13
13
|
</a>
|
|
14
14
|
<span class='slash'> / </span>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<div class='row mb-3'>
|
|
25
25
|
<!-- Search Form -->
|
|
26
26
|
<div class='col-lg-8 col-md-7 col-sm-12 mb-2 mb-md-0'>
|
|
27
|
-
<%= form_with url:
|
|
27
|
+
<%= form_with url: deleted_groups_dbdoc_admin_db_design_table_groups_path,
|
|
28
28
|
method: :get,
|
|
29
29
|
data: { turbo_frame: 'deleted_table_groups_results', controller: 'auto-submit' } do |f| %>
|
|
30
30
|
<%= f.hidden_field :locale, value: I18n.locale %>
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
'aria-label': 'Search deleted groups',
|
|
40
40
|
data: { action: 'input->auto-submit#submit' } %>
|
|
41
41
|
<% if params[:search].present? %>
|
|
42
|
-
<%= link_to dbdoc_engine.
|
|
42
|
+
<%= link_to dbdoc_engine.deleted_groups_dbdoc_admin_db_design_table_groups_path, class: 'btn btn-outline-secondary' do %>
|
|
43
43
|
<small><i class='bi bi-x-circle'></i> Clear</small>
|
|
44
44
|
<% end %>
|
|
45
45
|
<% end %>
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
</div>
|
|
49
49
|
<!-- Action Button -->
|
|
50
50
|
<div class='col-lg-4 col-md-5 col-sm-12 d-flex justify-content-md-end justify-content-sm-start mt-2 mt-md-0'>
|
|
51
|
-
<%= link_to dbdoc_engine.
|
|
51
|
+
<%= link_to dbdoc_engine.dbdoc_admin_db_design_table_groups_path,
|
|
52
52
|
class: 'btn btn-outline-primary shadow-sm d-flex align-items-center' do %>
|
|
53
53
|
<small><i class='bi bi-eye-fill me-2'></i><span class="d-none d-sm-inline"><%= t('dbdoc.show_active') %></span></small>
|
|
54
54
|
<% end %>
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
<small><i class='bi bi-house-door'></i></small>
|
|
7
7
|
</a>
|
|
8
8
|
<span class='slash'> / </span>
|
|
9
|
-
<a href="<%= dbdoc_engine.
|
|
9
|
+
<a href="<%= dbdoc_engine.dbdoc_admin_dashboard_path(locale: I18n.locale) %>" class='text-decoration-none text-muted'>
|
|
10
10
|
<small><%= t('dbdoc.dashboardbread') %></small>
|
|
11
11
|
</a>
|
|
12
12
|
<span class='slash'> / </span>
|
|
13
|
-
<a href='<%= dbdoc_engine.
|
|
13
|
+
<a href='<%= dbdoc_engine.dbdoc_admin_db_design_table_groups_path %>' class='text-decoration-none text-muted'>
|
|
14
14
|
<small><%= t('dbdoc.tablegroups') %></small>
|
|
15
15
|
</a>
|
|
16
16
|
<span class='slash'> / </span>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</a>
|
|
10
10
|
</li>
|
|
11
11
|
<li class="breadcrumb-item p-0 m-0">
|
|
12
|
-
<a href="<%= dbdoc_engine.
|
|
12
|
+
<a href="<%= dbdoc_engine.dbdoc_admin_dashboard_path(locale: I18n.locale) %>" class="text-decoration-none text-muted pe-2">
|
|
13
13
|
<small><%= t('dbdoc.dashboardbread') %></small>
|
|
14
14
|
</a>
|
|
15
15
|
</li>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<div class='row mb-3'>
|
|
30
30
|
<!-- Search Form -->
|
|
31
31
|
<div class='col-lg-8 col-md-7 col-sm-12 mb-2 mb-md-0'>
|
|
32
|
-
<%= form_with url:
|
|
32
|
+
<%= form_with url: dbdoc_admin_db_design_table_groups_path, method: :get, data: { turbo_frame: 'table_groups_results', controller: 'auto-submit' } do |f| %>
|
|
33
33
|
<%= f.hidden_field :locale, value: I18n.locale %>
|
|
34
34
|
<div class='input-group shadow-sm'>
|
|
35
35
|
<span class='input-group-text bg-white border-end-0'>
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
'aria-label': 'Search groups',
|
|
41
41
|
data: { action: 'input->auto-submit#submit' } %>
|
|
42
42
|
<% if @search_query.present? %>
|
|
43
|
-
<%= link_to dbdoc_engine.
|
|
43
|
+
<%= link_to dbdoc_engine.dbdoc_admin_db_design_table_groups_path, class: 'btn btn-outline-secondary' do %>
|
|
44
44
|
<small><i class='bi bi-x-circle'></i></small>
|
|
45
45
|
<% end %>
|
|
46
46
|
<% end %>
|
|
@@ -52,13 +52,13 @@
|
|
|
52
52
|
<div class='col-lg-4 col-md-5 col-sm-12 d-flex justify-content-md-end justify-content-sm-start mt-2 mt-md-0'>
|
|
53
53
|
<div class='d-flex gap-2 flex-wrap'>
|
|
54
54
|
<% if can_delete? %>
|
|
55
|
-
<%= link_to dbdoc_engine.
|
|
55
|
+
<%= link_to dbdoc_engine.deleted_groups_dbdoc_admin_db_design_table_groups_path, class: 'btn btn-outline-danger shadow-sm d-flex align-items-center btn-sm' do %>
|
|
56
56
|
<small><i class='bi bi-trash me-1'></i><span class="d-none d-sm-inline"><%= t('dbdoc.view_deleted') %></span></small>
|
|
57
57
|
<% end %>
|
|
58
58
|
<% end %>
|
|
59
59
|
|
|
60
60
|
<% if can_edit? %>
|
|
61
|
-
<%= link_to dbdoc_engine.
|
|
61
|
+
<%= link_to dbdoc_engine.new_dbdoc_admin_db_design_table_group_path, class: 'btn btn-outline-success shadow-sm d-flex align-items-center btn-sm' do %>
|
|
62
62
|
<small><i class='bi bi-plus-circle-fill me-1'></i><span class="d-none d-sm-inline"><%= t('dbdoc.new') %></span></small>
|
|
63
63
|
<% end %>
|
|
64
64
|
<% end %>
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
<small><i class='bi bi-house-door'></i></small>
|
|
7
7
|
</a>
|
|
8
8
|
<span class='slash'> / </span>
|
|
9
|
-
<a href="<%= dbdoc_engine.
|
|
9
|
+
<a href="<%= dbdoc_engine.dbdoc_admin_dashboard_path(locale: I18n.locale) %>" class='text-decoration-none text-muted'>
|
|
10
10
|
<small><%= t('dbdoc.dashboardbread') %></small>
|
|
11
11
|
</a>
|
|
12
12
|
<span class='slash'> / </span>
|
|
13
|
-
<a href='<%= dbdoc_engine.
|
|
13
|
+
<a href='<%= dbdoc_engine.dbdoc_admin_db_design_table_groups_path %>' class='text-decoration-none text-muted'>
|
|
14
14
|
<small><%= t('dbdoc.tablegroups') %></small>
|
|
15
15
|
</a>
|
|
16
16
|
<span class='slash'> / </span>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<nav class='navbar navbar-expand-lg navbar-dark shadow-sm admin-navbar'>
|
|
2
2
|
<div class='container-fluid'>
|
|
3
3
|
<!-- Admin Panel Brand -->
|
|
4
|
-
<a class='navbar-brand fw-bold text-white d-flex align-items-center p-2 <%= 'active' if controller_path == 'dbdoc_engine/
|
|
4
|
+
<a class='navbar-brand fw-bold text-white d-flex align-items-center p-2 <%= 'active' if controller_path == 'dbdoc_engine/dbdoc_admin/dashboard' %>' href='<%= dbdoc_admin_dashboard_path %>'>
|
|
5
5
|
<i class='bi bi-person-fill-gear me-2'></i><%= t('dbdoc.admin_panel') %>
|
|
6
6
|
</a>
|
|
7
7
|
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
<ul class='navbar-nav'>
|
|
16
16
|
<% if current_user && current_user.admin_or_higher? %>
|
|
17
17
|
<li class='nav-item ms-1'>
|
|
18
|
-
<%= link_to t('dbdoc.table_groups_header'), dbdoc_engine.
|
|
18
|
+
<%= link_to t('dbdoc.table_groups_header'), dbdoc_engine.dbdoc_admin_db_design_table_groups_path, class: "nav-link #{admin_nav_active?('db_design_table_groups') ? 'active' : ''}" %>
|
|
19
19
|
</li>
|
|
20
20
|
<% end %>
|
|
21
21
|
<li class='nav-item ms-1'>
|
|
22
|
-
<%= link_to t('dbdoc.dynamic_tables_header'), dbdoc_engine.
|
|
22
|
+
<%= link_to t('dbdoc.dynamic_tables_header'), dbdoc_engine.dbdoc_admin_db_design_dynamic_tables_path, class: "nav-link #{admin_nav_active?('db_design_dynamic_tables') ? 'active' : ''}" %>
|
|
23
23
|
</li>
|
|
24
24
|
</ul>
|
|
25
25
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
<% if current_user.admin_or_higher? %>
|
|
24
24
|
<!-- Admin Button: Always circular with gear-person icon -->
|
|
25
|
-
<%= link_to(user_signed_in? ? dbdoc_engine.
|
|
25
|
+
<%= link_to(user_signed_in? ? dbdoc_engine.dbdoc_admin_dashboard_path : dbdoc_engine.login_path,
|
|
26
26
|
class: 'admin-circle-btn d-flex align-items-center justify-content-center rounded-circle border-0 p-0 me-2',
|
|
27
27
|
title: t('dbdoc.admin')) do %>
|
|
28
28
|
<i class='bi bi-person-fill-gear'></i>
|
data/config/routes.rb
CHANGED
|
@@ -9,7 +9,7 @@ DbdocEngine::Engine.routes.draw do
|
|
|
9
9
|
# ------------------------
|
|
10
10
|
# Admin Namespace
|
|
11
11
|
# ------------------------
|
|
12
|
-
namespace :
|
|
12
|
+
namespace :dbdoc_admin do
|
|
13
13
|
get "dashboard", to: "dashboard#index"
|
|
14
14
|
root to: "db_design_dynamic_tables#index" # Admin dashboard
|
|
15
15
|
get "export_data", to: "data_transfer#export_data", defaults: { format: :json }
|
data/lib/dbdoc_engine/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dbdoc_engine
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aniruddha Mirajkar
|
|
@@ -232,14 +232,14 @@ files:
|
|
|
232
232
|
- app/assets/stylesheets/dbdoc_engine/schema_diagram.css
|
|
233
233
|
- app/assets/stylesheets/dbdoc_engine/sidebar.css
|
|
234
234
|
- app/assets/stylesheets/dbdoc_engine/table_details.css
|
|
235
|
-
- app/controllers/dbdoc_engine/admin/base_controller.rb
|
|
236
|
-
- app/controllers/dbdoc_engine/admin/dashboard_controller.rb
|
|
237
|
-
- app/controllers/dbdoc_engine/admin/data_transfer_controller.rb
|
|
238
|
-
- app/controllers/dbdoc_engine/admin/db_design_dynamic_tables_controller.rb
|
|
239
|
-
- app/controllers/dbdoc_engine/admin/db_design_table_groups_controller.rb
|
|
240
235
|
- app/controllers/dbdoc_engine/application_controller.rb
|
|
241
236
|
- app/controllers/dbdoc_engine/concerns/internationalization.rb
|
|
242
237
|
- app/controllers/dbdoc_engine/db_doc_sessions_controller.rb
|
|
238
|
+
- app/controllers/dbdoc_engine/dbdoc_admin/base_controller.rb
|
|
239
|
+
- app/controllers/dbdoc_engine/dbdoc_admin/dashboard_controller.rb
|
|
240
|
+
- app/controllers/dbdoc_engine/dbdoc_admin/data_transfer_controller.rb
|
|
241
|
+
- app/controllers/dbdoc_engine/dbdoc_admin/db_design_dynamic_tables_controller.rb
|
|
242
|
+
- app/controllers/dbdoc_engine/dbdoc_admin/db_design_table_groups_controller.rb
|
|
243
243
|
- app/controllers/dbdoc_engine/home_controller.rb
|
|
244
244
|
- app/controllers/dbdoc_engine/schema_diagram_controller.rb
|
|
245
245
|
- app/helper/dbdoc_engine/application_helper.rb
|
|
@@ -294,34 +294,34 @@ files:
|
|
|
294
294
|
- app/services/dbdoc_engine/table_filter_service.rb
|
|
295
295
|
- app/services/dbdoc_engine/table_groups_service.rb
|
|
296
296
|
- app/services/dbdoc_engine/table_management_service.rb
|
|
297
|
-
- app/views/dbdoc_engine/admin/dashboard/_action_badge.html.erb
|
|
298
|
-
- app/views/dbdoc_engine/admin/dashboard/_changelog_rows.html.erb
|
|
299
|
-
- app/views/dbdoc_engine/admin/dashboard/_changelog_table_headers.html.erb
|
|
300
|
-
- app/views/dbdoc_engine/admin/dashboard/_filter_fields.html.erb
|
|
301
|
-
- app/views/dbdoc_engine/admin/dashboard/index.html.erb
|
|
302
|
-
- app/views/dbdoc_engine/admin/db_design_dynamic_tables/_column_fields.html.erb
|
|
303
|
-
- app/views/dbdoc_engine/admin/db_design_dynamic_tables/_deleted_table_index.html.erb
|
|
304
|
-
- app/views/dbdoc_engine/admin/db_design_dynamic_tables/_foreign_key_fields.html.erb
|
|
305
|
-
- app/views/dbdoc_engine/admin/db_design_dynamic_tables/_form.html.erb
|
|
306
|
-
- app/views/dbdoc_engine/admin/db_design_dynamic_tables/_recent_activity.html.erb
|
|
307
|
-
- app/views/dbdoc_engine/admin/db_design_dynamic_tables/_table_columns.html.erb
|
|
308
|
-
- app/views/dbdoc_engine/admin/db_design_dynamic_tables/_table_index.html.erb
|
|
309
|
-
- app/views/dbdoc_engine/admin/db_design_dynamic_tables/_table_information.html.erb
|
|
310
|
-
- app/views/dbdoc_engine/admin/db_design_dynamic_tables/deleted_tables.html.erb
|
|
311
|
-
- app/views/dbdoc_engine/admin/db_design_dynamic_tables/edit.html.erb
|
|
312
|
-
- app/views/dbdoc_engine/admin/db_design_dynamic_tables/export_all_to_excel.xlsx.axlsx
|
|
313
|
-
- app/views/dbdoc_engine/admin/db_design_dynamic_tables/export_to_excel.xlsx.axlsx
|
|
314
|
-
- app/views/dbdoc_engine/admin/db_design_dynamic_tables/index.html.erb
|
|
315
|
-
- app/views/dbdoc_engine/admin/db_design_dynamic_tables/new.html.erb
|
|
316
|
-
- app/views/dbdoc_engine/admin/db_design_dynamic_tables/show_table_info.html.erb
|
|
317
|
-
- app/views/dbdoc_engine/admin/db_design_table_groups/_deleted_table_groups_list.html.erb
|
|
318
|
-
- app/views/dbdoc_engine/admin/db_design_table_groups/_form.html.erb
|
|
319
|
-
- app/views/dbdoc_engine/admin/db_design_table_groups/_table_groups_list.html.erb
|
|
320
|
-
- app/views/dbdoc_engine/admin/db_design_table_groups/deleted_groups.html.erb
|
|
321
|
-
- app/views/dbdoc_engine/admin/db_design_table_groups/edit.html.erb
|
|
322
|
-
- app/views/dbdoc_engine/admin/db_design_table_groups/index.html.erb
|
|
323
|
-
- app/views/dbdoc_engine/admin/db_design_table_groups/new.html.erb
|
|
324
297
|
- app/views/dbdoc_engine/db_doc_sessions/new.html.erb
|
|
298
|
+
- app/views/dbdoc_engine/dbdoc_admin/dashboard/_action_badge.html.erb
|
|
299
|
+
- app/views/dbdoc_engine/dbdoc_admin/dashboard/_changelog_rows.html.erb
|
|
300
|
+
- app/views/dbdoc_engine/dbdoc_admin/dashboard/_changelog_table_headers.html.erb
|
|
301
|
+
- app/views/dbdoc_engine/dbdoc_admin/dashboard/_filter_fields.html.erb
|
|
302
|
+
- app/views/dbdoc_engine/dbdoc_admin/dashboard/index.html.erb
|
|
303
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_dynamic_tables/_column_fields.html.erb
|
|
304
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_dynamic_tables/_deleted_table_index.html.erb
|
|
305
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_dynamic_tables/_foreign_key_fields.html.erb
|
|
306
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_dynamic_tables/_form.html.erb
|
|
307
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_dynamic_tables/_recent_activity.html.erb
|
|
308
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_dynamic_tables/_table_columns.html.erb
|
|
309
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_dynamic_tables/_table_index.html.erb
|
|
310
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_dynamic_tables/_table_information.html.erb
|
|
311
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_dynamic_tables/deleted_tables.html.erb
|
|
312
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_dynamic_tables/edit.html.erb
|
|
313
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_dynamic_tables/export_all_to_excel.xlsx.axlsx
|
|
314
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_dynamic_tables/export_to_excel.xlsx.axlsx
|
|
315
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_dynamic_tables/index.html.erb
|
|
316
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_dynamic_tables/new.html.erb
|
|
317
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_dynamic_tables/show_table_info.html.erb
|
|
318
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_table_groups/_deleted_table_groups_list.html.erb
|
|
319
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_table_groups/_form.html.erb
|
|
320
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_table_groups/_table_groups_list.html.erb
|
|
321
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_table_groups/deleted_groups.html.erb
|
|
322
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_table_groups/edit.html.erb
|
|
323
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_table_groups/index.html.erb
|
|
324
|
+
- app/views/dbdoc_engine/dbdoc_admin/db_design_table_groups/new.html.erb
|
|
325
325
|
- app/views/dbdoc_engine/home/changelog_details.html.erb
|
|
326
326
|
- app/views/dbdoc_engine/home/changelogs.html.erb
|
|
327
327
|
- app/views/dbdoc_engine/home/group_details.html.erb
|
|
File without changes
|
/data/app/views/dbdoc_engine/{admin → dbdoc_admin}/dashboard/_changelog_table_headers.html.erb
RENAMED
|
File without changes
|
/data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables/_column_fields.html.erb
RENAMED
|
File without changes
|
|
File without changes
|
/data/app/views/dbdoc_engine/{admin → dbdoc_admin}/db_design_dynamic_tables/_table_columns.html.erb
RENAMED
|
File without changes
|
|
File without changes
|