smithycms 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/images/smithy/logo-sm.png +0 -0
- data/app/assets/javascripts/smithy/application.js +1 -1
- data/app/assets/stylesheets/smithy/bootstrap_and_overrides.css.scss +1 -1
- data/app/assets/stylesheets/smithy/layout.css.scss +9 -35
- data/app/views/layouts/smithy/application.html.erb +20 -17
- data/app/views/layouts/smithy/guides.html.erb +2 -2
- data/app/views/layouts/smithy/modal.html.erb +1 -1
- data/app/views/layouts/smithy/shared/_nav.html.erb +35 -34
- data/app/views/layouts/smithy/wide.html.erb +20 -17
- data/app/views/smithy/assets/_asset.html.erb +2 -2
- data/app/views/smithy/assets/_upload_form.html.erb +2 -2
- data/app/views/smithy/caches/show.html.erb +2 -2
- data/app/views/smithy/content_blocks/_secondary_nav.html.erb +1 -1
- data/app/views/smithy/content_blocks/index.html.erb +2 -2
- data/app/views/smithy/content_pieces/index.html.erb +1 -1
- data/app/views/smithy/contents/_form_fields.html.erb +1 -1
- data/app/views/smithy/images/_form_fields.html.erb +1 -1
- data/app/views/smithy/page_contents/new.html.erb +1 -1
- data/app/views/smithy/pages/_container.html.erb +4 -4
- data/app/views/smithy/pages/_form.html.erb +6 -6
- data/app/views/smithy/pages/_parent.html.erb +1 -1
- data/app/views/smithy/pages/index.html.erb +2 -2
- data/app/views/smithy/settings/_form.html.erb +1 -1
- data/app/views/smithy/settings/_setting.html.erb +2 -2
- data/app/views/smithy/settings/index.html.erb +2 -2
- data/app/views/smithy/settings/show.html.erb +1 -1
- data/app/views/smithy/templates/_secondary_nav.html.erb +9 -7
- data/app/views/smithy/templates/index.html.erb +2 -2
- data/lib/smithy/liquid/filters/asset_tag.rb +5 -0
- data/lib/smithy/version.rb +1 -1
- metadata +104 -89
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 19b597920083bd8dc8cf02cc0aa10841cdfacb3f
|
|
4
|
+
data.tar.gz: dfae46dd7b135f4c2107a2c2c6a368acb4f2808b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ce549e7f07cf38306f0bb78ae1e8bca7e1bc3e67dd0ba3a973072aecf19db17160adccb7bd3a9ee86faaa131841b40115d6acb944030aadfc477088993eacfbe
|
|
7
|
+
data.tar.gz: 85589c29c6a35a45c92338b760667ebc9c8edacca6ef789eeeed516a5e1868b519d083a64bfcb393d87fb210cf5d1d010329c037150c23160000be6559e1a45e
|
|
Binary file
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//= require 'smithy/jquery-ui.min'
|
|
4
4
|
//= require jquery-fileupload/basic
|
|
5
5
|
//= require jquery-fileupload/vendor/tmpl
|
|
6
|
-
//= require bootstrap
|
|
6
|
+
//= require bootstrap-sprockets
|
|
7
7
|
//= require ace-1.1.3/ace
|
|
8
8
|
//= require ace-1.1.3/mode-css.js
|
|
9
9
|
//= require ace-1.1.3/mode-html.js
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
body { background:#444; padding:0; }
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
text-align:center;
|
|
8
|
-
width:20%;
|
|
9
|
-
img { max-width:100%; }
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
#header {
|
|
13
|
-
background: #333333; /* Old browsers */
|
|
3
|
+
.navbar { margin-bottom:12px; }
|
|
4
|
+
.navbar-brand { padding-bottom:0; padding-top:0; }
|
|
5
|
+
|
|
6
|
+
.navbar-inverse {
|
|
14
7
|
background: -moz-linear-gradient(top, #333333 0%, #222222 100%); /* FF3.6+ */
|
|
15
8
|
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#333333), color-stop(100%,#222222)); /* Chrome,Safari4+ */
|
|
16
9
|
background: -webkit-linear-gradient(top, #333333 0%,#222222 100%); /* Chrome10+,Safari5.1+ */
|
|
@@ -19,31 +12,10 @@ body { background:#444; padding:0; }
|
|
|
19
12
|
background: linear-gradient(to bottom, #333333 0%,#222222 100%); /* W3C */
|
|
20
13
|
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#333333', endColorstr='#222222',GradientType=0 ); /* IE6-9 */
|
|
21
14
|
}
|
|
22
|
-
#main-nav {
|
|
23
|
-
background:transparent;
|
|
24
|
-
left:20%;
|
|
25
|
-
right:0;
|
|
26
|
-
position:absolute;
|
|
27
|
-
top:0;
|
|
28
|
-
z-index:5;
|
|
29
|
-
|
|
30
|
-
.navbar-inner { background:transparent; border:0; padding-left:0;
|
|
31
|
-
box-shadow:none;
|
|
32
|
-
-webkit-box-shadow:none;
|
|
33
|
-
-moz-box-shadow:none;
|
|
34
|
-
}
|
|
35
|
-
.container { padding-top: 6px; }
|
|
36
|
-
}
|
|
37
|
-
@media (max-width: 979px) {
|
|
38
|
-
#main-nav {
|
|
39
|
-
.nav-collapse {
|
|
40
|
-
background-color:#333;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
15
|
|
|
45
16
|
#side {
|
|
46
|
-
|
|
17
|
+
// float:left; width:20%;
|
|
18
|
+
position:relative;
|
|
47
19
|
.actions { padding:16px 15px 0 15px ; }
|
|
48
20
|
.nav-list {
|
|
49
21
|
border-top:1px solid #393939;
|
|
@@ -89,7 +61,9 @@ body { background:#444; padding:0; }
|
|
|
89
61
|
}
|
|
90
62
|
}
|
|
91
63
|
}
|
|
92
|
-
#main {
|
|
64
|
+
#main {
|
|
65
|
+
// float:left; width:80%;
|
|
66
|
+
background:#f9f9f9; margin:-12px 0 0 0; padding:0 0 24px 0; position:relative;
|
|
93
67
|
-webkit-border-radius: 10px 0px 0px 10px;
|
|
94
68
|
border-radius: 10px 0px 0px 10px;
|
|
95
69
|
-webkit-box-shadow: 0px 0px 18px 0px rgba(0, 0, 0, 0.4);
|
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
<%= render :partial => "layouts/smithy/shared/head" %>
|
|
2
2
|
<body>
|
|
3
3
|
<%= render :partial => "layouts/smithy/shared/nav" %>
|
|
4
|
+
<div class="container-fluid">
|
|
5
|
+
<div class="row">
|
|
6
|
+
<nav id="side" class="col-xs-5 col-sm-3 col-md-2">
|
|
7
|
+
<%= yield :secondary_nav %>
|
|
8
|
+
</nav>
|
|
9
|
+
<div id="main" class="col-xs-7 col-sm-9 col-md-10">
|
|
10
|
+
<% if content_for? :title %><h1><%= yield :title %></h1><% end %>
|
|
11
|
+
<%= render :partial => "layouts/smithy/shared/flash", :locals => { flash: flash } %>
|
|
12
|
+
<%= yield :top_content %>
|
|
13
|
+
<div class="container-fluid">
|
|
14
|
+
<section class="row" id="content-container">
|
|
4
15
|
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
</
|
|
8
|
-
<div id="main">
|
|
9
|
-
<% if content_for? :title %><h1><%= yield :title %></h1><% end %>
|
|
10
|
-
<%= render :partial => "layouts/smithy/shared/flash", :locals => { flash: flash } %>
|
|
11
|
-
<%= yield :top_content %>
|
|
12
|
-
<div class="container-fluid">
|
|
13
|
-
<section class="row-fluid" id="content-container">
|
|
16
|
+
<article id="content" class="col-md-9">
|
|
17
|
+
<%= yield %>
|
|
18
|
+
</article>
|
|
14
19
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
<aside id="related" class="col-md-3">
|
|
21
|
+
<%= yield :related %>
|
|
22
|
+
</aside>
|
|
18
23
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
</section>
|
|
24
|
+
</section>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
24
27
|
</div>
|
|
25
28
|
</div>
|
|
26
29
|
<%= render :partial => "layouts/smithy/shared/footer" %>
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<%= render :partial => "layouts/smithy/shared/flash", :locals => { flash: flash } %>
|
|
7
7
|
<%= yield :top_content %>
|
|
8
8
|
<div class="container-fluid">
|
|
9
|
-
<section class="row
|
|
10
|
-
<article id="content" class="
|
|
9
|
+
<section class="row" id="content-container">
|
|
10
|
+
<article id="content" class="col-md-12">
|
|
11
11
|
<%= yield %>
|
|
12
12
|
</article>
|
|
13
13
|
</section>
|
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
<
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
<nav class="navbar navbar-inverse" role="navigation">
|
|
2
|
+
<div class="container-fluid">
|
|
3
|
+
<div class="navbar-header">
|
|
4
|
+
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#smithy-nav-collapse">
|
|
5
|
+
<span class="sr-only">Toggle navigation</span>
|
|
6
|
+
<span class="icon-bar"></span>
|
|
7
|
+
<span class="icon-bar"></span>
|
|
8
|
+
<span class="icon-bar"></span>
|
|
9
|
+
</button>
|
|
10
|
+
<a class="navbar-brand" href="<%= smithy.pages_path %>"><%= image_tag "smithy/logo-sm.png", alt:'' %></a>
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<div class="collapse navbar-collapse" id="smithy-nav-collapse">
|
|
14
|
+
<%- if smithy_current_user -%>
|
|
15
|
+
<ul class="nav navbar-nav">
|
|
16
|
+
<li><%= link_to "<i class=\"fa fa-sitemap\"></i> Manage Content".html_safe, pages_path %></li>
|
|
17
|
+
<li><%= link_to "<i class=\"fa fa-file\"></i> Images & Files".html_safe, assets_path %></li>
|
|
18
|
+
</ul>
|
|
19
|
+
<ul class="nav navbar-nav navbar-right">
|
|
20
|
+
<li><%= link_to "<i class=\"fa fa-arrow-right\"></i> View Site".html_safe, root_path %></li>
|
|
21
|
+
<li class="dropdown">
|
|
22
|
+
<a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="fa fa-cogs"></i> Admin<b class="caret"></b></a>
|
|
23
|
+
<ul class="dropdown-menu">
|
|
24
|
+
<li><%= link_to "<i class=\"fa fa-book\"></i> Templates".html_safe, templates_path %></li>
|
|
25
|
+
<li><%= link_to "<i class=\"fa fa-list-alt\"></i> Content Blocks".html_safe, content_blocks_path %></li>
|
|
26
|
+
<li><%= link_to users_path do %><i class="fa fa-user"></i> Users<% end %></li>
|
|
27
|
+
<li><%= link_to "<i class=\"fa fa-cog\"></i> Settings".html_safe, settings_path %></li>
|
|
28
|
+
<li><%= link_to "<i class=\"fa fa-refresh\"></i> Site Cache".html_safe, cache_path %></li>
|
|
29
|
+
</ul>
|
|
30
|
+
</li>
|
|
31
|
+
<% if respond_to?(:logout_path) %>
|
|
32
|
+
<li><%= link_to "<i class=\"fa fa-signout\"></i> Logout".html_safe, logout_path, :method => :delete %></li>
|
|
32
33
|
<% end %>
|
|
33
|
-
</
|
|
34
|
+
</ul>
|
|
35
|
+
<% end %>
|
|
34
36
|
</div>
|
|
35
37
|
</div>
|
|
36
|
-
</
|
|
37
|
-
|
|
38
|
+
</nav>
|
|
@@ -2,23 +2,26 @@
|
|
|
2
2
|
<body class="wide">
|
|
3
3
|
<%= render :partial => "layouts/smithy/shared/nav" %>
|
|
4
4
|
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
5
|
+
<div class="container-fluid">
|
|
6
|
+
<div class="row">
|
|
7
|
+
<nav id="side" class="col-xs-5 col-sm-3 col-md-2">
|
|
8
|
+
<%= yield :secondary_nav %>
|
|
9
|
+
</nav>
|
|
10
|
+
<div id="main" class="col-xs-7 col-sm-9 col-md-10">
|
|
11
|
+
<% if content_for? :title %><h1><%= yield :title %></h1><% end %>
|
|
12
|
+
<%= render :partial => "layouts/smithy/shared/flash", :locals => { flash: flash } %>
|
|
13
|
+
<%= yield :top_content %>
|
|
14
|
+
<div class="container-fluid">
|
|
15
|
+
<section class="row" id="content-container">
|
|
16
|
+
<article id="content" class="col-md-12">
|
|
17
|
+
<%= yield %>
|
|
18
|
+
<aside id="related">
|
|
19
|
+
<%= yield :related %>
|
|
20
|
+
</aside>
|
|
21
|
+
</article>
|
|
22
|
+
</section>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
22
25
|
</div>
|
|
23
26
|
</div>
|
|
24
27
|
<%= render :partial => "layouts/smithy/shared/tail" %>
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
<% end %>
|
|
10
10
|
<p class="name"><strong><%= asset.name %></strong></p>
|
|
11
11
|
<div class="pull-right">
|
|
12
|
-
<%= link_to "Edit", [:edit, asset], class: "btn btn-
|
|
13
|
-
<%= link_to "Delete", asset, class: "btn btn-
|
|
12
|
+
<%= link_to "Edit", [:edit, asset], class: "btn btn-xs" %>
|
|
13
|
+
<%= link_to "Delete", asset, class: "btn btn-danger btn-xs", method: :delete, data: { confirm: "Are you sure?" } %>
|
|
14
14
|
</div>
|
|
15
15
|
</div>
|
|
16
16
|
</li>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<%= uploader_form Smithy::Asset.new, post: assets_url, as: "asset[uploaded_file_url]" do %>
|
|
2
2
|
<fieldset class="inputs">
|
|
3
3
|
<%= file_field_tag :file, multiple: true %>
|
|
4
|
-
<%= submit_tag "Upload File(s)", class: 'btn' %>
|
|
4
|
+
<%= submit_tag "Upload File(s)", class: 'btn btn-default' %>
|
|
5
5
|
</fieldset>
|
|
6
6
|
<% end %>
|
|
7
7
|
|
|
8
8
|
<script id="template-upload" type="text/x-tmpl">
|
|
9
9
|
<div class="upload">
|
|
10
10
|
{%=o.name%}
|
|
11
|
-
<div class="progress"><div class="bar" style="width: 0%"></div></div>
|
|
11
|
+
<div class="progress"><div class="progress-bar" style="width: 0%"></div></div>
|
|
12
12
|
</div>
|
|
13
13
|
</script>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<% content_for :title, "System Cache" %>
|
|
2
2
|
|
|
3
|
-
<div class="
|
|
3
|
+
<div class="jumbotron">
|
|
4
4
|
<p>If your website is acting weird or your not seeing your updates, you may need to reset everything and clear the cache.</p>
|
|
5
5
|
<p>
|
|
6
|
-
<%= button_to "Clear the Cache", cache_path, :class => 'btn btn-primary btn-
|
|
6
|
+
<%= button_to "Clear the Cache", cache_path, :class => 'btn btn-primary btn-lg', :method => :delete %>
|
|
7
7
|
</p>
|
|
8
8
|
</div>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
</ul>
|
|
6
6
|
|
|
7
7
|
<div class="btn-group actions pull-right">
|
|
8
|
-
<%= link_to [:new, :content_block], :class => 'btn btn-
|
|
8
|
+
<%= link_to [:new, :content_block], :class => 'btn btn-default', :role => 'button' do %>
|
|
9
9
|
<i class="fa fa-plus"></i> Add Content Block
|
|
10
10
|
<% end %>
|
|
11
11
|
</div>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<% content_for :title, "Content Blocks" %>
|
|
2
2
|
|
|
3
|
-
<div class="
|
|
3
|
+
<div class="jumbotron">
|
|
4
4
|
<%- if @content_blocks.empty? -%>
|
|
5
5
|
<p>Be the first to add a Content Block to your site. Content Blocks are the small pieces of content that fill up a page. You can control the look and feel of content blocks through their individual templates.</p>
|
|
6
6
|
<% else %>
|
|
7
7
|
<p>Add a content block or select one from your left to edit.</p>
|
|
8
8
|
<% end %>
|
|
9
9
|
<p>
|
|
10
|
-
<%= link_to "Add Content Block", new_content_block_path, :class => 'btn btn-primary btn-
|
|
10
|
+
<%= link_to "Add Content Block", new_content_block_path, :class => 'btn btn-primary btn-lg' %>
|
|
11
11
|
</p>
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<%- @records.each do |record| %>
|
|
11
11
|
<tr>
|
|
12
12
|
<td>
|
|
13
|
-
<%= link_to "Edit", [:edit, record], :class => "btn btn-
|
|
13
|
+
<%= link_to "Edit", [:edit, record], :class => "btn btn-default btn-xs" %>
|
|
14
14
|
</td>
|
|
15
15
|
<%- readable_attributes.map(&:to_sym).each do |attribute| %>
|
|
16
16
|
<td><%= record[attribute] %></td>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%= f.inputs do %>
|
|
2
|
-
<%= f.input :content, :as => :text, :input_html => { :class => "
|
|
2
|
+
<%= f.input :content, :as => :text, :input_html => { :class => "col-md-12", :id => "template_content-#{f.object.id || 'new'}" }, :hint => "Use markdown syntax for formatting. You can also use HTML directly. <a href=\"#{guide_path('markdown')}\" data-toggle=\"remote-load\" data-target=\"#content-guide\">See our markdown syntax reference</a>".html_safe %>
|
|
3
3
|
<div id="template_content_editor-<%= f.object.id || 'new' %>" class="template_content_editor"></div>
|
|
4
4
|
<div id="content-guide"></div>
|
|
5
5
|
<% end %>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<%= f.input :link_url %>
|
|
7
7
|
<% end %>
|
|
8
8
|
<%= f.inputs "Content (optional)" do %>
|
|
9
|
-
<%= f.input :content, :as => :text, :input_html => { :class => "
|
|
9
|
+
<%= f.input :content, :as => :text, :input_html => { :class => "col-md-12", :id => "image_content-#{f.object.id || 'new'}" }, :hint => "Use markdown syntax for formatting. You can also use HTML directly. <a href=\"#{guide_path('markdown')}\" data-toggle=\"remote-load\" data-target=\"#content-guide\">See our markdown syntax reference</a>".html_safe %>
|
|
10
10
|
<div id="image_content_editor-<%= f.object.id || 'new' %>" class="ace_editor"></div>
|
|
11
11
|
<div id="content-guide"></div>
|
|
12
12
|
<% end %>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<tbody>
|
|
19
19
|
<% @content_blocks.each do |content_block| %>
|
|
20
20
|
<tr>
|
|
21
|
-
<td style="white-space:nowrap"><button class="btn btn-
|
|
21
|
+
<td style="white-space:nowrap"><button class="btn btn-default btn-sm page_content_block" type="button" data-content_block="<%= content_block.name %>"><%= content_block.name.titleize %></button></td>
|
|
22
22
|
<td><%= content_block.description %></td>
|
|
23
23
|
</tr>
|
|
24
24
|
<% end %>
|
|
@@ -5,20 +5,20 @@
|
|
|
5
5
|
<%= content_tag_for :tr, page_content do %>
|
|
6
6
|
<td>
|
|
7
7
|
<i class="fa fa-reorder handle"></i>
|
|
8
|
-
<%= link_to "edit", edit_page_content_path(@page.id, page_content), class: "btn btn-
|
|
8
|
+
<%= link_to "edit", edit_page_content_path(@page.id, page_content), class: "btn btn-primary btn-sm" %>
|
|
9
9
|
</td>
|
|
10
10
|
<td><strong><%= page_content.label %></strong></td>
|
|
11
11
|
<td><%= page_content.content_block_type.demodulize %></td>
|
|
12
12
|
<td><%= page_content.updated_at.strftime('%b %e, %Y %H:%M:%S') %></td>
|
|
13
13
|
<td>
|
|
14
14
|
<div class="pull-right">
|
|
15
|
-
<%= link_to "preview", preview_page_content_path(@page.id, page_content), class: "btn btn-
|
|
16
|
-
<%= link_to "<i class=\"fa fa-trash\"></i> delete".html_safe, page_content_path(@page.id, page_content), method: :delete, data: { confirm: "Do you really want to delete this content?" }, class: "btn btn-
|
|
15
|
+
<%= link_to "preview", preview_page_content_path(@page.id, page_content), class: "btn btn-default btn-sm", data: { previewtoggle: "modal" } %>
|
|
16
|
+
<%= link_to "<i class=\"fa fa-trash\"></i> delete".html_safe, page_content_path(@page.id, page_content), method: :delete, data: { confirm: "Do you really want to delete this content?" }, class: "btn btn-danger btn-sm" %>
|
|
17
17
|
</div>
|
|
18
18
|
</td>
|
|
19
19
|
<% end %>
|
|
20
20
|
<% end %>
|
|
21
21
|
</table>
|
|
22
|
-
<div><%= link_to "Add to #{container.display_name}", new_page_content_path(@page.id, page_content: { container: container.name }), class: "btn btn-primary btn-
|
|
22
|
+
<div><%= link_to "Add to #{container.display_name}", new_page_content_path(@page.id, page_content: { container: container.name }), class: "btn btn-primary btn-sm" %></div>
|
|
23
23
|
<% end %>
|
|
24
24
|
</div>
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
<% end %>
|
|
14
14
|
<% end %>
|
|
15
15
|
|
|
16
|
-
<%= semantic_form_for @page, :url => ( @page.persisted? ? page_path(@page.id) : pages_path )
|
|
16
|
+
<%= semantic_form_for @page, :url => ( @page.persisted? ? page_path(@page.id) : pages_path ) do |f| %>
|
|
17
17
|
<%= f.inputs "Page Information" do %>
|
|
18
18
|
<%= f.input :title %>
|
|
19
19
|
<%= f.input :permalink, :hint => "This will be auto-created if blank. Only fill it in if you know what you're doing" %>
|
|
20
20
|
<%= f.input :parent, :include_blank => false, :collection => tree_for_select unless !@page.parent_id? %>
|
|
21
21
|
<%= f.input :show_in_navigation, :label => "Show page in site navigation" %>
|
|
22
|
-
<%= f.input :template, :collection => Smithy::Template.templates, :include_blank => false %>
|
|
22
|
+
<%= f.input :template, :as => :select, :collection => Smithy::Template.templates, :include_blank => false %>
|
|
23
23
|
<%= render :partial => "smithy/pages/page_fields", :locals => { :f => f } if File.exists?(Rails.root.join('app', 'views', 'smithy', 'pages', '_page_fields.html.erb')) %>
|
|
24
24
|
<% end %>
|
|
25
25
|
<% if @page.persisted? && @page.external_link.blank? %>
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
|
|
50
50
|
<%= f.actions do %>
|
|
51
51
|
<% if @page.published? %>
|
|
52
|
-
<%= f.action :submit, :label => "Save and Publish", :button_html => { :
|
|
53
|
-
<%= f.action :submit, :label => "Save as Draft", :button_html => { :
|
|
52
|
+
<%= f.action :submit, :label => "Save and Publish", :button_html => { name: "publish", class: 'btn btn-primary' } %>
|
|
53
|
+
<%= f.action :submit, :label => "Save as Draft and Unpublish", :button_html => { name: "draft", class: 'btn btn-default' } %>
|
|
54
54
|
<% else %>
|
|
55
|
-
<%= f.action :submit, :label => "Save as Draft", :button_html => { :
|
|
56
|
-
<%= f.action :submit, :label => "Save and Publish", :button_html => { :
|
|
55
|
+
<%= f.action :submit, :label => "Save as Draft", :button_html => { name: "draft", class: 'btn btn-primary' } %>
|
|
56
|
+
<%= f.action :submit, :label => "Save and Publish", :button_html => { name: "publish", class: 'btn btn-default' } %>
|
|
57
57
|
<% end %>
|
|
58
58
|
<% end %>
|
|
59
59
|
<% end %>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<li class="back"><%= link_to "<span class=\"btn btn-
|
|
1
|
+
<li class="back"><%= link_to "<span class=\"btn btn-default btn-xs\"><i class=\"fa fa-caret-left\"></i> Back to #{@parent.title}</span>".html_safe, edit_page_path(@parent.id) %></li>
|
|
2
2
|
<%- if !@page.persisted? || @page.leaf? -%>
|
|
3
3
|
<%= render @parent.children %>
|
|
4
4
|
<% elsif @page.persisted? %>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<% content_for :title, "Site Content" %>
|
|
2
2
|
|
|
3
|
-
<div class="
|
|
3
|
+
<div class="jumbotron">
|
|
4
4
|
<%- if @root.blank? -%>
|
|
5
5
|
<p>Be the first to add a Page to your site. Pages are the building blocks for your site. A page's look and feel is defined by the templates that you choose for it.</p>
|
|
6
6
|
<% else %>
|
|
7
7
|
<p>Add a page or select one from your left to edit.</p>
|
|
8
8
|
<% end %>
|
|
9
9
|
<p>
|
|
10
|
-
<%= link_to "Add Page", new_page_path, :class => 'btn btn-primary btn-
|
|
10
|
+
<%= link_to "Add Page", new_page_path, :class => 'btn btn-primary btn-lg' %>
|
|
11
11
|
</p>
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%= semantic_form_for @setting do |f| %>
|
|
2
2
|
<%= f.inputs do %>
|
|
3
3
|
<%= f.input :name %>
|
|
4
|
-
<%= f.input :value, :input_html => { :rows => 2, :class => '
|
|
4
|
+
<%= f.input :value, :input_html => { :rows => 2, :class => 'col-md-6' } %>
|
|
5
5
|
<% end %>
|
|
6
6
|
<%= f.actions :submit %>
|
|
7
7
|
<% end %>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<dt><%= setting.name %></dt>
|
|
2
2
|
<dd>
|
|
3
3
|
<%= setting.value %>
|
|
4
|
-
<%= link_to "edit", [:edit, setting], :class => 'btn btn-
|
|
5
|
-
<%= link_to "delete", setting, class: 'btn btn-
|
|
4
|
+
<%= link_to "edit", [:edit, setting], :class => 'btn btn-default btn-xs' %>
|
|
5
|
+
<%= link_to "delete", setting, class: 'btn btn-danger btn-xs', data: { confirm: "Are you sure?" }, method: :delete %>
|
|
6
6
|
</dd>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<h1>Settings</h1>
|
|
2
|
-
<div class="
|
|
2
|
+
<div class="jumbotron">
|
|
3
3
|
<p>The settings in your application can affect various preferences in your website, from the title of your website to the type of editing experience you want to have.</p>
|
|
4
4
|
<p>
|
|
5
|
-
<%= link_to "Add Settings", new_setting_path, :class => 'btn btn-primary btn-
|
|
5
|
+
<%= link_to "Add Settings", new_setting_path, :class => 'btn btn-primary btn-lg' %>
|
|
6
6
|
</p>
|
|
7
7
|
</div>
|
|
8
8
|
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
<dd><%= @setting.value %></dd>
|
|
8
8
|
</dl>
|
|
9
9
|
|
|
10
|
-
<%= link_to "<i class=\"
|
|
10
|
+
<%= link_to "<i class=\"fa fa-arrow-left\"></i> Return to Settings".html_safe, settings_path, :class => "btn btn-default" %>
|
|
@@ -10,12 +10,14 @@
|
|
|
10
10
|
<%= render @stylesheets %>
|
|
11
11
|
</ul>
|
|
12
12
|
|
|
13
|
-
<div class="
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
<div class="clearfix">
|
|
14
|
+
<div class="btn-group actions pull-right">
|
|
15
|
+
<%= link_to "<i class=\"fa fa-plus\"></i> Add Template <span class=\"caret\"></span>".html_safe, new_template_path, :class => 'dropdown-toggle btn btn-default', 'data-toggle' => 'dropdown', 'data-target' => '#', :role => 'button' %>
|
|
16
|
+
<ul class="dropdown-menu" role="menu">
|
|
17
|
+
<% Smithy::Template.types.each do |tt| %>
|
|
18
|
+
<li><%= link_to tt.capitalize, new_template_path(:template => { :template_type => tt }) %></li>
|
|
19
|
+
<% end %>
|
|
20
|
+
</ul>
|
|
21
|
+
</div>
|
|
20
22
|
</div>
|
|
21
23
|
<% end %>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<% content_for :title, "Templates" %>
|
|
2
2
|
|
|
3
|
-
<div class="
|
|
3
|
+
<div class="jumbotron">
|
|
4
4
|
<%- if @templates.empty? -%>
|
|
5
5
|
<p>Be the first to add a Template to your site. Templates are the basic building blocks for your pages. A page's look and feel is defined in the templates that you create.</p>
|
|
6
6
|
<% else %>
|
|
7
7
|
<p>Add a template or select one from your left to edit.</p>
|
|
8
8
|
<% end %>
|
|
9
9
|
<p>
|
|
10
|
-
<%= link_to "Add Template", new_template_path, :class => 'btn btn-primary btn-
|
|
10
|
+
<%= link_to "Add Template", new_template_path, :class => 'btn btn-primary btn-lg' %>
|
|
11
11
|
</p>
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -7,6 +7,11 @@ module Smithy
|
|
|
7
7
|
controller.view_context.send(:image_tag, input, image_options)
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
+
def image_path(input, *args)
|
|
11
|
+
image_options = args_to_options(args)
|
|
12
|
+
controller.view_context.send(:image_path, input)
|
|
13
|
+
end
|
|
14
|
+
|
|
10
15
|
protected
|
|
11
16
|
# Convert an array of properties ('key:value') into a hash
|
|
12
17
|
# Ex: ['width:50', 'height:100'] => { :width => '50', :height => '100' }
|
data/lib/smithy/version.rb
CHANGED