How to add new button in Laravel nova? - laravel-nova

How can I customize my Laravel nova by adding new button near "Edit" and "Delete" buttons?
Laravel nova buttons by default

For anybody else wondering how to do this, I just figured it out and wrote a quick tip on my blog: https://www.codepicky.com/extend-laravel-nova-components/
The gist of it is that you need to replace one of Nova's components and essentially inject your own component into it.
So, find a component that's on the spot you want to add your component, and replace it with your own, then reference the original component inside your new component, to bring it back.

There are several ways but it also depends a bit what you want to do.
Do you want to run an action against a set of resources then you should create a new action with artisan nova:action . https://nova.laravel.com/docs/3.0/actions/defining-actions.html
But there are many more reasons such as predefined filters or links. The best is probably to scout https://novapackages.com unless it exists as a built in feature.

Related

OrangeHRM Custom Fields

I am trying to change the number of custom fields I can create in OrgangeHRM PIM section.
I have found a few articles on this site that say what part of the code to change but non saying where to find the file where the code is stored is in.
If anyone can help then that would be great.
I am running version 4.0 of OrangeHRM.
Thanks
orangeHRM have slots for custom field (i dont remember, but i think 10 slot in orange 4.0), you can use this for put what you need.
Out the box, you can follow guides for add more custom or pre-format fields, but not is more recomendable, this can make broken code.
meanwhile, you think work out the box, remember orangeHRM is a symfony based software, if you know how work symfony (MVC framework), work it whit OrangeHRM is more easy
good luck

Create state for object in Rails

Firstly I'm sorry for my english. Ha ha
So, I'm learning to create sites with Ruby on Rails so I started with that framework. I stuck for a few hours because I do not find the right method for something that I try to do.
I try to create a crowdfunding site. I have successfully installed and configured ActiveAdmin and configured it to create projects. I would now like to add a condition into these projects. I would like 4 states: "Empty" when the project is created, but not all features are filled. "Upcoming" when it met all the requirements. And then when it is ready it should get "Upcoming" state. I want my project management panel to be represented on activeadmin. I have a select box that would change the project status to "Validate" or "No validate".
So I thought to simply use the tool 'if condition' to do the above, but my problem is I have no idea of ​​where I should put it. If I put it into the active admin controller, a controller would be created for projects or in my project model? Should I create a method and if so when to call it? Maybe do something else? I struggle to see clearly the whole picture.
Thank you in advance for your suggestions!

Change help link in the Visual Editor of MediaWiki

Is there a way to change the help link in the toolbar dropdown in the new visual editor of MediaWiki?
I tried setting
"visualeditor-help-link":"mw:Help:VisualEditor/User guide/de"
in
"extentsions/VisualEditor/modules/ve-wmf/i18n/de.json"
as proposed here, but then my MediaWiki could not parse the JSON file. My goal is to link to the MediaWiki help page, that can be found here. The normal version:
"visualeditor-help-link":"[https://www.mediawiki.org/wiki/Help:VisualEditor/User_guide/de]"
did not work, neither did this:
"[[{{MediaWiki:visualeditor-helppagelink}}|Hilfe]]"
You should never ever change the source code of MediaWiki core or any extension. It makes an upgrade process much more hard and complicated. There are other ways to achieve a high customization of the user interface language :)
For your problem, it should be enough to create the following page in your wiki (like any other page, but you need the editinterface user right, which is assigned to sysops by default):
MediaWiki:visualeditor-help-link
Put the link you want to use into the textarea (without any wikitext, e.g. "Help:VisualEditor" (without any ")) and save the page.
After reloading the VisualEditor (maybe you need to clear your browser's cache using Ctrl + F5) the link should point to the new target you specified in the message above. If you use a message cache, it is maybe needed to rebuilt it.

TFS - WIT Customization - Define a custom action

I'm working with TFS 2013 and VS2013 to modify a work item template but there are some issues I cannot resolve.
I want only the person who is assigned to a work item to be able to modify this. Is there any opportunity to set a general rule for this? I already tried to set each field readonly if the authorized user is not equal to the assigned user. But that didn't work for me, I suspect this is because of the difference between display name and system user (domain).
I also want to create a custom action, which automaticly changes the "assignedTo"-User. Unfortunatly I didn't find any proper guide how to define a custom action. Most guides explanes where an action is refered in a transition, but not where it is defined. Do you have any suggestions where to find such kind of guide?

Silverlight: Deleting Template Parts

I have a question regarding template parts. I want to create a control that inherits from ChildWindow, but I don't want it to have a border, OK/Close buttons, etc.
Is it an acceptable practice to remove the template parts that I don't want? I have created a copy of the ChildWindow template in Blend and removed the template parts, and it works fine - I just want to make sure that that won't cause any problems down the road.
Thanks,
Charles
If you read some of the custom control development documentation on MSDN it specifically mentions that developers should anticipate that template parts may not exist and code for it, so I think you're Ok there. Personally, when I need to remove template parts I prefer to leave them in the Xaml but set Visibility = Collapsed for something like a button or BorderWidth = 0 for something like a Border. Personal preference I suppose.

Resources