I am given the task to debug a system. I am not familiar with Entrust package.
Other pages that I go to using the sidebar works fine, but certain pages when I view them, the sidebar does not work (The dropdown disappears).
This is how the sidebar looks like when its not working: View post on imgur.com
This is how it looks like when its working: View post on imgur.com
This two block of codes are (I assume) the main culprit for the sidebar malfunction. The navigation on the sidebar that results in this bug is Student Activity->Merit Management and Student Activity->Settings
_sidebar.blade.php
@if(Entrust::can('student_activity_*'))
<li>
<a href="#" title="sa_menu">
<i class="glyph-icon icon-star"></i>
<span>Student Activity</span>
</a>
<div class="sidebar-submenu">
<ul>
@if(Entrust::can('student_activity_merit_stadd'))
<li><a href="{{ url('/student_activity/merit2') }}" title="Merit"><span>Merit Management</span></a></li>
@endif
@if(Entrust::can('student_activity_setting_stadd'))
<li><a href="{{ url('/student_activity/viewprogsoc/merit') }}" title="Settings"><span>Settings</span></a></li>
@endif
</ul>
</div><!-- .sidebar-submenu -->
</li>
@endif
web.php
//settings view
Route::get('/{option}/merit', 'StudentActController@viewMerit');
//merit view
Route::get('/merit2', 'StudentActController@viewMerit2');
StudentActController.php
public function viewMerit($option){
// Some query ...
return view('stad_student_activity.sa_settings', compact(...));
}
public function viewMerit2(){
// Some query ...
return view ('stad_student_activity.sa_merit', compact(...));
}
The view blade is just a normal blade.
Whenever I change to this two pages, the sidebar does not work. To be honest, I don't know if this is Entrust problem or CSS...
I have already googled the problem and none came out useful.
I have already checked the roles and permission in the database and the user Admin has already assigned the roles for student_activity_merit_stadd and student_activity_setting_stadd.
Thank you in advance.