add options when importing new site + fix page toolbar style + fix minor stuff
This commit is contained in:
parent
9c77180a63
commit
9b175c3cda
@ -23,7 +23,10 @@ module Admin
|
|||||||
|
|
||||||
def create
|
def create
|
||||||
begin
|
begin
|
||||||
job = Locomotive::Import::Job.new(params[:zipfile], current_site)
|
job = Locomotive::Import::Job.new(params[:zipfile], current_site, {
|
||||||
|
:samples => Boolean.set(params[:samples]),
|
||||||
|
:reset => Boolean.set(params[:reset])
|
||||||
|
})
|
||||||
|
|
||||||
Delayed::Job.enqueue job, { :site => current_site, :job_type => 'import' }
|
Delayed::Job.enqueue job, { :site => current_site, :job_type => 'import' }
|
||||||
|
|
||||||
|
@ -18,12 +18,12 @@
|
|||||||
%p.inline-errors= @error
|
%p.inline-errors= @error
|
||||||
%p.inline-hints= t('formtastic.hints.import.source')
|
%p.inline-hints= t('formtastic.hints.import.source')
|
||||||
|
|
||||||
%li.input
|
%li.input.toggle
|
||||||
= label_tag 'samples', t('formtastic.labels.import.new.samples')
|
= label_tag 'samples', t('formtastic.labels.import.new.samples')
|
||||||
= check_box_tag 'samples'
|
= check_box_tag 'samples'
|
||||||
%p.inline-hints= t('formtastic.hints.import.samples')
|
%p.inline-hints= t('formtastic.hints.import.samples')
|
||||||
|
|
||||||
%li.input
|
%li.input.toggle
|
||||||
= label_tag 'reset', t('formtastic.labels.import.new.reset')
|
= label_tag 'reset', t('formtastic.labels.import.new.reset')
|
||||||
= check_box_tag 'reset'
|
= check_box_tag 'reset'
|
||||||
%p.inline-hints= t('formtastic.hints.import.reset')
|
%p.inline-hints= t('formtastic.hints.import.reset')
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
- title t('.title')
|
|
||||||
|
|
||||||
- content_for :submenu do
|
|
||||||
= render 'admin/shared/menu/settings'
|
|
||||||
|
|
||||||
- content_for :buttons do
|
|
||||||
= admin_button_tag :new, new_admin_snippet_url, :class => 'new'
|
|
||||||
|
|
||||||
%p!= t('.help')
|
|
||||||
|
|
||||||
- if @snippets.empty?
|
|
||||||
%p.no-items!= t('.no_items', :url => new_admin_snippet_url)
|
|
||||||
- else
|
|
||||||
%ul#snippets-list.list
|
|
||||||
= render @snippets
|
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
%h3!= t('.snippets')
|
%h3!= t('.snippets')
|
||||||
- if @snippets.empty?
|
- if @snippets.empty?
|
||||||
%p.no-items!= t('.no_items', :url => new_admin_snippet_url)
|
%p.no-items!= t('admin.snippets.index.no_items', :url => new_admin_snippet_url)
|
||||||
- else
|
- else
|
||||||
%ul.list.theme-assets
|
%ul.list.theme-assets
|
||||||
= render @snippets
|
= render @snippets
|
||||||
|
@ -325,6 +325,8 @@ en:
|
|||||||
import:
|
import:
|
||||||
new:
|
new:
|
||||||
source: File
|
source: File
|
||||||
|
samples: Copy samples
|
||||||
|
reset: Reset site
|
||||||
|
|
||||||
hints:
|
hints:
|
||||||
page:
|
page:
|
||||||
@ -347,4 +349,6 @@ en:
|
|||||||
hint: "Text displayed in the model form just below the field"
|
hint: "Text displayed in the model form just below the field"
|
||||||
import:
|
import:
|
||||||
source: "A zipfile containing a database.yml along with assets and templates"
|
source: "A zipfile containing a database.yml along with assets and templates"
|
||||||
|
samples: "If enabled, the import process will also copy contents and assets"
|
||||||
|
reset: "If enabled, all the data of your site will be destroyed before importing the new site"
|
||||||
|
|
||||||
|
@ -297,6 +297,8 @@ fr:
|
|||||||
import:
|
import:
|
||||||
new:
|
new:
|
||||||
source: Fichier
|
source: Fichier
|
||||||
|
samples: Copier contenu
|
||||||
|
reset: Remettre à zéro
|
||||||
|
|
||||||
hints:
|
hints:
|
||||||
page:
|
page:
|
||||||
@ -319,3 +321,5 @@ fr:
|
|||||||
hint: "Texte affiché dans le formulaire de l'élément juste en dessous du champ."
|
hint: "Texte affiché dans le formulaire de l'élément juste en dessous du champ."
|
||||||
import:
|
import:
|
||||||
source: "Un fichier zip contenant database.yml, les fichiers du thème et les templates de page"
|
source: "Un fichier zip contenant database.yml, les fichiers du thème et les templates de page"
|
||||||
|
samples: "Si activé, les contenus et les média seront aussi copiés lors de l'import"
|
||||||
|
reset: "Si activé, toutes les données de votre site seront détruites avant l'import du nouveau site"
|
||||||
|
6
doc/TODO
6
doc/TODO
@ -5,10 +5,6 @@ BOARD:
|
|||||||
- editable elements should wrap a tag: div, h1, ...etc (default span)
|
- editable elements should wrap a tag: div, h1, ...etc (default span)
|
||||||
- edit images (upload new ones, ...etc) => wait for aloha or send them an email ?
|
- edit images (upload new ones, ...etc) => wait for aloha or send them an email ?
|
||||||
|
|
||||||
- import tools
|
|
||||||
- give choice to reset site / add samples
|
|
||||||
- french translatations
|
|
||||||
|
|
||||||
- refactor slugify method (use parameterize + create a module)
|
- refactor slugify method (use parameterize + create a module)
|
||||||
- [content types] the "display column" selector should not include file types
|
- [content types] the "display column" selector should not include file types
|
||||||
|
|
||||||
@ -143,6 +139,8 @@ x import tool:
|
|||||||
x asset collections
|
x asset collections
|
||||||
x page templatized (tied to content type)
|
x page templatized (tied to content type)
|
||||||
x remove existing pages / contents option => reset
|
x remove existing pages / contents option => reset
|
||||||
|
x give choice to reset site / add samples
|
||||||
|
x french translatations
|
||||||
x cosmetic / ui bugs / bugs:
|
x cosmetic / ui bugs / bugs:
|
||||||
x segmentation fault with with_scope
|
x segmentation fault with with_scope
|
||||||
x paginate is not working
|
x paginate is not working
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
background: transparent url('/images/admin/inline_editor/bg.png') repeat-x 0 0;
|
background: transparent url('/images/admin/inline_editor/bg.png') repeat-x 0 0;
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
font-family: Helvetica;
|
font-family: Helvetica;
|
||||||
-webkit-box-shadow: -3px 3px 12px #818181;
|
-webkit-box-shadow: -3px 3px 12px rgba(0, 0, 0, 0.4);
|
||||||
|
-moz-box-shadow: -3px 3px 12px rgba(0, 0, 0, 0.4);
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -23,13 +24,17 @@
|
|||||||
#page-toolbar ul li.link a {
|
#page-toolbar ul li.link a {
|
||||||
display: block;
|
display: block;
|
||||||
background: transparent url('/images/admin/inline_editor/action-left.png') no-repeat 0 0;
|
background: transparent url('/images/admin/inline_editor/action-left.png') no-repeat 0 0;
|
||||||
height: 21px;
|
height: 19px;
|
||||||
|
line-height: 19px;
|
||||||
padding-left: 24px;
|
padding-left: 24px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
outline: none;
|
outline: none;
|
||||||
|
border: 0px;
|
||||||
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#page-toolbar ul li.link a:active { border: 0px; text-decoration: none; color: #fff; top: 0px; }
|
||||||
#page-toolbar ul li.link a:hover span { text-decoration: underline; }
|
#page-toolbar ul li.link a:hover span { text-decoration: underline; }
|
||||||
|
|
||||||
#page-toolbar ul li.save a { background-position: 0 -21px; }
|
#page-toolbar ul li.save a { background-position: 0 -21px; }
|
||||||
@ -42,7 +47,7 @@
|
|||||||
#page-toolbar ul li.link a span {
|
#page-toolbar ul li.link a span {
|
||||||
display: block;
|
display: block;
|
||||||
background: transparent url('/images/admin/inline_editor/action-right.png') no-repeat right 0;
|
background: transparent url('/images/admin/inline_editor/action-right.png') no-repeat right 0;
|
||||||
height: 20px;
|
height: 19px;
|
||||||
padding: 1px 10px 0 2px;
|
padding: 1px 10px 0 2px;
|
||||||
text-shadow: 1px 1px 1px #000;
|
text-shadow: 1px 1px 1px #000;
|
||||||
}
|
}
|
||||||
@ -60,12 +65,17 @@
|
|||||||
height: 10px;
|
height: 10px;
|
||||||
background: transparent url('/images/admin/inline_editor/drawer.png') no-repeat 0 0;
|
background: transparent url('/images/admin/inline_editor/drawer.png') no-repeat 0 0;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
border: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#page-toolbar ul li.drawer a.off {
|
#page-toolbar ul li.drawer a.off {
|
||||||
background-position: 0 -10px;
|
background-position: 0 -10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#page-toolbar ul li.drawer a:active { border: 0px; text-decoration: none; top: 6px; padding: 0px; }
|
||||||
|
|
||||||
#page-toolbar ul li.spinner a {
|
#page-toolbar ul li.spinner a {
|
||||||
padding-left: 24px;
|
padding-left: 24px;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -87,4 +97,9 @@
|
|||||||
border-left: 1px solid #56575e;
|
border-left: 1px solid #56575e;
|
||||||
}
|
}
|
||||||
|
|
||||||
#page-toolbar ul li.clear { clear: both; }
|
#page-toolbar ul li.clear { clear: both; }
|
||||||
|
|
||||||
|
/* ___ aloha ___ */
|
||||||
|
|
||||||
|
.x-tab-panel a.x-tab-right { border-bottom: 0px; padding-bottom: 0px; }
|
||||||
|
.x-tab-panel input[type=text] { border: 1px solid gray; border-spacing: 2px; -webkit-border-radius: 0px; -webkit-box-shadow: none; background: #fff; color: #000; padding: 2px; }
|
Loading…
Reference in New Issue
Block a user