add scripts & css as raw
This commit is contained in:
parent
911268ad3d
commit
4123b831b6
@ -9,7 +9,9 @@ exclude = [
|
|||||||
"examples/*",
|
"examples/*",
|
||||||
"actix_admin_macros/*",
|
"actix_admin_macros/*",
|
||||||
"tests/*",
|
"tests/*",
|
||||||
"README.md"
|
"docs/*",
|
||||||
|
"README.md",
|
||||||
|
".gitignore"
|
||||||
]
|
]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
@ -2,7 +2,6 @@ use crate::{prelude::*, ActixAdminMenuElement, routes::delete_static_content};
|
|||||||
use actix_web::{web, Route};
|
use actix_web::{web, Route};
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
|
|
||||||
use crate::routes::{
|
use crate::routes::{
|
||||||
create_get, create_post, delete, delete_many, edit_get, edit_post, index, list, not_found, show, download
|
create_get, create_post, delete, delete_many, edit_get, edit_post, index, list, not_found, show, download
|
||||||
};
|
};
|
||||||
@ -105,7 +104,7 @@ impl ActixAdminBuilderTrait for ActixAdminBuilder {
|
|||||||
.route("/show/{id}", web::get().to(show::<T, E>))
|
.route("/show/{id}", web::get().to(show::<T, E>))
|
||||||
.route("/static_content/{id}/{column_name}", web::get().to(download::<T, E>))
|
.route("/static_content/{id}/{column_name}", web::get().to(download::<T, E>))
|
||||||
.route("/static_content/{id}/{column_name}", web::delete().to(delete_static_content::<T, E>))
|
.route("/static_content/{id}/{column_name}", web::delete().to(delete_static_content::<T, E>))
|
||||||
.default_service(web::to(not_found)),
|
.default_service(web::to(not_found))
|
||||||
);
|
);
|
||||||
|
|
||||||
fs::create_dir_all(format!("{}/{}", &self.actix_admin.configuration.file_upload_directory, E::get_entity_name())).unwrap();
|
fs::create_dir_all(format!("{}/{}", &self.actix_admin.configuration.file_upload_directory, E::get_entity_name())).unwrap();
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css">
|
||||||
<script src="https://unpkg.com/htmx.org@1.8.4"></script>
|
<script src="https://unpkg.com/htmx.org@1.8.4"></script>
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
<script>
|
<script>
|
||||||
document.onkeydown = function (e) {
|
document.onkeydown = function (e) {
|
||||||
switch (e.which) {
|
switch (e.which) {
|
||||||
@ -91,3 +92,4 @@
|
|||||||
pointer-events: none
|
pointer-events: none
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
{% endraw %}
|
Loading…
Reference in New Issue
Block a user