Sha256: 119fbbdb300cae7df2d0264c7a873e1c5848fbe87dc20af8e11772d484521de0
Contents?: true
Size: 1.61 KB
Versions: 6
Compression:
Stored size: 1.61 KB
Contents
<h2><%= EscapeUtils.escape_html 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"><%= EscapeUtils.escape_html 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"><%= EscapeUtils.escape_html 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(Mid.gem_source_path), 'admin_views', '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(Mid.gem_source_path), 'admin_views', 'editor_js.erb') %> <%= ERB.new(File.read(path)).result(binding) %> </script> </div> <button type="submit" class="btn btn-primary"><%= EscapeUtils.escape_html t.submit.capitalize %></button> </form>
Version data entries
6 entries across 6 versions & 1 rubygems