i m new to symfony framework , i m using orangehrm-3.1.1 i have added a new menu title in the second level tab , but i dont know how to navigate to the particualar href link. Please help me out with the steps.
Here is how I add menu item via database.
To add a menu in orangehrm there are 3 tables you should check:
ohrm_screen
ohrm_menu_item (the menu hierarchy)
ohrm_user_role_screen (the user role permissions to specific screen)
First, add your link into ohrm_screen, specify your module_id and action_url (Check the module_id in ohrm_module).
After that add the screen into ohrm_menu_item table.
And then add new record in ohrm_user_role_screen with the allowed user_role_id and your screen_id, the can_read field should be 1 (true)
And finally try re-login to your application
Hope you can understand my messy english. :p
I don't know if you want the answer for your question still now. But I have solution for your question and for everyone who wants to add new tab in the orange HRM. Orange HRM is built in symfony framework, so without solid understanding of symfony framework it is difficult to change anything in orange HRM.
Go to the file-/orangehrm3.1.1/symfony/plugins/orangehrmCorePlugin/lib/authorization/service/MenuService.php
In this file you will find the main menu service .
Then go to the orangehrm database you will find ohrm_menu_item table and add the name of the menu you want to display.
Step 1: Check in which module do you want to add your menu
module list is in ohrm_module table.
Step 2: Check under what user roll you want to add menu
user roll is in ohrm_user_role.
Step 3: Add Screen on bases of module (step 1)
insert data into ohrm_screen
step 4: Add Menu Item on bases of Screen (step 3)
insert into ohrm_menu_item
Step 5: Assign screen to user on bases of user roll (step 2) and screen (step 3)
insert into ohrm_user_role_screen
Step 6: Logout and login again. New menu will be there.
That's all
You could use the approach mentioned on this page.
Related
Sorry I am not a hardcore coder. Need to solve Three problems and need your help please.
I need to be able to assign an user (i.e Editor) to a job from Edit Order Page (from a list of Editors dropdown menu)
I would like to see which orders are assigned to whom from Oder Table view next to status column (Admin view)
Each editor should only see their assigned order when they login to wordpress using their login credential
If anyone can provide the code or point me to a solution, I would really appreciate it.
Zed
I created new content type and it has 2 new fields (one is input, other select - drop-down), semantically related one to other. So I want to position them in the same row on node edit page. I tried to use groups to achieve that, but anything I've tried does not give me what I want. Tried "Horizontal tab" group with 2 fields in it. Tried 2 "Horizontal tab" groups next to each other with one field in each. Nothing helps.
Is it possible at all and if yes how to place 2 fields in the same row on node edit (back-end with standard back-end theme) page?
I would prefer to avoid CSS tweaks of admin theme. Hopefully those field groups could do the job, with some specific settings?
Update:
#MilanG As you are using field_group module already what you can do is, create a div field_group add your desired fields to it and give that field group class container-inline which will show those two fields inline. Just tried it on my local drupal 7 site and works perfect!
I'm using the Wordpress Contact Form Manager plugin. If I set a dropdown's element Default drop down value to some value that value does appears selected as I've set it. The problem is when I click on the dropdown to expand it, the additional Select option appears as shown on the image, and I can't seem to find where could I customize this. I went through their FAQ and googled but no help.
As it seems the option to edit this really doesn't exist via the plugin admin panel and in order to remove the additional Select option you have to edit the create-contact-form.php starting on line 1006 and comment the code out:
if($formElementDetail->client_view_multi_select_drop_down != 1){
//$replace = $replace.'<option value="">Select</option>';
}
You can of course comment (or remove) the whole if case. Hope this will help someone.
I am new to symfony framework. Now I am customizing orangehrm to suit certain new requirements.
For example: Similar to Admin>Qualifications>skills menu, I need to create Admin>Qualifications>Category.I have made the menu modifications by editing index.php file.
The functionality for this new page is similar to 'Skill' page.But we need to use different database table. Orangehrm uses doctrine for database related operation. I am not at all familiar with doctrine either.
Could someone please give the instructions for implementing 'Admin>Qualifications>Category' function? It is very urgent and I think the process is also very simple (not sure).
First you have to add your menu in database then create classes in your specific module.
Step 1: Check in which module do you want to add your menu.
module list is in ohrm_module table.
Step 2: Check under what user roll you want to add menu.
user roll is in ohrm_user_role.
Step 3: Add Screen on bases of module (step 1).
insert data into ohrm_screen
step 4: Add Menu Item on bases of Screen (step 3).
insert into ohrm_menu_item
Step 5: Assign screen to user on bases of user roll (step 2) and screen (step 3).
insert into ohrm_user_role_screen
Step 6: Logout and login again. New menu will be there.
Step 7: Go to your plugin folder and create your controller in action folder like this
class YourLinkNameAction extends sfAction {
//SANI: Start all coding in execute method
}
Step 8: Create your View in template folder like this
YourLinkNameSuccess.php
That's all
i have got a menu structure like this:
-menu item level 1
--menu item level 2
---menu item level 3
all items are linking to the same node. now, if i visit the node only the first two items are displayed. what i found out is: when i change the link of the first level menu item to something else, all level get displayed right.
menu modules i use:
Menu block
Menu Settings per Content Type
Menu Trails
Administration menu
Auto Menu Title
Hierarchical Select
any ideas?
thanks
lukas
googletorp is right-- Drupal's core menu system isn't designed to handle this. However you can use a workaround.
Let's say that you'd like to create a nested menu in which one of the children links to the same path as its parent. Something like:
people/friends
people/friends
people/family
people/neighbors
This works in theory-- the menu items will take you to the correct page. But if you're relying on Drupal to correctly set the active trail and expand the correct sub menus, you'll have to use a bit of a workaround. You're basically going to create dummy nodes that will redirect to the desired page rather than creating two menu links that have the exact same path. The parent (in menu) will redirect to the child's node.
Method 1 (D6 only):
Download and install CCK Redirection
Create a Content Type 'Redirect Node' and add a CCK Redirection field to the content type
Create a page node (node 1) with URL "people/friends" and add a menu link
Create a 'Redirect Node' (node 2) and create a menu link for this new node.
Set CCK Redirection field to the URL node 1 (people/friends).
Set node 2's menu item to be the parent of node 1's
Method 2 (D6&7):
If you want to get really fancy, you can take a more user friendly approach by combining CCK's Node Reference module with the Rules module.
Download and install the Rules module (and Rules UI) and enable CCK's Node Reference module
Create a Content Type 'Redirect Node' and add a Node Reference (D6) (D7) field 'field_redirect_target'. Be sure to configure this so that it is required, and users cannot select nodes of type 'Redirect Node'
Add a new rule via the Rules module when content is going to be viewed if content is of type 'Redirect Node'
Redirect to page: [node:field_redirect_target-path]
Create node 1 of type page
Create node 2 of type 'Redirect Node'
Set Node Reference field to Node 1
Set node 2's menu item to be the parent of node 1's
This method is a bit nicer for users, since it doesn't require them to find the system path for the target node.
Depending on your setting, the menu module will show the active link it it's children. It is, however, not designed to search for more than a single link. This is why you wont get the full nested menu structure. My guess is, that the top one is the link it finds first, and that is where it stops. I can't remember the algorithm for the menu structure, you might have luck rearranging the menu structure, making menu 1 the last child. This is, however, not something the Drupal menu system is designed for, and you will not have an easy time changing this.
What are you trying to accomplish by linking the same node several times is a nested menu structure?
I solved my problem using menu first child. I didn't look at the code it uses, but it simply works. It's really a bummer that this doesn't work out of the box and you have to use such workarounds. But actually this increased usability for my case.