1) Refactoring
2) Edit resources dialog now correctly works with used locks (by current feature). Templates and other feature still need to be handled
3) 'create new' is not first item in selection menu
4) if there are no resources available, 'choose' mode is selected