avanzu / adminthemebundle Goto Github PK
View Code? Open in Web Editor NEWAdmin Theme based on the AdminLTE Template for easy integration into symfony
License: MIT License
Admin Theme based on the AdminLTE Template for easy integration into symfony
License: MIT License
Hey guys,
I have a problem with the datatable. In dev environement, the filters icon appears to be a css class. In prod environment, the filters icon's seems to be a img ( located in bundles/avanzuadmintheme/static/prod/styles/images/sort_asc.png ) but this doesnt exists (event after cache:clear, assets install, assetic:dump or fetch-vendors...)
Thank you for helping :)
I know icons in subchildren aren't native to AdminLTE, but I find it a nice addition. Would it be worth submitting the PR to make it work? Or is it considered out-of-scope?
I'm just overriding the macros template in my app/Resources at the minute.
Change is here: master...MartinLyne:patch-1
Edit: Also, how do I put label on this to question?
For example on the login page template there is a checkbox with a background image from the iCheck plugin called blue.png.
.icheckbox_square-blue,.iradio_square-blue{
...
background:url(blue.png) no-repeat;
}
The css source is "bundles/avanzuadmintheme/static/dev/styles/admin-lte-all.css" so the image path is "bundles/avanzuadmintheme/static/dev/styles/blue.png" which is wrong because the real source css is from "bundles/avanzuadmintheme/vendor/adminlte/plugins/iCheck/square/".
Right now AvanzuAdmin Bundle has doctype html tag outside of any twig block Angular JS requires ng-app attribute for that tag, is there a way to add it? or do I need to make the change in core layout?
How can I add a header to the left menu? Is it supported?
<ul class="sidebar-menu">
<li class="header">...</li>
</ul>
Hi guys,
I am using this bundle to add an admin part to my app, which have its own form theme for the front end.
This bundle provide an other form-theme, but how to use it only in the admin part ?
I'd like to avoid override my front end form theme.
So I just got into using notifications and feel that the messages have an overly strict template. Fixed date format, requires a from-user and click url.
Wanted to gather some thoughts, expanding the Interface/s to require a getTemplateName ("YourBundle::template.html.twig") that replaces the normal template if found.
I'm still mulling that in my head. the alternative is.. I make a whole new event, a more generic notification that allows you to customise the navbar icon (currently stuck with bell for general, envelope for message) and uses the same custom template solution as above for rendering each item.
Currently got a bad cold, so if any of this has an easier solution or just sounds like fever dreams, please, let me know.
I am reading
https://github.com/avanzu/AdminThemeBundle/blob/master/Resources/docs/navbar_user.md
But the example is only using XML, could you add the same example using YML in the explanation?
Does anyone know if you can add a divider right now? I don't see a mention of one in original AdminLTE repo, just one for drop down menus.
I was thinking of adding it perhaps? Any ideas if it should be a new type of MenuItem? Or just allow null route in the template and use teh classes as normal? You'd end up with an empty li
tag with whatever class you input in your event listener. Using "divider" would use my new, theoretical css.
Planning to use the dropdown menu divider as a basis (maybe it'll just be as simple as duplicating it)
The readme states 'there is no longer a strict requirement for bower and/or assetic' but in Resources/views/layout/macros.html.twig
the usage of
{% image '@avatar_img' %}
<img src="{{ asset_url }}" class="{{ class|default('img-circle') }}" alt="{{ alt }}" />
{% endimage %}
creates a hard dependency on assetic.
This may be an stupid question, but I've tried all I could think of and no results.
Hello, I was asking me if it was fine to add this:
{% if is_granted('IS_AUTHENTICATED_FULLY') %}
In some of the templates in order to avoid some errors, when the username is not set.
For example in views/Navbar/user.html.twig I can do the changes to allow this.
Hi,
I have setup your template, and follow the step of the Sidebar Nav readme.
But I now have 2 Menu, mine and under the SidebarSetupMenuDemoListener.
How can I remove this second one?
Thanks
Hi,
I installed the bundle, but I am not able to install assets and fetch vendor. I get "Unrecognized option "form" under "twig"".
When I try to run website I've got same error.
InvalidConfigurationException in ArrayNode.php line 314:
Unrecognized option "form" under "twig"
Using Symfony 3, can it be the problem?
I have configured routing.yml like below.
mnd_srd_homepage:
pattern: /
defaults: { _controller: AvanzuAdminThemeBundle:Default:dashboard }
and
config.yml like
assetic:
bundles: [AvanzuAdminThemeBundle ]
But there is still bellow error occured please explain me and first of all i want to render dashboard page. how please show me step by step.
1.
2/2 Twig_Error_Runtime: An exception has been thrown during the rendering of a template
("Unable to generate a URL for the named route "avanzu_admin_show_message" as such
route does not exist.") in "AvanzuAdminThemeBundle:Navbar:messages.html.twig" at line 15.
1/2 RouteNotFoundException: Unable to generate a URL for the named route
"avanzu_admin_show_message" as such route does not exist.
could you create scripts that could be put to projects composer.json to fetch vendor scripts:
app/console avanzu:admin:fetch-vendor
for example typical symfony application has:
"scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
]
},
so, i think you need to create similar php code that could be appended to post-update-cmd
and post-install-cmd
sections!
Easy question: is this bundle ready for Symfony 2.8/3.0 project?
how the fonts are supposed to be accessed with assetic?
what i have is that /css/9b199dd_part_1.css
url contains:
@font-face {
font-family: 'FontAwesome';
src: url('../fonts/fontawesome-webfont.eot?v=4.0.3');
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
}
which would request /fonts/fontawesome-webfont.woff?v=4.0.3
... and that's 404
when i find .ttf
files, then those are only in vendor dir:
$ find -name '*ttf*'|xargs ls -ldrS|grep awes
-rwxrwxr-x 1 glen glen 80652 aug 13 15:55 ./vendor/avanzu/admin-theme-bundle/Resources/public/vendor/AdminLTE/fonts/fontawesome-webfont.ttf
-rw-rw-r-- 1 glen glen 80776 aug 13 15:48 ./vendor/avanzu/admin-theme-bundle/Resources/public/vendor/bootflat/fonts/fontawesome-webfont.ttf
-rw-rw-r-- 1 glen glen 80776 aug 13 15:37 ./vendor/avanzu/admin-theme-bundle/Resources/public/fonts/fontawesome-webfont.ttf
the .ttf could be accessible via /web/bundles, but it's not rewritten so in css:
$ ls -l web/bundles/avanzuadmintheme/fonts/fontawesome-webfont.ttf
-rw-rw-r-- 1 glen glen 79K aug 13 15:37 web/bundles/avanzuadmintheme/fonts/fontawesome-webfont.ttf
How to use your adminthemebundle twig templates in my sf 2 project. Please show me easy example such as showing login page or home page template.
Hello @avanzu ,
Is this bundle still maintained ?
I have the feeling that PR & issues stays without response ?
Sorry to create an issue but I don't see a way to change the skin or add a class to the body tag like sidebar-collapse..it is hard coded in the base -layout. Is there a config for this or anything?
Thanks a lot
I'm using this for the first time and I was wondering if there's anyway to incorporate KnpMenuBundle to use with side bars?
I have a few listeners for Sidebar Menu, and would like to sort those the way I want it, is it currently possible?
Hello, I created new Application Symfony and installed the bundle, but when i execute my site, show me the following error.
FileLoaderImportCircularReferenceException in FileLoader.php line 97: Circular reference detected in "." ("." > ".").
I hope for your answers.
thank!!!
There is a hardcoded path to bower in FetchVendorCommand.php:44
It makes the bundle unavailable for Windows users or those who has
bower in path other than /usr/local/bin/bower
I have read docs and didn't found a way to change for example the admin_skin
for other than default, could you point me on the right direction to achieve this?
Hello all this issue relates to issue #6.
The exception which symfony returns is:
[InvalidArgumentException]
Unable to find file "@AvanzuAdminThemeBundle/Resources/public/vendor/adminlte/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.js"
After researching on my own and nothing helped for me ( app/console avanzu:admin:fetch-vendor and even "bower update" in vendor/avanzu/admin-theme-bundle/Resources/bower/ directory) I found this.
I don't know how those dependencies are built but this array is not pointing to the correct file:
'admin_lte_wysiwyg' => array(
'inputs' => array(
$lteJSBase.'plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.js',
)
),
in vendor/avanzu/admin-theme-bundle/Resources/config/assets.php
The path is correct but filenames are different, should be
bootstrap3-wysihtml5.all.js
is you bundle completely converted to symfony2, because i want to use your bundle in my project?
Hello,
I try the AdminThemBundle for the first time and I have a stange issue already reported from other user but I can't solve it.
" Unable to find file "@AvanzuAdminThemeBundle/Resources/public/vendor/modernizr/modernizr.js" in . (which is being imported from "C:\xampp\htdocs\alcrm\app\cache\dev/assetic/routing.yml").
500 Internal Server Error - FileLoaderLoadException
1 linked Exception:
InvalidArgumentException » "
Can you help me please? Thanks
when i run app/console avanzu:admin:fetch-vendor, there is a error like below on windows 7.
D:\Bitnami\wampstack-5.4.26-2\apache2\htdocs\Symfony>php app/console avanzu:admi
n:fetch-vendor
[Executing] /usr/local/bin/bower install
[Error] The system cannot find the path specified.
[Executing] git clone https://github.com/almasaeed2010/AdminLTE.git
PHP Warning: proc_open(): CreateProcess failed, error code - 267 in D:\Bitnami
wampstack-5.4.26-2\apache2\htdocs\Symfony\vendor\symfony\symfony\src\Symfony\Com
ponent\Process\Process.php on line 249
[Symfony\Component\Process\Exception\RuntimeException]
Unable to launch a new process.
avanzu:admin:fetch-vendor [-u|--update]
The breadcrumbs documentation is missing:
https://github.com/avanzu/AdminThemeBundle/blob/master/Resources/docs/breadcrumbs.md
I am trying to use the bundle in a Symfony 2.8 project and found the first issue:
Unexpected "image" tag (expecting closing tag for the "if" tag defined near line 34) in
AvanzuAdminThemeBundle:layout:macros.html.twig at line 34.
This is the only code I have on the index.html.twig
template:
{% extends 'AvanzuAdminThemeBundle:layout:base-layout.html.twig' %}
{% block page_content %}
Hello World!
{% endblock %}
The bundle should have a configuration option to allow root when calling the bower_bin.
On some servers, I only have root access and can't install the bundle without this. I worked around it for now but this would be really useful.
On the file:
In the span, the title text should be a string with l18n support at least for the phrase "Dies ist ein Pflichtfeld":
<span class="required" title="Dies ist ein Pflichtfeld">*</span>
When I try to use the bundle I get this error
Unable to find file "@AvanzuAdminThemeBundle/Resources/public/vendor/modernizr/modernizr.js" in . (which is being imported from "/vagrant/project/app/cache/dev/assetic/routing.yml").
I did try php app/console asset:install command but seems to be not copying any folder with name vendor
Hi, i really like to use this bundle, but after install i notice that the page not showed like the AdminLTE demo and the problem was the font...
The CSS file have errors and is not valid, in fact, if you validate the CSS with the W3C CSS Validator (https://jigsaw.w3.org/css-validator/) you get a lot of errors and warnings, but the font related error is:
@import are not allowed after any valid statement other than @charset and @import. @import url(//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic);
Hello i'm using your awesome plugin but I have some issues :
I can't add my own stylesheets by using a filter :
{% block stylesheets %}
{{ parent() }}
{% stylesheets
'plugins/jQueryColorPicker/js/colorpicker.js'
filter='cssrewrite' %}
< link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
{% endblock %}
Thank you
It seems like you can't add additional attributes like on onclick a menu item, is that something which is easy to achieve. I actually have an idea of implementing it, and would be happy to contribute that to the bundle.
This issue is somewhat related to #58 which I created before.
Are there any plans for this?
Thanks!
After deploy on production I noticed that not all FA icons are loaded. I discovered that on dev we have FA in version 4.4.0 but on production we have 4.2.0. How can I use the 4.4.0 on production?
https://github.com/avanzu/AdminThemeBundle/blob/master/Resources/public/static/dev/styles/admin-lte-all.css <- 4.4.0
https://github.com/avanzu/AdminThemeBundle/blob/master/Resources/public/static/prod/styles/admin-lte-all.css < 4.2.0
when id execute "app/console avanzu:admin:fetch-vendor" for bundle installation, there is Unrecognized options "bower_bin" under "avanzu_admin_theme" error occured. What does it mean ?
I want to use this bundle for a app able to be installed in systems with no bower, so I'm wondering if there is a workaround for this case.
Any ideas?
I don't understand why we need to execute this:
app/console avanzu:admin:fetch-vendor
This could be added by default in the AdminThemeBundle.
There's already the "Resources/public/js", "Resources/public/fonts" added by default.
The command will be then executed only when somebody wants to update the vendors...
Got this error when running php app/console avanzu:admin:fetch-vendor
:
[Executing] /usr/local/bin/bower install
[Progress] bower bootflat#* not-cached git://github.com/flathemes/bootflat.git#*
[Progress] bower bootflat#* resolve git://github.com/flathemes/bootflat.git#*
[Progress] bower jquery#* cached git://github.com/jquery/jquery.git#2.1.4
[Progress] bower jquery#* validate 2.1.4 against git://github.com/jquery/jquery.git#*
[Progress] bower jquery-ui#* cached git://github.com/components/jqueryui.git#1.11.4
[Progress] bower jquery-ui#* validate 1.11.4 against git://github.com/components/jqueryui.git#*
[Progress] bower momentjs#* cached git://github.com/moment/moment.git#2.10.3
[Progress] bower momentjs#* validate 2.10.3 against git://github.com/moment/moment.git#*
[Progress] bower backbone#* cached git://github.com/jashkenas/backbone.git#1.2.0
bower backbone#* validate 1.2.0 against git://github.com/jashkenas/backbone.git#*
[Progress] bower underscore#* cached git://github.com/jashkenas/underscore.git#1.8.3
[Progress] bower underscore#* validate 1.8.3 against git://github.com/jashkenas/underscore.git#*
[Progress] bower modernizr#* cached git://github.com/Modernizr/Modernizr.git#2.8.3
[Progress] bower modernizr#* validate 2.8.3 against git://github.com/Modernizr/Modernizr.git#*
[Progress] bower spinjs#* cached git://github.com/fgnass/spin.js.git#2.1.0
[Progress] bower spinjs#* validate 2.1.0 against git://github.com/fgnass/spin.js.git#*
[Progress] bower marionette#* cached git://github.com/marionettejs/backbone.marionette.git#2.4.1
[Progress] bower marionette#* validate 2.4.1 against git://github.com/marionettejs/backbone.marionette.git#*
[Progress] bower pickadate#* cached git://github.com/amsul/pickadate.js.git#3.5.6
[Progress] bower pickadate#* validate 3.5.6 against git://github.com/amsul/pickadate.js.git#*
[Progress] bower holderjs#* cached git://github.com/imsky/holder.git#2.7.1
[Progress] bower holderjs#* validate 2.7.1 against git://github.com/imsky/holder.git#*
[Progress] bower bootbox#* cached git://github.com/makeusabrew/bootbox.git#4.4.0
[Progress] bower bootbox#* validate 4.4.0 against git://github.com/makeusabrew/bootbox.git#*
[Progress] bower fontawesome#* cached git://github.com/FortAwesome/Font-Awesome.git#4.3.0
[Progress] bower fontawesome#* validate 4.3.0 against git://github.com/FortAwesome/Font-Awesome.git#*
[Progress] bower ionicons#* cached git://github.com/driftyco/ionicons.git#2.0.1
[Progress] bower ionicons#* validate 2.0.1 against git://github.com/driftyco/ionicons.git#*
[Progress] bower fullcalendar#* cached git://github.com/arshaw/fullcalendar.git#2.3.1
[Progress] bower fullcalendar#* validate 2.3.1 against git://github.com/arshaw/fullcalendar.git#*
[Progress] bower adminlte#>=2.0.0 <3.0 cached git://github.com/almasaeed2010/AdminLTE.git#2.1.1
[Progress] bower adminlte#>=2.0.0 <3.0 validate 2.1.1 against git://github.com/almasaeed2010/AdminLTE.git#>=2.0.0 <3.0
[Progress] bower bootflat#* checkout master
[Progress] bower jquery#>=1.6 cached git://github.com/jquery/jquery.git#2.1.4
[Progress] bower jquery#>=1.6 validate 2.1.4 against git://github.com/jquery/jquery.git#>=1.6
[Progress] bower underscore#>=1.7.0 cached git://github.com/jashkenas/underscore.git#1.8.3
[Progress] bower underscore#>=1.7.0 validate 1.8.3 against git://github.com/jashkenas/underscore.git#>=1.7.0
[Progress] bower bootstrap#>= 3.0.0 cached git://github.com/twbs/bootstrap.git#3.3.4
[Progress] bower bootstrap#>= 3.0.0 validate 3.3.4 against git://github.com/twbs/bootstrap.git#>= 3.0.0
[Progress] bower backbone#1.0.0 - 1.1.2 cached git://github.com/jashkenas/backbone.git#1.1.2
[Progress] bower backbone#1.0.0 - 1.1.2 validate 1.1.2 against git://github.com/jashkenas/backbone.git#1.0.0 - 1.1.2
[Progress] bower underscore#1.4.4 - 1.6.0 cached git://github.com/jashkenas/underscore.git#1.6.0
[Progress] bower underscore#1.4.4 - 1.6.0 validate 1.6.0 against git://github.com/jashkenas/underscore.git#1.4.4 - 1.6.0
[Progress] bower moment#>=2.5.0 cached git://github.com/moment/moment.git#2.10.3
[Progress] bower moment#>=2.5.0 validate 2.10.3 against git://github.com/moment/moment.git#>=2.5.0
[Progress] bower backbone.babysitter#^0.1.0 cached git://github.com/marionettejs/backbone.babysitter.git#0.1.6
[Progress] bower backbone.babysitter#^0.1.0 validate 0.1.6 against git://github.com/marionettejs/backbone.babysitter.git#^0.1.0
[Progress] bower backbone.wreqr#^1.0.0 cached git://github.com/marionettejs/backbone.wreqr.git#1.3.2
[Progress] bower backbone.wreqr#^1.0.0 validate 1.3.2 against git://github.com/marionettejs/backbone.wreqr.git#^1.0.0
[Error] bower bootflat#* invalid-meta bootflat is missing "main" entry in bower.json
[Error] bower bootflat#* invalid-meta bootflat is missing "ignore" entry in bower.json
[Progress] bower bootflat#* resolved git://github.com/flathemes/bootflat.git#affdd96590
[Error] bower ECONFLICT Unable to find suitable version for underscore
And also got this fatal error when capifony
ran php app/console assetic:dump --env=prod --no-debug
:
--> Dumping all assets to the filesystem
* executing "sh -c 'cd /var/www/website/releases/20150514000227 && php app/console assetic:dump --env=prod --no-debug'"
servers: ["website.com"]
[website.com] executing command
** [out :: website.com] Dumping all prod assets.
** [out :: website.com] Debug mode is off.
** [out :: website.com]
** [out :: website.com] 02:05:37 [file+] /var/www/website/releases/20150514000227/app/../web/css/3ca43a5_part_1.css
*** [err :: website.com]
*** [err :: website.com]
*** [err :: website.com]
*** [err :: website.com] [RuntimeException]
*** [err :: website.com] The source file "/var/www/website/releases/20150514000227/app/../web/bundles/avanzuadmintheme/vendor/adminlte/bootstrap/css/bootstrap.min.css" does not exist.
*** [err :: website.com]
*** [err :: website.com]
*** [err :: website.com]
*** [err :: website.com] assetic:dump [--watch] [--force] [--period="..."] [write_to]
*** [err :: website.com]
*** [err :: website.com]
Had to add this to vendor/avanzu/admin-theme-bundle/Resources/bower/bower.json
to resolve the issue :
"resolutions": {
"underscore": ">=1.0.0 <2.0"
}
In this page says that the service should be:
'my_admin_bundle.show_user_listener'
and this doesn't work I always have have the "Demo User" everywhere.
but in fact I need to overwrite the default listener with:
'avanzu_admin_theme.navbar_user_listener'
Doing that everything works:
https://github.com/avanzu/AdminThemeBundle/blob/master/Resources/docs/navbar_user.md
I propose to change 'my_admin_bundle.show_user_listener' with 'avanzu_admin_theme.navbar_user_listener' in the documentation, or delete the default listeners.
00:01:06.584 bower bootstrap#>= 3.0.0 validate 3.2.0 against git://github.com/twbs/bootstrap.git#>= 3.0.0
...
00:01:13.301 + app/console assetic:dump '--env=prod' --no-debug
00:01:14.325 Dumping all prod assets.
00:01:14.325 Debug mode is off.
00:01:14.689 [InvalidArgumentException]
00:01:14.689 Unable to find file "@AvanzuAdminThemeBundle/Resources/public/vendor/AdminLTE/js/bootstrap.js".
00:01:14.689
00:01:14.689
00:01:14.689
00:01:14.689 assetic:dump [--forks="..."] [--watch] [--force] [--period="..."] [write_to]
00:01:14.689
so, how to lock bower to 3.0.0 version until you can handle both versions?
what is the real way to use e.g.: jquery.flot.pie.js
right now i use the following in my template:
<script src="{{ asset('bundles/avanzuadmintheme/vendor/adminlte/plugins/flot/jquery.flot.js') }}"></script> <script src="{{ asset('bundles/avanzuadmintheme/vendor/adminlte/plugins/flot/jquery.flot.pie.js') }}"></script>
is this best practice? :D
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.