-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* steps admin panel * remove old tests * remove old controller * remove private method in career step controllers * fix * fix * redisign routs and controller step * fix flash maessages * fix
- Loading branch information
1 parent
71b6a76
commit 5f74437
Showing
23 changed files
with
202 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
h3.my-4.me-3 = t('.steps_career') | ||
|
||
= link_to t('.add_new_step'), new_admin_career_step_path(career), class: 'btn btn-primary' | ||
|
||
table.table | ||
thead | ||
tr | ||
th = han('career/step', 'name') | ||
th = han('career/step', 'created_at') | ||
th = t('actions') | ||
tbody | ||
- steps.each do |step| | ||
- career_steps.each do |step| | ||
tr | ||
td = link_to step.name, admin_career_step_path(career, step), class: 'text-decoration-none' | ||
td = link_to step.name, admin_step_path(step), class: 'text-decoration-none' | ||
td = l step.created_at, format: :long | ||
td | ||
.btn-group[role='group' aria-label="#{t('action_buttons')}"] | ||
= link_to admin_career_step_path(career, step), class: 'btn btn-outline-primary btn-sm', title: t('.show_step') do | ||
= link_to admin_step_path(career, step), class: 'btn btn-outline-primary btn-sm', title: t('.show_step') do | ||
span.bi.bi-eye-fill | ||
= link_to edit_admin_career_step_path(career, step), class: 'btn btn-outline-primary btn-sm', title: t('.edit') do | ||
= link_to edit_admin_step_path(step), class: 'btn btn-outline-primary btn-sm', title: t('.edit') do | ||
span.bi.bi-gear-fill |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
- content_for :header do | ||
= t('.career') | ||
|
||
= render 'menu', career: nil | ||
|
||
table.table | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.h4 | ||
= t('.attached') | ||
|
||
- if careers.any? | ||
table.table id='attached' | ||
thead | ||
tr | ||
th = han('career', 'name') | ||
th = t('.actions') | ||
tbody | ||
- careers.each do |career| | ||
tr | ||
td = career.name | ||
td | ||
.btn-group[role='group' aria-label="#{t('action_buttons')}"] | ||
= link_to admin_career_path(career), class: 'btn btn-outline-primary btn-sm', title: t('.show') do | ||
span.bi.bi-eye-fill | ||
= link_to edit_admin_career_path(career), class: 'btn btn-outline-primary btn-sm me-1', title: t('.edit') do | ||
span.bi.bi-gear-fill | ||
- else | ||
= render 'web/shared/empty_list' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ul.nav.nav-tabs.mb-4 | ||
= menu_item t('.list'), admin_steps_path | ||
= menu_item t('.new'), new_admin_step_path | ||
- if @step&.persisted? | ||
= menu_item @step.name, edit_admin_step_path(@step) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
- content_for :header do | ||
= t('steps') | ||
= t('.step', name: @step.name) | ||
|
||
= render 'web/admin/careers/steps/form', step: @step, url: admin_career_step_path(resource_career, @step) | ||
= render 'menu' | ||
|
||
- if @careers.any? | ||
.mb-2 | ||
span.me-3 | ||
= t('.attached_careers') | ||
span | ||
- @careers.each do |career| | ||
= link_to career.name, admin_career_path(career), class: 'badge rounded-pill bg-success me-1' | ||
|
||
= render 'form', step: @step, url: admin_step_path(@step) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
- content_for :header do | ||
= t('career_steps') | ||
|
||
= render 'menu' | ||
|
||
table.table | ||
thead | ||
tr | ||
th = sort_link(@q, 'name') | ||
th = sort_link(@q, 'locale') | ||
th = sort_link(@q, 'created_at') | ||
th = t('.action') | ||
tbody | ||
- @steps.each do |step| | ||
tr | ||
td = step.name | ||
td = step.locale | ||
td = l step.created_at, format: :short | ||
td | ||
.btn-group[role='group' aria-label="#{t('action_buttons')}"] | ||
= link_to admin_step_path(step), class: 'btn btn-outline-primary btn-sm', title: t('.show') do | ||
span.bi.bi-eye-fill | ||
= link_to edit_admin_step_path(step), class: 'btn btn-outline-primary btn-sm me-1', title: t('.edit') do | ||
span.bi.bi-gear-fill |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
- content_for :header do | ||
= t('steps') | ||
= t('.new_step') | ||
|
||
= render 'web/admin/careers/steps/form', step: @step, url: admin_career_steps_path | ||
= render 'menu' | ||
|
||
= render 'form', step: @step, url: admin_steps_path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,19 @@ | ||
- content_for :header do | ||
= t('.step', step_name: @step.name) | ||
= link_to t('.back'), url_for(:back), class: 'btn btn-secondary me-1' | ||
= link_to edit_admin_step_path(@step), class: 'btn btn-primary', title: t('.edit') do | ||
span.bi.bi-gear-fill.me-1 | ||
= t('.edit') | ||
|
||
= link_to t('.back'), url_for(:back), class: 'btn btn-secondary' | ||
.row.my-1 | ||
.col-lg-12 | ||
.my-1 | ||
.h3 | ||
= @step.name | ||
.bg-light.rounded.py-2.px-3 | ||
== markdown2html(@step.description) | ||
.my-1 | ||
.h4 | ||
= t('.tasks') | ||
.bg-light.rounded.py-2.px-3 | ||
== markdown2html(@step.tasks_text) | ||
|
||
.row.mb-3 | ||
.col-sm-3 | ||
b = han('career/step', 'name') | ||
.col-sm-9 | ||
= @step.name | ||
|
||
.row.mb-3 | ||
.col-sm-3 | ||
b = han('career/step', 'description') | ||
.col-sm-9.hexlet-cv-content | ||
== markdown2html @step.description | ||
|
||
.row.mb-3 | ||
.col-sm-3 | ||
b = han('career/step', 'tasks_text') | ||
.col-sm-9 | ||
== markdown2html @step.tasks_text | ||
|
||
.row.mb-3 | ||
.col-sm-3 | ||
b = han('career/step', 'locale') | ||
.col-sm-9 | ||
= @step.locale_text | ||
= render 'careers', careers: @careers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ en: | |
all_vacancies: Jobs | ||
all_career_tracks: Career Tracks | ||
career_track: Career Track | ||
all_career_steps: Steps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.