Sha256: fa19f2c5bd2d357496f57efe73710ae0a78c3bc0253abfe70b8870a394e2e8da
Contents?: true
Size: 1.51 KB
Versions: 1
Compression:
Stored size: 1.51 KB
Contents
<h2><%= t.edit.capitalize %></h2> <form action="/files/update?file=<%= @file %>" method="post"> <% if @has_header %> <div class="mb-3"> <label for="i-header" class="form-label"><%= t.header.capitalize %></label> <textarea class="form-control text-editor" id="i-header" rows="3" name="header" style="font-family: <%= (['.html', '.xml', '.yml', '.js', '.md'].include?(File.extname(@file)) ? 'monospace' : 'inherit') %>"><%= @header %></textarea> </div> <% end %> <div class="mb-3"> <label for="i-content" class="form-label"><%= t.content.capitalize %> <% if ['.html','.md'].include?(File.extname(@file)) %> <a href="https://jekyllrb.com/docs/liquid/" class="text-secondary" target="_blank"><i class="fas fa-question-circle"></i></a> <% end %> </label> <% if @has_editor %> <% path = File.join(Pathname.new(File.dirname(__FILE__)).parent, 'editor_html.erb') %> <%= ERB.new(File.read(path)).result(binding) %> <% end %> <textarea class="form-control text-editor" id="i-content" rows="3" name="content" style="font-family: <%= (['.html', '.xml', '.yml', '.js', '.md'].include?(File.extname(@file)) ? 'monospace' : 'inherit') %>"><%= @content %></textarea> <script type="text/javascript" charset="utf-8"> <% path = File.join(Pathname.new(File.dirname(__FILE__)).parent, 'editor_js.erb') %> <%= ERB.new(File.read(path)).result(binding) %> </script> </div> <button type="submit" class="btn btn-primary"><%= t.submit.capitalize %></button> </form>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hyde_admin-0.0.3 | bin/admin_views/files/edit.erb |