javascript:
$(function() { applicationCrudifier = new Frontline.ApplicationCRUD('#{route(:application)}'); $('#dbType').typeahead({local: ["MySQL","PostgreSQL","SQLite"]}); });
-
content_for :existing_applications do
-
applications.each do |(name,path,url)| .well.well-small
- onclick = "applicationCrudifier.removeFromList('%s');" % name a.frontline-tooltip href="#" onclick=onclick data-toggle="tooltip" title="Remove from list" i.icon-minus | b a href=route(:application, name: name) = name br small.muted = path
-
-
content_for :new_applications do .text-center
input.input-block-level#applicationName type="text" placeholder="name" input.input-block-level#applicationPath type="text" placeholder="path" - attrs = {type: :button} - attrs[:onclick] = "applicationCrudifier.generate();" - attrs[:value] = "Generate a Brand New Application" input.btn.btn-success.btn-large.btn-block *attrs - attrs = {type: :button} - attrs[:onclick] = "applicationCrudifier.load();" - attrs[:value] = "Load Application from given path" input.btn.btn-info.btn-large.btn-block *attrs hr div style="text-align: left;" div .lead Optional Setups .form-horizontal .control-group label.control-label Preview URL .controls input.input-block-level#previewURL type="text" value="http://localhost:5252" form.form-horizontal#applicationSettingsForm .control-group label.control-label Server .controls select.frontline-selectable.input-block-level name="server" data-placeholder="Thin" option - Enginery::KNOWN_WEB_SERVERS.each do |s| option value=s =s .control-group label.control-label Port .controls input.input-small type="text" name="port" placeholder="5252" .control-group label.control-label Engine .controls select.frontline-selectable.input-block-level name="engine" data-placeholder="ERB" option - EConstants::VIEW__ENGINE_BY_SYM.each_key do |e| option value=e =e .control-group label.control-label ORM .controls select.frontline-selectable.input-block-level name="orm" data-placeholder="none" option - %w[ActiveRecord DataMapper Sequel].each do |orm| option value=orm = orm .control-group label.control-label Database .controls .btn-group.dropup button.btn.dropdown-toggle data-toggle="dropdown" | none span.caret ul.dropdown-menu.sticky-dropdown li input#dbType name="db_type" type="text" placeholder="type" - %w[host port name user pass].each do |s| li input name=("db_" + s) type="text" placeholder=s .control-group label.control-label Format .controls input.input-block-level type="text" name="format" placeholder="none" br small.muted a href="http://espresso.github.io/Routing.html#format" target="_blank" | espresso.github.io/Routing.html#format .control-group label.control-label Host(s) .controls input.input-block-level type="text" name="host" placeholder="space separated list of hosts" br small.muted a href="http://espresso.github.io/Routing.html#hosts" target="_blank" | espresso.github.io/Routing.html#hosts
-
if applications.any?
.row-fluid
.span3 .span6 h4 Applications - yield_content :existing_applications .span3
.row-fluid
.span4 .span4 h4 Generate/Load Applications - yield_content :new_applications .span4