Commit 9f2b68de authored by Jiri Strojil's avatar Jiri Strojil

Removed unused action

parent 80ce11c3
Pipeline #32841 failed with stage
in 35 minutes and 2 seconds
class SemesterProcessesController < ApplicationController
before_action :set_semester_process, only: [:show, :edit, :update, :overdue]
before_action :set_semester_process, only: [:edit, :update, :overdue]
before_action :set_semester, only: [:new, :create]
include SemesterProcessHelper
def index
authorize SemesterProcess
@semester_processes = SemesterProcess.all.paginate(page: params[:page])
end
def show; end
def new
@semester_process = SemesterProcess.new(semester: @selected_semester, kind: :mail )
new_or_edit
......
......@@ -23,8 +23,8 @@ module NavigationAndButtonHelper
}.freeze
def form_navigation_btn(action, cols: 12, with_row: true, md_cols: nil, with_col: false,
add_class: nil)
button = make_nav_button(action)
add_class: nil, custom_controller: nil)
button = make_nav_button(action, custom_controller: custom_controller)
button = bootstrap_col(cols, md_cols) { button } if with_col || with_row
button = boostrap_row(add_class) { button } if with_row
button
......@@ -58,10 +58,13 @@ module NavigationAndButtonHelper
end
end
def make_nav_button(action)
def make_nav_button(action, custom_controller: nil)
if action == :back
text = icon_span(:back)
action = :index
elsif custom_controller
text = icon_span(:back)
return button_link(text, controller: custom_controller, action: :index, id: nil)
else
text = t_title(action)
end
......
nav.navbar.section-navigation
hr
ul.list-inline
li= button_link 'Neuen Semester Prozess erstellen', new_semester_process_path, dimension: 'sm'
hr
......@@ -2,4 +2,4 @@ h1= t_title(:edit)
= render 'form'
= form_navigation_btn :back
= form_navigation_btn :index, custom_controller: :semester_process_volunteers
h1= t_title(:index)
= render 'index_nav'
= bootstrap_paginate(@semester_processes)
.table-responsive
table.table.table-striped
thead
tr
th.hidden-print Aktionen
th= t_attr(:creator)
th= t_attr(:semester)
th= t_attr(:created_at)
tbody
- @semester_processes.each do |semester_process|
tr
td.index-action-cell.hidden-print
= link_to t_action(:show), semester_process
= link_to t_action(:edit), edit_semester_process_path(semester_process)
= link_to icon_span(:delete), semester_process_path(semester_process), confirm_deleting(semester_process)
td = semester_process.creator
td = semester_process.semester
td= l(semester_process.created_at)
= bootstrap_paginate(@semester_processes)
= render 'index_nav'
......@@ -2,4 +2,4 @@ h1= t_title(:new)
= render 'form'
= form_navigation_btn :back
= form_navigation_btn :index, custom_controller: :semester_process_volunteers
......@@ -2,4 +2,4 @@ h1 Erinnerung versenden
= render 'form'
= form_navigation_btn :back
= form_navigation_btn :index, custom_controller: :semester_process_volunteers
h1= t_title(:show)
p
strong User:
= @semester_process.creator
p
strong Semester start:
= @semester_process.period_start
p
strong Semester end:
= @semester_process.period_end
= form_navigation_btn :edit
= form_navigation_btn :back
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment