Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/webhook/webhook-cms
Browse files Browse the repository at this point in the history
  • Loading branch information
gpbmike committed Mar 21, 2014
2 parents d0bb545 + 4f78ea3 commit 150b365
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 65 deletions.
4 changes: 4 additions & 0 deletions app/controllers/wh/content/type/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export default Ember.ObjectController.extend({
if(this.get('previewUrl') === null) {
this.set('previewUrl', this.get('type.controls').findBy('name', 'preview_url').get('value'));
}

if(!this.get('previewUrl')) {
return null;
}
return '/_wh_previews/' + this.get('type.name') + '/' + this.get('previewUrl') + '/';
}.property('previewUrl'),

Expand Down
15 changes: 4 additions & 11 deletions app/templates/wh/content/type/edit.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<section class="wh-content-edit">
<!-- <button class="btn btn&#45;neutral icon icon&#45;eye&#45;open float&#45;right"> Preview</button> -->
{{#if fullPreviewUrl }}
<a target="_blank" {{ bind-attr href="fullPreviewUrl" }} class="btn btn-neutral icon icon-eye-open float-right"> Preview</a>
{{/if}}
<h1>{{#if itemModel}}Edit{{else}}New{{/if}} {{type.name}}</h1>
<p class="wh-item-publish-time">
{{#if createDate}}Created on <span>{{format-time createDate format="MMM Do, YYYY."}}</span>{{/if}}
Expand All @@ -26,10 +28,7 @@

{{#if isDraft}}

<div class="wy-btn-group">
{{#if fullPreviewUrl }}
<a target="_blank" {{ bind-attr href="fullPreviewUrl" }} class="btn btn-small btn-link icon icon-eye-open"> See Preview</a>
{{/if}}
<div class="wy-btn-group">
<div class="wy-dropdown wy-dropdown-bubble wy-dropdown-up">
<button type="button" class="btn btn-small btn-info icon icon-ok-sign"> Save... <span class="icon icon-caret-up"></span></button>
<dl class="wy-dropdown-menu">
Expand All @@ -52,9 +51,6 @@

<div class="wy-control-group">
<div class="wy-control">
{{#if fullPreviewUrl }}
<a target="_blank" {{ bind-attr href="fullPreviewUrl" }} class="btn btn-small btn-link icon icon-eye-open"> See Preview</a>
{{/if}}
<button type="button" class="btn btn-small btn-link icon icon-clock" {{action "setPublishNow"}}> Set to now?</button>
{{input type="datetime-local" value=publishDate}}
</div>
Expand All @@ -67,9 +63,6 @@
<span class="wh-save-info">Went live on {{format-time publishDate format="MM/DD/YYYY [at] hh:mmA"}}. </span>

<div class="wy-btn-group">
{{#if fullPreviewUrl }}
<a target="_blank" {{ bind-attr href="fullPreviewUrl" }} class="btn btn-small btn-link icon icon-eye-open"> See Preview</a>
{{/if}}
<button type="button" class="btn btn-small btn-link icon icon-minus-sign" {{action "saveDraft"}}> Revert to draft</button>
<button type="button" class="btn btn-small btn-link icon icon-calendar" {{action "changePublishDate"}}> Change publish date?</button>
<button type="submit" class="btn btn-small btn-success icon icon-ok-sign"> Save</button>
Expand Down
3 changes: 1 addition & 2 deletions app/templates/wh/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@

<ul>
<li>Search. Couple weeks away.</li>
<li>Future publishing and previews (right now everything goes live immediately).</li>
<li>Concurrent builds (waiting on a firebase bug).</li>
<li>Billing.</li>
<li>Data downloads.</li>
<li>7 day backup history</li>
<li>Useful themes.</li>
<li>Multiple user editing a single CMS object (maybe).</li>
</ul>
Expand Down
57 changes: 5 additions & 52 deletions app/templates/wh/settings/data.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,64 +3,17 @@
<div class="wy-alert wy-alert-warning">
<div class="wy-alert-title">Hey alpha testers!</div>
<p>
This page is bogardus. You'll be able to download an immediate
copy of your site's data in JSON format, which is easy, and then we'll also auto back it up for
the last seven, which is harder.
This page is super basic right now. You can download your site's data
as a JSON file, but we plan to add automatic historical backups as
well. This is alpha software, so if you're working on something
important, it might be a good idea to download a backup every
once in awhile
</p>
</div>

<p>
We keep a nightly data backup in JSON of your site from the past seven days.
You can also download the latest copy of your templates and static files and
your latest generated build in .zip file form.
</p>

<div class="wy-btn-group">
<button class="btn btn-neutral icon icon-download" {{action "download"}}> JSON data</button>
<button class="btn btn-neutral icon icon-download"> Templates and files</button>
<button class="btn btn-neutral icon icon-download"> Latest site build</button>
</div>

<hr>

<h1>Build History</h1>
<p>
Each time your save content we trigger a build to build the site. Below are the last
actions that triggered site builds.
</p>
<table class="wy-table wy-table-bordered-rows full-width">
<thead>
<tr>
<th>Action</th>
<th>Date</th>
<th>Time</th>
</tr>
</thead>
<tbody>
<tr>
<td>Saved Article: <a href="">Some article</a></td>
<td>01/27/2014</td>
<td>3:30pm</td>
</tr>
<tr>
<td>Saved Article: <a href="">Some article</a></td>
<td>01/27/2014</td>
<td>3:30pm</td>
</tr>
<tr>
<td>Saved Article: <a href="">Some article</a></td>
<td>01/27/2014</td>
<td>3:30pm</td>
</tr>
<tr>
<td>Saved Article: <a href="">Some article</a></td>
<td>01/27/2014</td>
<td>3:30pm</td>
</tr>
<tr>
<td>Saved Article: <a href="">Some article</a></td>
<td>01/27/2014</td>
<td>3:30pm</td>
</tr>
</thead>
</table>

0 comments on commit 150b365

Please sign in to comment.