????

Your IP : 3.147.8.67


Current Path : C:/inetpub/vhost/redmine/plugins/redmine_drive/app/views/attachments/
Upload File :
Current File : C:/inetpub/vhost/redmine/plugins/redmine_drive/app/views/attachments/_drive_entry_sidebar.html.erb

<% if @attachment && @attachment.container %>
  <h3><%= l(:label_drive_version_history) %></h3>

  <p>
    <%= render_drive_versions(@attachment.container) %>
  </p>

  <%= javascript_tag do %>
    $(document).ready(function() {
      var $topContexual = $('.contextual').first();
      var $header = $('h2');
      var allow_to_edit = <%= @allow_to_edit || false %>

      if (allow_to_edit) {
        $header.html('<%= "v#{@attachment.container.version} - #{@attachment.container.name}" %>');
        $topContexual.append('<%= link_to l(:button_edit), '#',
          onclick: "selectFilesDialog('#{edit_drive_entries_path(project_id: @project,
                                                                 current_folder_id: @attachment.container.parent_folder.id,
                                                                 ids: [@attachment.container.id])}');", class: 'icon icon-edit' %>')
      }
      <% unless @attachment.container.current_version? %>
        $topContexual.append('<%= link_to l(:label_drive_rollback), rollback_drive_entry_path(@attachment.container,
                                                                                                  current_folder_id: @attachment.container.parent_folder.id),
                                                                        method: :post,
                                                                        class: 'icon icon-cancel' %>')
      <% end %>
      if (allow_to_edit) {
        $topContexual.append('<%= link_to l(:label_drive_upload_version), '#', class: 'icon icon-upload',
          onclick: "selectFilesDialog('#{new_files_drive_entries_path(project_id: @project,
                                                                      current_folder_id: @attachment.container.parent_folder.id,
                                                                      submit_path: upload_version_drive_entry_path(id: @attachment.container,
                                                                                                                   current_folder_id: @attachment.container.parent_folder.id))}');" %>')
      }
    });
  <% end %>

  <%= stylesheet_link_tag(:redmine_drive, plugin: 'redmine_drive') %>
  <%= javascript_include_tag('attachments') %>
  <%= javascript_include_tag(:redmine_drive, plugin: 'redmine_drive') %>
  <%= select2_assets %>
<% end %>