forked from SpinaCMS/Spina
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6b94d6d
commit a372c5c
Showing
16 changed files
with
138 additions
and
47 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
module Spina | ||
module Admin | ||
class MediaFoldersController < AdminController | ||
|
||
def new | ||
@media_folder = MediaFolder.new | ||
end | ||
|
||
def create | ||
@media_folder = MediaFolder.new(media_folder_params) | ||
@media_folder.save | ||
redirect_to spina.admin_photos_path | ||
end | ||
|
||
def destroy | ||
@media_folder = MediaFolder.find(params[:id]) | ||
@media_folder.destroy | ||
redirect_to spina.admin_photos_path | ||
end | ||
|
||
private | ||
|
||
def media_folder_params | ||
params.require(:media_folder).permit(:name) | ||
end | ||
end | ||
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,14 @@ | ||
.modal | ||
%header | ||
= link_to '#', data: {dismiss: "modal"} do | ||
= icon('cross') | ||
%h3=t 'spina.photos.new_folder' | ||
|
||
= form_for [spina, :admin, @media_folder] do |f| | ||
%section | ||
= f.text_field :name, placeholder: Spina::MediaFolder.human_attribute_name(:name) | ||
%footer | ||
= link_to t('spina.cancel'), '#', data: {dismiss: 'modal'} | ||
= button_tag type: :submit, class: 'primary' do | ||
%i.icon.icon-plus{style: 'margin-right: 4px'} | ||
=t 'spina.photos.new_folder' |
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 @@ | ||
$("<%=j render 'form' %>").modal() |
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 +1 @@ | ||
Rails.application.config.assets.precompile += %w(spina/spina.png spina/admin/spina.png spina/spina_small.png) | ||
Rails.application.config.assets.precompile += %w(spina/spina.png spina/admin/spina.png spina/spina_small.png spina/media_folder_placeholder.png) |
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
Large diffs are not rendered by default.
Oops, something went wrong.