<!-- $Id: d_editfile.tt2 12726 2016-03-09 04:01:24Z sikeda $ -->
<h2>[%|loc%]Shared documents[%END%] <a  href="[% 'nomenu/help/shared' | url_rel %]" title="[%|loc%]Open in a new window[%END%]" onclick="window.open('','wws_help','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=400,height=200')" target="wws_help"><i class="fa fa-question-circle" title="[%|loc%]Help[%END%]"></i></a></h2>

    <menu class="shared">
    <li><span class="search_form"> <a class="actionMenuLinks" href="[% 'd_read' | url_rel([list,escaped_father]) %]" title="[%|loc%]Up to higher level directory[%END%]"><i class="fa fa-folder-open fa-lg"><i class="fa fa-level-up fa-lg"></i></i></a></span></li>
    </menu>

  [% IF url %]
  <h3>[%|loc(visible_path)%]Edition of the bookmark %1[%END%]</h3>
  [% ELSE %]
  <h3>[%|loc(visible_path)%]Edition of the file %1[%END%]</h3>
  [% END %]

    <p>
    [%|loc(doc_owner)%]Owner: %1[%END%] <br />
    [%|loc(doc_date)%]Last update: %1[%END%] <br />
    [%|loc(desc)%]Description: %1[%END%] <br />
    </p>

  [% IF !directory %]
  
  <form method="post" action="[% path_cgi %]" enctype="multipart/form-data">
  <fieldset>

  [% IF url %]
  <label for="url">[%|loc%]Bookmark URL[%END%]</label>
  <input id="url" name="url" value="[% url %]" />
  [% ELSE %]
  <label for="uploaded_file"> [%|loc(visible_path)%]Replace the file %1 with your file[%END%] </label>
  <input id="uploaded_file" type="file" name="uploaded_file" />
  [% END %]
  
  [% IF url %]
  <input class="MainMenuLinks" type="submit" value="[%|loc%]Update[%END%]" name="action_d_savefile" />
  [% ELSE %]
  <input class="MainMenuLinks" type="submit" value="[%|loc%]Publish[%END%]" name="action_d_overwrite" />
  [% END %]
  <input type="hidden" name="list" value="[% list %]" />
  <input type="hidden" name="path" value="[% path %]" />
  <input type="hidden" name="serial" value="[% serial_file %]" />
  </fieldset>
  </form>

  [% END %]

[% IF !url %]
[% IF textfile %]
  <form action="[% path_cgi %]" method="post">
  <fieldset>
  <label for="content">[%|loc(visible_path)%]Edit the file %1[%END%]</label>
  <textarea id="content" name="content" cols="90" rows="25">
    [%~ INSERT $filepath IF filepath ~%]
  </textarea>
  <input type="hidden" name="list" value="[% list %]" />
  <input type="hidden" name="path" value="[% path %]" />
  <input type="hidden" name="serial" value="[% serial_file %]" />
  <input class="MainMenuLinks" type="submit" name="action_d_savefile" value="[%|loc%]Publish[%END%]" />
  </fieldset>
  </form>
[% END %]
[% END %]

<!-- end d_editfile.tt2 -->
