Office URI Scheme for direct editing of MS Office files #823

This commit is contained in:
Karel Pičman 2018-12-04 12:57:10 +01:00
parent a573e398d7
commit c68efb5e92
2 changed files with 3 additions and 3 deletions

View File

@ -180,7 +180,7 @@ class DmsfFolder < ActiveRecord::Base
def dmsf_path_str def dmsf_path_str
path = dmsf_path path = dmsf_path
string_path = path.map { |element| element.title } string_path = path.map { |element| element.title }
string_path.join('/') File.join string_path
end end
def notify? def notify?

View File

@ -39,9 +39,9 @@
<% if @file %> <% if @file %>
<li> <li>
<% if @file.last_revision && @file.last_revision.protocol %> <% if @file.last_revision && @file.last_revision.protocol %>
<% url = "#{@file.last_revision.protocol}:ofe|u|#{Setting.protocol.strip}://#{Setting.host_name.strip}/dmsf/webdav/#{Addressable::URI.escape(@file.project.identifier)}/" %> <% url = "#{@file.last_revision.protocol}:ofe|u|#{Setting.protocol.strip}://#{Setting.host_name.strip}/dmsf/webdav/#{Addressable::URI.escape(RedmineDmsf::Webdav::ProjectResource.create_project_name(@file.project))}/" %>
<% if @file.dmsf_folder %> <% if @file.dmsf_folder %>
<% url << @file.dmsf_folder.dmsf_path_str %> <% url << "#{@file.dmsf_folder.dmsf_path_str}/" %>
<% end %> <% end %>
<% url << @file.name %> <% url << @file.name %>
<% end %> <% end %>