Closed jbalatero closed 10 years ago
Hello @JbalTero,
The search button is inside the <h1>
tag, which does not appear to be on your screenshots either.
Are you hiding the h1 tag using CSS?
Here is a screenshot of where the search button is within my HTML:
In addition...
The search button is in the controllers $this->menu
, which is added into the heading in the layouts/column1.php
file:
https://github.com/cornernote/yii-audit-module/blob/master/audit/views/layouts/column1.php#L20
U mean this screenshot?. Let me check it, I did nothing about
hmmm.. I guess the problem is within mine,
AuditActiveForm appears..
because I change..., 'style' => 'display:none;' to 'style' => 'display:block;'
but there's no Search button, I guess this has something to do with my CSS,
Here's my html, I can see the AuditActiveForm but there's no h1 tag
I have a feeling the problem is in your main layout. Are you rendering $this->menu
anywhere in your layout?
Can you try with the layout that comes with it to see if that helps?
I Solved it.
in AuditWebController, I added: public $layout = 'audit.views.layouts.column1';
The problem is that, it does not explicitly declare the public $layout. That's why it does not use the column1.php layout.
You might consider adding the line in the repository. I don't know if this problem is only reproducable in my situation or might as well others. :)
Thanks for the assistance and the great extension! . :)
It's declared in the module: https://github.com/cornernote/yii-audit-module/blob/master/audit/AuditModule.php#L31
This extends from CWebModule, which says "the layout that is shared by the controllers inside this module". Therefore it should not need to be defined in the controllers: http://www.yiiframework.com/doc/api/1.1/CWebModule#layout-detail
This works for me with no issues. Have you overwritten this setting in the module configuration in your config/main.php
? If not, are there any other changes or config options you have set that may be interfering?
I would rather not declare this in AuditWebController because it will mean that you (and I) will not be able to change the setting using config/main.php.
Can you share your module config from config/main.php?
Mine is like this:
return array(
'modules' => array(
'audit' => array(
'class' => 'audit.AuditModule',
'adminUsers' => array('brett@mrphp.com.au'),
'userViewUrl' => array('/user/view', 'id' => '--user_id--'),
'connectionID' => 'db',
),
...
),
...
);
Oh yeah! my bad.
in my config/main.php, under modules,
I guess I changed this...
// The layout used for module controllers. 'layout' => 'audit.views.layouts.column1',
mine was, // The layout used for module controllers. 'layout' => 'audit.views.layouts.main,
Now I see... One line of code can make a difference! hahah I reverted it back now, and changed it properly to 'layout' => 'audit.views.layouts.column1',
Nice! Glad we got to the bottom of it.
I followed the manual installation... Instead of putting it under protected/modules, I put it under protected/extensions, and set the alias on the extensions. Here's my path alias:
Here's my problem, No seach button on Error, Field, Log , Request.
In audit/views/layouts/main.php, I commented this out(line 15->22) so that it won't messed up (even if I uncomment this, still there's no search button), and added $this->beginContent() which points out to my main layout, and $this->endContent at the end.