Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Commit

Permalink
[#45] yeah
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Stoica committed Apr 21, 2014
1 parent d98e7a4 commit ff18e78
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 15 deletions.
4 changes: 4 additions & 0 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@ def sync_to_legacy_profile!(new_password = nil)
p.mname = middle_name
p.lname = last_name

unless self.roles.blank?
p.position = self.roles.map(&:full_name).join(', ')
end

p.save!

# exec is a reserved word, has to be done separately
Expand Down
4 changes: 4 additions & 0 deletions app/views/layouts/_navigation.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
= active_link_to admin_root_path, wrap_tag: :li do
i.glyphicon.glyphicon-cog>
span Admin
li
= link_to 'http://wrektranet.wrek.org/staff/contactlist.php3' do
i.glyphicon.glyphicon-bookmark>
span Contacts
li
= link_to 'http://wrektranet.wrek.org/wiki/Main_Page' do
i.glyphicon.glyphicon-book>
Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/staff.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
ul.nav
- if Settings.profiles_enabled?
= active_link_to 'People', staff_users_path, wrap_tag: :li
= active_link_to 'Add An Op', 'http://wrektranet.wrek.org/staff/wreknewform.php3', wrap_tag: :li
- if Settings.contest_book_enabled?
= active_link_to 'Ticket Signups', staff_tickets_path, wrap_tag: :li
= active_link_to 'Suggest Contests', staff_contest_suggestions_path, wrap_tag: :li
Expand Down
31 changes: 16 additions & 15 deletions app/views/users/help.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,21 @@ h1.page-header Help!

.row
.col-sm-6
.row
.col-sm-4
.alert.alert-info
p Need to reset your password? Just type in your username and we'll send you instructions.
.col-sm-8
= simple_form_for(@user, url: reset_password_users_path, html: { class: 'form-horizontal' }, defaults: defaults) do |f|
= f.input :username, autofocus: true, placeholder: 'Username', input_html: { class: 'form-control' }
.form-group
.col-sm-8.col-sm-offset-4
= f.button :submit, "Reset my password", class: 'btn-primary'
- if Settings.profiles_enabled?
.row
.col-sm-4
.alert.alert-info
p Need to reset your password? Just type in your username and we'll send you instructions.
.col-sm-8
= simple_form_for(@user, url: reset_password_users_path, html: { class: 'form-horizontal' }, defaults: defaults) do |f|
= f.input :username, autofocus: true, placeholder: 'Username', input_html: { class: 'form-control' }
.form-group
.col-sm-8.col-sm-offset-4
= f.button :submit, "Reset my password", class: 'btn-primary'

.lead
markdown:
If you're still having problems, please contact [[email protected]](mailto:[email protected]).

.col-sm-6
.row
Expand All @@ -30,8 +35,4 @@ h1.page-header Help!
= f.input :current_password, placeholder: 'Password', required: true, input_html: { class: 'form-control' }
.form-group
.col-sm-8.col-sm-offset-4
= f.button :submit, "Fix stuff!", class: 'btn-primary'

.lead
markdown:
If you're still having problems, please contact [[email protected]](mailto:[email protected]).
= f.button :submit, "Fix stuff!", class: 'btn-primary'

0 comments on commit ff18e78

Please sign in to comment.