-
Notifications
You must be signed in to change notification settings - Fork 16
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
Showing
26 changed files
with
404 additions
and
87 deletions.
There are no files selected for viewing
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,10 +1,9 @@ | ||
<%= link_to_function(_('cancel'), "['crop', 'crop_form'].each(Element.toggle);$('crop_form').innerHTML = '';")%> | ||
<ul class='infos' id='crop_options'> | ||
<ul class='crop_options'> | ||
<li>x: <input type='text' id='posx' name='node[crop][x]' size='4'/> y: <input type='text' id='posy' name='node[crop][y]' size='4'/> // w: <input type='text' id='width' name='node[crop][w]' size='4'/> h: <input type='text' id='height' name='node[crop][h]' size='4'/></li> | ||
<li><b><%= _('convert') + '</b> ' + crop_formats(@node).join(' ') %></li> | ||
<li><b><%= _('max size') %></b> <input type='text' name='node[crop][max_value]' size='4' value='<%= fs = fsize(@node.size); fs.to_f %>'/> | ||
<li><b><%= _('convert') + '</b> ' + crop_formats(node).join(' ') %></li> | ||
<li><b><%= _('max size') %></b> <input type='text' name='node[crop][max_value]' size='4' value='<%= fs = fsize(node.size); fs.to_f %>'/> | ||
<%= ['Kb', 'Mb'].inject('') {|r,e| r + "<input type='radio' name='node[crop][max_unit]' value='#{e}'#{fs =~ /#{e}/ ? " checked='checked'" : ''}/> #{e} " }%> | ||
</li> | ||
</ul> | ||
<p class='edit_info'><%= _('original') %> <%= @node.width %>x<%= @node.height %>, <%= _('original is #X this view').sub('#X', "<b>#{sprintf('%.1f', @node.width.to_f / @node.width(Iformat['edit']))}x</b>")%></p> | ||
<%= img_tag(@node, :mode=>'edit', :id=>'edit_img') %> | ||
<p class='edit_info'><%= _('original') %> <%= node.width %>x<%= node.height %>, <%= _('original is #X this view').sub('#X', "<b>#{sprintf('%.1f', node.width.to_f / node.width(Iformat['edit']))}x</b>")%></p> | ||
<%= img_tag(node, :mode=>'edit', :id=>img_id) %> |
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,4 +1,5 @@ | ||
page.replace_html 'crop_form', :partial=>'documents/crop' | ||
page.replace_html 'crop_form', :partial=>'documents/crop', :locals => {:node => @node, :img_id => 'edit_img'} | ||
page.insert_html :top, 'crop_form', :inline => %Q{<%= link_to_function(_('cancel'), "['crop', 'crop_form'].each(Element.toggle);$('crop_form').innerHTML = '';")%>} | ||
page.toggle 'crop_form', 'crop' | ||
page << "new Zena.Div_editor('edit_img', 'posx', 'posy', 'width', 'height', #{@node.width / @node.width(Iformat['edit']).to_f}, 20, 220);" | ||
page << "new Zena.Div_editor('edit_img', 'posx', 'posy', 'width', 'height', #{@node.width / @node.width(Iformat['edit']).to_f});" | ||
page << "self.resizeTo(520,770);" |
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
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,186 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns='http://www.w3.org/1999/xhtml' lang='#{v.lang}' xml:lang='en' do='load' dictionary='translations'> | ||
<head do='void' name='head'> | ||
<title do='title_for_layout' do='show' attr='title' name='page_title'>page title</title> | ||
<!-- link href='favicon.png' rel='shortcut icon' type='image/png' / --> | ||
<meta http-equiv='Content-type' content='text/html; charset=utf-8' /> | ||
<r:void name='stylesheets'> | ||
<r:stylesheets/> | ||
<r:stylesheets list='admin'/> | ||
<link href='img/admin.css' rel='Stylesheet' type='text/css'/> | ||
</r:void> | ||
|
||
<r:javascripts/> | ||
<r:uses_datebox/> | ||
</head> | ||
<body> | ||
<h1 id='logo' do='link' href='root' mode='admin' do='t'>admin_interface</h1> | ||
<div id='container'> | ||
<div id='navigation'> | ||
<ul id='menu' do='admin_links'> | ||
<li do='each' do='show'>x</li> | ||
</ul> | ||
</div> | ||
|
||
<div id='content'> | ||
<h1 id='title'><r:title/> <span class='klass'>(<r:klass/>)</span></h1> | ||
<div id='preview'> | ||
<h2 class='preview' do='link' do='t'>view_live</h2> | ||
<r:Image?> | ||
<table class='med_prev'><tr><td do='link' update='crop' crop='true'> | ||
<r:img mode='med'/> | ||
<span class='crop'> | ||
<img src='/images/cut_red.png' title='#{t("crop")}'/> | ||
</span> | ||
</td></tr></table> | ||
<r:else do='zazen' attr='text' live='true' code='#{content_lang}'/> | ||
</r:Image?> | ||
</div> | ||
|
||
<div id='form' do='form'> | ||
<r:if test='can_edit?'> | ||
<label do='t("edit #{klass}")'/> | ||
<r:Image?> | ||
<div id='crop' do='block' do='if' test='params[:crop]'> | ||
<p do='else'> | ||
<r:void actions='edit'/> | ||
<r:link update='crop' crop='true'> | ||
<img src='/images/cut_red.png'/> <r:t>crop</r:t> | ||
</r:link> | ||
</p> | ||
<p do='link' id='crop_x' update='crop'><r:t>btn_x</r:t> <r:t>cancel</r:t></p> | ||
<!-- JS trigger must run effect before crop editor --> | ||
<r:js>$$('#crop>div').each(function(o) { new Effect.Appear(o, {duration:0.5}) });</r:js> | ||
<div class='mask' style='display:none;'> </div> | ||
<!--div class='wrap' style='display:none;' onclick='$("crop_x").onclick();'> | ||
<div class='win' onclick='Event.stop(event);return false;' --> | ||
|
||
<div class='wrap' style='display:none;'> | ||
<div class='win'> | ||
<p class='btn'> | ||
<p class='backup'><input name='node[v_backup]' type='checkbox' value='true' checked='checked'/><r:t>backup</r:t></p> | ||
<input type='submit' value='#{t("crop")}'/> | ||
<p do='link' update='crop' do='t'>btn_x</p> | ||
</p> | ||
<div class='crop_ed' do='crop'/> | ||
</div> | ||
</div> | ||
</div> | ||
<r:else> | ||
<p do='void' actions='edit'/> | ||
</r:else> | ||
</r:Image?> | ||
</r:if> | ||
<r:if test='can_publish?'> | ||
<label do='t("publish #{klass}")'/> | ||
<p do='void' actions='publish'/> | ||
</r:if> | ||
<r:if test='can_drive?'> | ||
<label do='t("move/manage versions")'/> | ||
<p do='void' actions='drive'/> | ||
</r:if> | ||
<r:if test='can_edit?' do='default' label='t'> | ||
<input type='hidden' name='redir' value='#{path(this, :mode => "admin")}'/> | ||
<r:input name='title'/> | ||
<r:input name='keywords'/> | ||
<r:textarea name='summary'/> | ||
<r:textarea name='text'/> | ||
|
||
<r:vclass do='columns' do='each'> | ||
<r:if test='name != "title" and name != "summary" and name != "keywords" and name != "text"'> | ||
<r:textarea/> | ||
</r:if> | ||
</r:vclass> | ||
|
||
<r:input type='submit'/> | ||
</r:if> | ||
</div> <!-- form --> | ||
|
||
<div id='browser'> | ||
<div class='wrap'> | ||
<div id='parents'> | ||
<div class='search' do='filter' live='true'> | ||
<input type='text' name='f'/> | ||
<r:select param='k' root_class='Node' attr='kpath'/> | ||
</div> | ||
<div id='par_list' do='block' do='children where kpath like "#{params[:k]}%" and title like "%#{params[:f]}%" from parent from parent limit 30 paginate p' set_ref='parent'> | ||
<div class='pages'><r:t>page</r:t>: <r:link page='list' page_count='6' update='par_list' encode_params='f'/> (<r:count/> <r:t>records</r:t>)</div> | ||
<ul> | ||
<li do='each' alt_class='stripe' on_if='id == ref.id' name='elem'> | ||
<r:Image?> | ||
<r:img mode='tipop'/> | ||
<r:else> | ||
<img src='#{vclass.icon || "/images/brick.png"}'/> | ||
</r:else> | ||
</r:Image?> | ||
<r:link mode='admin'> | ||
<span class='id' do='id'/> | ||
<r:Document?> | ||
<r:show text='#{title.limit(14)}.#{ext}'/> | ||
<r:else do='title.limit(23)'/> | ||
</r:Document?> | ||
</r:link> | ||
</li> | ||
</ul> | ||
<r:else do='parent'> | ||
<!-- no grand-parent --> | ||
<div class='pages'><r:if test='!parent_id'><r:t>root_node</r:t><r:else do='t'>not_found</r:else></r:if></div> | ||
<ul> | ||
<r:include template='Node-admin' part='elem' method='void'/> | ||
</ul> | ||
<r:else><!-- no parent --> | ||
<div class='pages' do='t'>no_parent</div> | ||
<ul> | ||
</ul> | ||
</r:else> | ||
</r:else> | ||
</div> | ||
</div> <!-- #parents --> | ||
<div id='siblings'> | ||
<div class='search' do='filter' live='true'> | ||
<input type='text' name='f'/> | ||
<r:select param='k' root_class='Node' attr='kpath'/> | ||
</div> | ||
<div id='sib_list' do='block' do='children where kpath like "#{params[:k]}%" and title like "%#{params[:f]}%" from parent limit 30 paginate p' set_ref='this'> | ||
<div class='pages'><r:t>page</r:t>: <r:link page='list' page_count='6' update='sib_list' encode_params='f'/> (<r:count/> <r:t>records</r:t>)</div> | ||
<ul> | ||
<r:include template='Node-admin' part='elem' method='void'/> | ||
</ul> | ||
<r:else> | ||
<!-- no parent, just show self --> | ||
<div class='pages'><r:if test='!parent_id'><r:t>root_node</r:t><r:else do='t'>not_found</r:else></r:if></div> | ||
<ul> | ||
<r:include template='Node-admin' part='elem' method='void'/> | ||
</ul> | ||
</r:else> | ||
</div> | ||
</div> <!-- #siblings --> | ||
<div id='children'> | ||
<div class='search' do='filter' live='true'> | ||
<input type='text' name='f'/> | ||
<r:select param='k' root_class='Node' attr='kpath'/> | ||
</div> | ||
<div id='ch_list' do='block' do='children where kpath like "#{params[:k]}%" and title like "%#{params[:f]}%" limit 30 paginate p'> | ||
<div class='pages'><r:t>page</r:t>: <r:link page='list' page_count='6' update='ch_list' encode_params='f'/> (<r:count/> <r:t>records</r:t>)</div> | ||
<ul> | ||
<r:each set_ref='main' do='include' template='Node-admin' part='elem' method='void'/> | ||
<li class='add' do='add' do='t'>add_object</li> | ||
<li class='add_doc' do='add_document' do='t'>upload_document</li> | ||
<li do='form'><r:select name='klass' root_class='Node'/> <r:input name='title'/> <r:input type='submit'/></li> | ||
</ul> | ||
</div> | ||
</div> <!-- #children --> | ||
|
||
<r:js> | ||
// TODO: scroll only in browser DIV | ||
// $$('#browser .on').each(function(o) { | ||
// o.scrollIntoView(true); | ||
// }); | ||
</r:js> | ||
</div> <!-- .wrap --> | ||
</div> <!-- #browser --> | ||
</div> <!-- content --> | ||
</div> | ||
</body> | ||
</html> |
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,57 @@ | ||
body {font-family:Verdana, sans-serif; font-size:12px; line-height:18px; background:#555} | ||
a {text-decoration:none; color:inherit; } | ||
|
||
#logo {font-size:21px; font-weight:bold; color:#333; text-shadow: 0 1px 0 #777;} | ||
#container { border:1px solid black; background:#eee; margin:3em auto;} | ||
#logo, #container {width:800px; display:table; margin:1em auto;} | ||
|
||
#menu li {float:left;} | ||
#menu li a { padding:4px; border:1px solid #333; border-width:0 1px 1px 0; display:block;} | ||
#menu li a.on { background:#f7d493;} | ||
|
||
#content {clear:both; padding-top:1px;} | ||
#content h2.title {margin:20px; color:black; font-weight:bold; font-size:18px;} | ||
#content table.admin {margin-bottom:2em;} | ||
|
||
#browser {background:#333; padding:4em 0 2em;} | ||
#browser .wrap {display:table; margin:0 auto;} | ||
#browser .wrap>div {float:left; border:1px solid #444; width:200px; background:#444;} | ||
#browser div ul {height:200px; overflow:auto;} | ||
#browser li, #browser div .pages {border-bottom:1px solid #444; background:#eee} | ||
#browser li img {float:left; margin:3px;} | ||
#browser div .pages a { color:#7cf; padding:0 3px;} | ||
#browser div .pages { background:#777; color:#bbb;} | ||
#browser li.on { background:#aaa;} | ||
#browser a:hover { background:#f4ecc1; color:black;} | ||
#browser .pages, #browser li a {display:block; height:22px; padding:2px;} | ||
#siblings li.on {background:#f7d493;} | ||
#children .btn_add a { visibility:visible;} | ||
#children .add { background:#82a0ae; color:#eee;} | ||
#children .add_doc { background:#aea782; color:#eee;} | ||
#browser .wrap>div {position:relative;} | ||
#browser .search {position:absolute; top:-27px; background:#ddd; padding:2px;} | ||
.search input, .search select {float:left; width:45%; margin-right:4px;} | ||
#browser .id {float:right; color:#999; font-size:9px;} | ||
|
||
#preview {border:4px dashed #ccc; width:450px; margin:1em; float:right; position:relative;} | ||
#preview .zazen {height:220px; overflow:auto; padding:10px; } | ||
h2.preview {position:absolute; top:7px; right:-4px;} | ||
h2.preview a { background:#ccc; padding:0.5em; font-size:18px; font-weight:bold;} | ||
h2.preview:hover a {background:#fbeab6;} | ||
#preview .med_prev {background:#444; width:100%;} | ||
#preview .crop { position:absolute; bottom:10px; right:10px; visibility:hidden; display:block;} | ||
#preview:hover .crop { visibility:visible;} | ||
|
||
.med_prev td {vertical-align:middle; text-align:center; height:240px;} | ||
.med_prev .img {border:1px solid black;} | ||
#title { font-size:21px; font-weight:bold; margin:18px; float:left;} | ||
#title a, #form a {visibility:visible} | ||
#title span {font-size:55%; color:#888;} | ||
|
||
#form {clear:left; margin:18px; position:relative; width:300px;} | ||
#form label { font-weight:bold; margin-top:1em; display:block; color:#999} | ||
#crop .mask { position:fixed; top:0; left:0; width:100%; height:100%; background:black; opacity:0.8;} | ||
#crop .wrap { position:absolute; top:-200px; left:180px; width:100%; height:100%;} | ||
#crop .win { display:table; margin:80px auto; background:#999; padding:20px;} | ||
#crop .crop_options {display:none;} | ||
#crop .btn input {float:right} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.