26 Commits
Author SHA1 Message Date
Eric Davis ef394da702 Updated for Rails 2.3. 2009-09-07 16:35:40 -07:00
Eric Davis 724dd470ba Removed the Redmine core template and Redmine core hooks instead. 2009-08-01 11:05:55 -07:00
Eric Davis c0006e1040 [#2558] Check that @memberships is set before using it. 2009-08-01 10:04:20 -07:00
Eric Davis df0ecda7ff Added some compatibility wrappers for the stable 0.8.x version of Redmine. 2009-04-21 21:35:13 -07:00
Eric Davis 4666ddb10e Fixed two bugs caused by the core changes to project/subprojects. Might break compatibility with the 0.8.x branch of Redmine.
#2089
2009-02-05 17:08:26 -08:00
Eric Davis cc4c80c461 Fixed a bug where the Calender wasn't working in the User Admin panel
The calendar select would open but not set the new Rate field.  Turned out to
be because the Membership tab had form elements with the same id.

  #2031
2009-01-26 14:19:02 -08:00
Eric Davis dc6acf5031 Changed the create.rjs so it will replace the td on the admin and project panel.
* td's are now id'ed like rate_project_user

  #1923
2009-01-21 12:20:17 -08:00
Eric Davis 82e480b77b Minor bug when a user doesn't have any rates yet 2009-01-20 17:11:27 -08:00
Eric Davis 363e8c0c5a Converted the Membership rate form to an Ajax remote form.
* Changed the form_for to be a remote_form_for
* Changed the url to use the js format
* Added RJS to add the Saved rate to the rate cell
* Added id to the table cell so the rate cell can be replaced on success
* Added an Error RJS to flash an error message

  #1921
2009-01-20 16:37:23 -08:00
Eric Davis 0806bf13df Added a standard form for adding a new rate based on the membership row. #1921 2009-01-20 15:58:55 -08:00
Eric Davis cfd6e09df5 Added a duplicate of the Redmine _membership partial but with 'hooks' for setting Rates. #1921 2009-01-20 15:38:29 -08:00
Eric Davis 1cd24e451b Sorting the Project column by project name now
* Including projects in Rate.history_for_user
* Moved the valid sort options to a constant on the RatesController
* Changed the ValidSortOptions to use the Project name for project_id
* Updated admin view to use RatesController::ValidSortOptions instead of a
  duplicated string.

  #1915
2009-01-20 10:46:16 -08:00
Eric Davis 05dd3649f6 Fixed the sorts by updated to 0.8 to use the new sort API and fixing the update element id. #1915 2009-01-19 15:00:43 -08:00
Eric Davis f870a6019e Hacked some column sorting onto RatesController
* Added SortHelper to RatesController
* Init and updating the sorting (pre 0.8 sort_update)
* RatesController#index will only render the layout on non-xhr requests
* Changed Rate.history_for_user to take an order clause
* Added rate_sort_header_tag and rate_sort_link to the SortHelper in order
  to get the correct parameters for sorting Rates
* Added rate_sort_header_tags to the Rate lists

  #1915
2009-01-19 14:43:54 -08:00
Eric Davis 22ec6f56b7 Added a back_url field to the Rate for that will store the redirect path.
* Used in the User Administration panel so RatesController can redirect back to
  the panel as needed.

  #1914
2009-01-19 11:32:27 -08:00
Eric Davis ae0be85f76 Using form partial for the new rate. #1916 2009-01-19 10:45:53 -08:00
Eric Davis 6698ff8169 Moved the Rate History out of the users partial and into a partial for Rates
* This will allow the RatesController to use the same view

  #1916
2009-01-19 10:28:58 -08:00
Eric Davis 8eeb0f4872 Moved form to a partial, it will be used with other views. #1914 2009-01-19 09:46:14 -08:00
Eric Davis ff93fc6df7 Removed custom project selector with one from the helpers. #1914 2009-01-19 09:43:54 -08:00
Eric Davis 973e6bc2b6 Mocked up a nonfunctional New Rate form. #1914 2009-01-19 09:39:44 -08:00
Eric Davis 820337576c Show a lock icon if a Rate is locked. #1915 2009-01-16 15:45:01 -08:00
Eric Davis 931ecae4d1 Renamed the Rates tab to Rate History to match the comp. #1915 2009-01-16 15:17:34 -08:00
Eric Davis bba40af42a Cleaned up the rate partial UI to better match the comps. #1915 2009-01-16 15:14:05 -08:00
Eric Davis 33d1f84878 Added a named scope to make history lookups easier, Rate.history_for_user(user). #1915 2009-01-16 15:09:46 -08:00
Eric Davis 5296368183 Added the start of a Rate History table in the Rate partial
* Had to do Model level access in the view.  Once there is a hook in the
  controller, it can be moved to there.
* Added a table listing each rate using the memberships table as a base

  #1915
2009-01-16 15:05:52 -08:00
Eric Davis e1278bcb69 Patched UsersHelper#user_settings_tabs to add a new Rates tab
* Wrapped UsersHelper#user_settings_tabs with an alias_method_chain
* Added the new Rate element to the return of user_settings_tabs
* Added RSpecs to confirm the change works without breaking
* Added a partial view for users/rates which will be used by Redmine
  when it renders the user edit panel

  #1913
2009-01-16 14:42:33 -08:00