Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tilføjede modal form til jobbere for email + styling af index på jobb…
…ere og jobs
- Loading branch information
1 parent
83e902f
commit 375f04f
Showing
28 changed files
with
292 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Place all the behaviors and hooks related to the matching controller here. | ||
# All this logic will automatically be available in application.js. | ||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
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,3 @@ | ||
// Place all the styles related to the delivery_teams controller here. | ||
// They will automatically be included in application.css. | ||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
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,47 @@ | ||
class DeliveryTeamsController < ApplicationController | ||
before_action :set_delivery_team, only: [:show, :edit, :update, :destroy] | ||
|
||
respond_to :html | ||
|
||
def index | ||
@delivery_teams = DeliveryTeam.all | ||
respond_with(@delivery_teams) | ||
end | ||
|
||
def show | ||
respond_with(@delivery_team) | ||
end | ||
|
||
def new | ||
@delivery_team = DeliveryTeam.new(parent_id: params[:parent_id]) | ||
respond_with(@delivery_team) | ||
end | ||
|
||
def edit | ||
end | ||
|
||
def create | ||
@delivery_team = DeliveryTeam.new(delivery_team_params) | ||
@delivery_team.save | ||
respond_with(@delivery_team) | ||
end | ||
|
||
def update | ||
@delivery_team.update(delivery_team_params) | ||
respond_with(@delivery_team) | ||
end | ||
|
||
def destroy | ||
@delivery_team.destroy | ||
respond_with(@delivery_team) | ||
end | ||
|
||
private | ||
def set_delivery_team | ||
@delivery_team = DeliveryTeam.find(params[:id]) | ||
end | ||
|
||
def delivery_team_params | ||
params.require(:delivery_team).permit(:title, :ancestry, :description, :parent_id) | ||
end | ||
end |
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,2 @@ | ||
module DeliveryTeamsHelper | ||
end |
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,3 @@ | ||
class DeliveryTeam < ActiveRecord::Base | ||
has_ancestry | ||
end |
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,11 @@ | ||
= simple_form_for(@delivery_team) do |f| | ||
= f.error_notification | ||
|
||
.form-inputs | ||
= f.input :title | ||
/ = f.input :ancestry | ||
= f.hidden_field :parent_id | ||
= f.input :description | ||
|
||
.form-actions | ||
= f.button :submit, class: 'btn btn-primary' |
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,7 @@ | ||
%h1 Editing delivery_team | ||
|
||
= render 'form' | ||
|
||
= link_to 'Show', @delivery_team | ||
\| | ||
= link_to 'Back', delivery_teams_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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
:css | ||
a.sub_delivery_team { text-transform: lowercase !important} | ||
.container-fluid | ||
.row | ||
.col-md-12 | ||
%h1 Oversigt over udvalg | ||
|
||
.row | ||
.col-md-12 | ||
%table.table.table-striped | ||
%tr | ||
%th Navn | ||
%th Hører under | ||
%th.hidden-xs Beskrivelse | ||
%th | ||
|
||
- @delivery_teams.each do |delivery_team| | ||
%tr | ||
%td= link_to delivery_team.title, delivery_team | ||
%td= link_to delivery_team.parent.title, delivery_team.parent rescue '' | ||
%td.hidden-xs= delivery_team.description | ||
%td= link_to 'Nyt underudvalg', new_delivery_team_path(parent_id: delivery_team ), class: 'sub_delivery_team btn btn-primary' | ||
%td | ||
= link_to(delivery_team, :method => :delete, class: ' btn btn-danger btn-small', :data => { :confirm => 'Er du sikker?' }) do | ||
%span.glyphicon.glyphicon-trash{:"aria-hidden"=>"true"} | ||
%br | ||
= link_to 'Nyt hoved udvalg', new_delivery_team_path, class: 'btn btn-success' |
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,4 @@ | ||
json.array!(@delivery_teams) do |delivery_team| | ||
json.extract! delivery_team, :id, :title, :ancestry, :description | ||
json.url delivery_team_url(delivery_team, format: :json) | ||
end |
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 @@ | ||
%h1 New delivery_team | ||
|
||
= render 'form' | ||
|
||
= link_to 'Oversigt', delivery_teams_path, class: 'btn btn-default' |
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,14 @@ | ||
%p#notice= notice | ||
|
||
%p | ||
%b Navn: | ||
= @delivery_team.title | ||
%p | ||
%b Hører under: | ||
= @delivery_team.parent.title rescue '' | ||
%p | ||
%b Beskrivelse: | ||
= @delivery_team.description | ||
|
||
= link_to 'Ret', edit_delivery_team_path(@delivery_team), class: 'btn btn-primary' | ||
= link_to 'Back', delivery_teams_path, class: 'btn btn-default' |
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 @@ | ||
json.extract! @delivery_team, :id, :title, :ancestry, :description, :created_at, :updated_at |
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
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.