Description:
change _url to _path when using toggle_button so that protocol is preserved
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r600:a28e3e5de752 - - 3 files changed: 6 inserted, 6 deleted

@@ -7,31 +7,31
7 %table.table.table-striped
7 %table.table.table-striped
8 %thead
8 %thead
9 %th Updated
9 %th Updated
10 %th Announcement
10 %th Announcement
11 %th Author
11 %th Author
12 %th{style: 'width: 100px'} Published?
12 %th{style: 'width: 100px'} Published?
13 %th{style: 'width: 100px'}Front?
13 %th{style: 'width: 100px'}Front?
14 %th
14 %th
15 %th
15 %th
16 - for announcement in @announcements
16 - for announcement in @announcements
17 %tr
17 %tr
18 - @announcement = announcement
18 - @announcement = announcement
19 %td= time_ago_in_words announcement.updated_at
19 %td= time_ago_in_words announcement.updated_at
20 %td
20 %td
21 - if !announcement.title.blank?
21 - if !announcement.title.blank?
22 %b Title:
22 %b Title:
23 = h announcement.title
23 = h announcement.title
24 %br/
24 %br/
25 - if !announcement.notes.blank?
25 - if !announcement.notes.blank?
26 %b
26 %b
27 Notes: #{h announcement.notes}
27 Notes: #{h announcement.notes}
28 %br/
28 %br/
29 = h announcement.body
29 = h announcement.body
30 %td= h announcement.author
30 %td= h announcement.author
31 - %td= toggle_button(announcement.published?, toggle_announcement_url(@announcement), "announcement_toggle_#{@announcement.id}", {size: 'btn-sm'})
31 + %td= toggle_button(announcement.published?, toggle_announcement_path(@announcement), "announcement_toggle_#{@announcement.id}", {size: 'btn-sm'})
32 - %td= toggle_button(announcement.frontpage?, toggle_front_announcement_url(@announcement), "announcement_toggle_front_#{@announcement.id}", {size: 'btn-sm'})
32 + %td= toggle_button(announcement.frontpage?, toggle_front_announcement_path(@announcement), "announcement_toggle_front_#{@announcement.id}", {size: 'btn-sm'})
33 %td= link_to 'Edit', edit_announcement_path(announcement), class: 'btn btn-block btn-sm btn-info'
33 %td= link_to 'Edit', edit_announcement_path(announcement), class: 'btn btn-block btn-sm btn-info'
34 %td= link_to 'Destroy', announcement, :confirm => 'Are you sure?', :method => :delete, class: "btn btn-block btn-sm btn-danger"
34 %td= link_to 'Destroy', announcement, :confirm => 'Are you sure?', :method => :delete, class: "btn btn-block btn-sm btn-danger"
35 %br
35 %br
36
36
37 = link_to '+ Add announcement', new_announcement_path, class: 'btn btn-success'
37 = link_to '+ Add announcement', new_announcement_path, class: 'btn btn-success'
@@ -16,35 +16,35
16 %label{:for => "problem_full_name"} Full name
16 %label{:for => "problem_full_name"} Full name
17 = text_field 'problem', 'full_name'
17 = text_field 'problem', 'full_name'
18 = submit_tag "Create"
18 = submit_tag "Create"
19 %table.table.table-condense.table-hover
19 %table.table.table-condense.table-hover
20 %thead
20 %thead
21 %th Name
21 %th Name
22 %th Full name
22 %th Full name
23 %th.text-right Full score
23 %th.text-right Full score
24 %th Date added
24 %th Date added
25 %th.text-center
25 %th.text-center
26 Avail?
26 Avail?
27 %sup{class: 'text-primary',data: {toggle: 'tooltip'}, title: 'Let user submits to this problem?' } [?]
27 %sup{class: 'text-primary',data: {toggle: 'tooltip'}, title: 'Let user submits to this problem?' } [?]
28 %th.text-center
28 %th.text-center
29 Test?
29 Test?
30 %sup{class: 'text-primary',data: {toggle: 'tooltip'}, title: 'Let user uses test interface on this problem?' } [?]
30 %sup{class: 'text-primary',data: {toggle: 'tooltip'}, title: 'Let user uses test interface on this problem?' } [?]
31 - if GraderConfiguration.multicontests?
31 - if GraderConfiguration.multicontests?
32 %th Contests
32 %th Contests
33 - for problem in @problems
33 - for problem in @problems
34 %tr{:class => "#{(problem.available) ? "success" : "danger"}", :id => "prob-#{problem.id}", :name => "prob-#{problem.id}"}
34 %tr{:class => "#{(problem.available) ? "success" : "danger"}", :id => "prob-#{problem.id}", :name => "prob-#{problem.id}"}
35 - @problem=problem
35 - @problem=problem
36 %td= problem.name #in_place_editor_field :problem, :name, {}, :rows=>1
36 %td= problem.name #in_place_editor_field :problem, :name, {}, :rows=>1
37 %td= problem.full_name #in_place_editor_field :problem, :full_name, {}, :rows=>1
37 %td= problem.full_name #in_place_editor_field :problem, :full_name, {}, :rows=>1
38 %td.text-right= problem.full_score #in_place_editor_field :problem, :full_score, {}, :rows=>1
38 %td.text-right= problem.full_score #in_place_editor_field :problem, :full_score, {}, :rows=>1
39 %td= problem.date_added
39 %td= problem.date_added
40 - %td= toggle_button(@problem.available?, toggle_problem_url(@problem), "problem-avail-#{@problem.id}")
40 + %td= toggle_button(@problem.available?, toggle_problem_path(@problem), "problem-avail-#{@problem.id}")
41 - %td= toggle_button(@problem.test_allowed?, toggle_test_problem_url(@problem), "problem-test-#{@problem.id}")
41 + %td= toggle_button(@problem.test_allowed?, toggle_test_problem_path(@problem), "problem-test-#{@problem.id}")
42 - if GraderConfiguration.multicontests?
42 - if GraderConfiguration.multicontests?
43 %td
43 %td
44 = problem.contests.collect { |c| c.name }.join(', ')
44 = problem.contests.collect { |c| c.name }.join(', ')
45 %td= link_to 'Stat', {:action => 'stat', :id => problem.id}, class: 'btn btn-info btn-xs btn-block'
45 %td= link_to 'Stat', {:action => 'stat', :id => problem.id}, class: 'btn btn-info btn-xs btn-block'
46 %td= link_to 'Show', {:action => 'show', :id => problem}, class: 'btn btn-info btn-xs btn-block'
46 %td= link_to 'Show', {:action => 'show', :id => problem}, class: 'btn btn-info btn-xs btn-block'
47 %td= link_to 'Edit', {:action => 'edit', :id => problem}, class: 'btn btn-info btn-xs btn-block'
47 %td= link_to 'Edit', {:action => 'edit', :id => problem}, class: 'btn btn-info btn-xs btn-block'
48 %td= link_to 'Destroy', { :action => 'destroy', :id => problem }, :confirm => 'Are you sure?', :method => :post, class: 'btn btn-danger btn-xs btn-block'
48 %td= link_to 'Destroy', { :action => 'destroy', :id => problem }, :confirm => 'Are you sure?', :method => :post, class: 'btn btn-danger btn-xs btn-block'
49 %br/
49 %br/
50 = link_to '[New problem]', :action => 'new'
50 = link_to '[New problem]', :action => 'new'
@@ -67,34 +67,34
67
67
68 %table.table.table-hover.table-condense
68 %table.table.table-hover.table-condense
69 %thead
69 %thead
70 %th Login
70 %th Login
71 %th Full name
71 %th Full name
72 %th email
72 %th email
73 %th Remark
73 %th Remark
74 %th
74 %th
75 Activated
75 Activated
76 %sup{class: 'text-primary',data: {toggle: 'tooltip', placement: 'top'}, title: 'User has already confirmed the email?' } [?]
76 %sup{class: 'text-primary',data: {toggle: 'tooltip', placement: 'top'}, title: 'User has already confirmed the email?' } [?]
77 %th
77 %th
78 Enabled
78 Enabled
79 %sup{class: 'text-primary',data: {toggle: 'tooltip', placement: 'top'}, title: 'Allow the user to login?' } [?]
79 %sup{class: 'text-primary',data: {toggle: 'tooltip', placement: 'top'}, title: 'Allow the user to login?' } [?]
80 %th Last IP
80 %th Last IP
81 %th
81 %th
82 %th
82 %th
83 %th
83 %th
84 %th
84 %th
85 - for user in @users
85 - for user in @users
86 %tr
86 %tr
87 %td= link_to user.login, controller: :users, :action => 'profile', :id => user
87 %td= link_to user.login, controller: :users, :action => 'profile', :id => user
88 %td= user.full_name
88 %td= user.full_name
89 %td= user.email
89 %td= user.email
90 %td= user.remark
90 %td= user.remark
91 - %td= toggle_button(user.activated?, toggle_activate_user_url(user),"toggle_activate_user_#{user.id}")
91 + %td= toggle_button(user.activated?, toggle_activate_user_path(user),"toggle_activate_user_#{user.id}")
92 - %td= toggle_button(user.enabled?, toggle_enable_user_url(user),"toggle_enable_user_#{user.id}")
92 + %td= toggle_button(user.enabled?, toggle_enable_user_path(user),"toggle_enable_user_#{user.id}")
93 %td= user.last_ip
93 %td= user.last_ip
94 %td= link_to 'Clear IP', {:action => 'clear_last_ip', :id => user, :page=>params[:page]}, :confirm => 'This will reset last logging in ip of the user, are you sure?', class: 'btn btn-default btn-xs btn-block'
94 %td= link_to 'Clear IP', {:action => 'clear_last_ip', :id => user, :page=>params[:page]}, :confirm => 'This will reset last logging in ip of the user, are you sure?', class: 'btn btn-default btn-xs btn-block'
95 %td= link_to 'Show', {:action => 'show', :id => user}, class: 'btn btn-default btn-xs btn-block'
95 %td= link_to 'Show', {:action => 'show', :id => user}, class: 'btn btn-default btn-xs btn-block'
96 %td= link_to 'Edit', {:action => 'edit', :id => user}, class: 'btn btn-default btn-xs btn-block'
96 %td= link_to 'Edit', {:action => 'edit', :id => user}, class: 'btn btn-default btn-xs btn-block'
97 %td= link_to 'Destroy', { :action => 'destroy', :id => user }, :confirm => 'Are you sure?', :method => :post, class: 'btn btn-danger btn-xs btn-block'
97 %td= link_to 'Destroy', { :action => 'destroy', :id => user }, :confirm => 'Are you sure?', :method => :post, class: 'btn btn-danger btn-xs btn-block'
98 %br/
98 %br/
99 = link_to '+ New user', { :action => 'new' }, { class: 'btn btn-success '}
99 = link_to '+ New user', { :action => 'new' }, { class: 'btn btn-success '}
100 = link_to '+ New list of users', { :action => 'new_list' }, { class: 'btn btn-success '}
100 = link_to '+ New list of users', { :action => 'new_list' }, { class: 'btn btn-success '}
You need to be logged in to leave comments. Login now