diff --git a/assets/stylesheets/redmine_dmsf.css b/assets/stylesheets/redmine_dmsf.css index 9b47f5e8..e4e31e57 100644 --- a/assets/stylesheets/redmine_dmsf.css +++ b/assets/stylesheets/redmine_dmsf.css @@ -120,17 +120,6 @@ table.display thead th div.DataTables_sort_wrapper span { white-space: nowrap; } -<<<<<<< HEAD -.dmsf_cf { - font-size: 0.8em; -} - -.dmsf_invisible { - display: none; -} - -======= ->>>>>>> devel-1.6.0 .dmsf_upload_select { float: right; font-size: 0.9em; diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 93b78998..0bd87c6d 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -21,17 +21,10 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. pt-BR: -<<<<<<< HEAD - dmsf: DMSF + dmsf: DMS label_dmsf_file_plural: Arquivos label_dmsf_file_revision_plural: Revisões dos Arquivos label_dmsf_file_revision_access_plural: Acessos aos Arquivos -======= - dmsf: DMS # Custom fields tab title - label_dmsf_file_plural: Arquivos Documentos - label_dmsf_file_revision_plural: Revisões dos Documentos - label_dmsf_file_revision_access_plural: Acessos aos Documentos ->>>>>>> devel-1.6.0 warning_no_entries_selected: É necessário selecionar um arquivo ou pasta error_email_to_must_be_entered: Destinatário não pode ficar em branco warning_file_already_locked: Arquivo já bloqueado @@ -150,8 +143,7 @@ pt-BR: label_default_notifications: Notificações padrões de arquivo heading_uploaded_files: Arquivos enviados submit_commit: Salvar -<<<<<<< HEAD - link_documents: DMSF + link_documents: DMS permission_view_dmsf_file_revision_accesses: Ver downloads no fluxo de Atividades permission_view_dmsf_file_revisions: Ver revisões no fluxo de Atividades permission_view_dmsf_folders: Browse documentos @@ -162,20 +154,7 @@ pt-BR: permission_force_file_unlock: Forçar desbloqueio do arquivo permission_manage_workflows: Administrar workflows permission_file_delete: Excluir arquivos -======= - link_documents: DMS - permission_view_dmsf_file_revision_accesses: View downloads in Activity stream - permission_view_dmsf_file_revisions: View revisions in Activity stream - permission_view_dmsf_folders: Browse documents - permission_user_preferences: User preferences - permission_view_dmsf_files: View documents - permission_folder_manipulation: Folder manipulation - permission_file_manipulation: File manipulation - permission_force_file_unlock: Force file unlock - permission_manage_workflows: Manage workflows - permission_file_delete: Delete documents permission_display_system_folders: Display system folders ->>>>>>> devel-1.6.0 label_file: Arquivo field_folder: Pasta error_create_cycle_in_folder_dependency: Dependência entre pastas @@ -193,33 +172,19 @@ pt-BR: label_number_of_documents: Documentos error_file_storage_directory_does_not_exist: "O diretório de armazenamento de arquivo não existe e não pode ser criado" error_file_can_not_be_created: "O arquivo não pode ser criado" -<<<<<<< HEAD error_wrong_zip_encoding: Código Zip errado warning_xapian_not_available: Xapian não disponível - menu_dmsf: DMSF + menu_dmsf: DMS label_physical_file_delete: Excluir fisicamente arquivo user_is_not_project_member: Você não é um membro do projeto -======= - error_wrong_zip_encoding: Wrong Zip encoding - warning_xapian_not_available: Xapian not available - menu_dmsf: DMS # Project tab title - label_physical_file_delete: Physical file delete - user_is_not_project_member: You are not a member of the project ->>>>>>> devel-1.6.0 heading_access_downloads_emails: Downloads/Emails heading_access_first: Primeiro heading_access_last: Último label_dmsf_updated: Updated label_dmsf_downloaded: Downloaded -<<<<<<< HEAD title_total_size_of_all_files: Tamanho total de todos os arquivos nesta pasta - project_module_dmsf: DMSF + project_module_dmsf: DMS warning_no_project_to_copy_file_to: Nenhum projeto para cópia do arquivo -======= - title_total_size_of_all_files: Total size of all files under this folder - project_module_dmsf: DMS # Project module name - warning_no_project_to_copy_file_to: No project to copy file to ->>>>>>> devel-1.6.0 comment_copied_from: "Copiado de %{source}" notice_file_copied: Arquivo copiado notice_file_moved: Arquivo movido @@ -269,18 +234,10 @@ pt-BR: field_label_dmsf_workflow_name: Nome do workflow de aprovação label_dmsf_workflow_plural: Workflows de aprovação label_dmsf_workflow_plural_num: Workflows de aprovação(%{count}) -<<<<<<< HEAD label_dmsf_workflow_step: Passo label_dmsf_workflow_step_plural: Passos label_dmsf_workflow_approval: Aprovação label_dmsf_workflow_approval_plural: Aprovações - label_dmsf: DMSF -======= - label_dmsf_workflow_step: Step - label_dmsf_workflow_step_plural: Steps - label_dmsf_workflow_approval: Approval - label_dmsf_workflow_approval_plural: Approvals ->>>>>>> devel-1.6.0 label_dmsf_wokflow_action_approve: Aprovar label_dmsf_wokflow_action_reject: Reprovar label_dmsf_wokflow_action_delegate: Atribuir para @@ -403,17 +360,12 @@ pt-BR: label_webdav_use_project_names: Use o nome do projeto para a pasta do projeto note_webdav_use_project_names: Use nomes de projetos em vez de identificador de projeto para pastas de projeto. -<<<<<<< HEAD - label_act_as_attachable: Atuar como anexo - note_dmsf_act_as_attachable: Permite anexar documentos a objetos, por exemplo, issues. -======= label_last_approver: Last approver - label_act_as_attachable: Act as attachable - note_dmsf_act_as_attachable: Allows to attach documents to objects e.g. issues. + label_act_as_attachable: Atuar como anexo + note_dmsf_act_as_attachable: Permite anexar documentos a objetos, por exemplo, issues. label_user_search_add: Search for user to add label_dmsf_attachments: DMS Attachments label_basic_attachments: Basic Attachments ->>>>>>> devel-1.6.0 diff --git a/lib/redmine_dmsf/webdav/base_resource.rb b/lib/redmine_dmsf/webdav/base_resource.rb index cb71fedc..5b34b613 100644 --- a/lib/redmine_dmsf/webdav/base_resource.rb +++ b/lib/redmine_dmsf/webdav/base_resource.rb @@ -166,24 +166,10 @@ module RedmineDmsf unless @project pinfo = @path.split('/').drop(1) if pinfo.length > 0 -<<<<<<< HEAD - if use_project_names - unless pinfo.first.match('(-([0-9]+)-)$').nil? - pid = $2 - begin - @project = Project.find_by_id(pid) - rescue Exception => e - Rails.logger.error e.message - end - end - if @project.nil? - Rails.logger.warn {"WebDAV ERROR: No project found on path '#{@path}'"} -======= if Setting.plugin_redmine_dmsf['dmsf_webdav_use_project_names'] if pinfo.first =~ /(\d)$/ @project = Project.find_by_id($1) Rails.logger.warn {"WebDAV ERROR: No project found on path '#{@path}'"} unless @project ->>>>>>> devel-1.6.0 end else begin diff --git a/lib/redmine_dmsf/webdav/project_resource.rb b/lib/redmine_dmsf/webdav/project_resource.rb index ad085bf7..fc82acdc 100644 --- a/lib/redmine_dmsf/webdav/project_resource.rb +++ b/lib/redmine_dmsf/webdav/project_resource.rb @@ -125,11 +125,7 @@ module RedmineDmsf # 1. Invalid characters are replaced with a dot. # 2. Two or more dots in a row are replaced with a single dot. # (3. Windows WebClient does not like a dot at the end, but since the project id tag is appended this is not a problem.) -<<<<<<< HEAD - "#{p.name.gsub(INVALID_CHARACTERS, ".").gsub(/\.{2,}/, ".")} -#{p.id}-" unless p.nil? -======= "#{p.name.gsub(INVALID_CHARACTERS, '.').gsub(/\.{2,}/, '.')} #{p.id}" if p ->>>>>>> devel-1.6.0 else p.identifier if p end diff --git a/test/integration/webdav/dmsf_webdav_propfind_test.rb b/test/integration/webdav/dmsf_webdav_propfind_test.rb index 42ff8adf..aea5cdd1 100644 --- a/test/integration/webdav/dmsf_webdav_propfind_test.rb +++ b/test/integration/webdav/dmsf_webdav_propfind_test.rb @@ -44,11 +44,7 @@ class DmsfWebdavPropfindTest < RedmineDmsf::Test::IntegrationTest # Temporarily enable project names to generate names for project1 Setting.plugin_redmine_dmsf['dmsf_webdav_use_project_names'] = true @project1_name = RedmineDmsf::Webdav::ProjectResource.create_project_name(@project1) -<<<<<<< HEAD - @project1_uri = URI.encode(@project1_name) -======= @project1_uri = Addressable::URI.escape(@project1_name) ->>>>>>> devel-1.6.0 Setting.plugin_redmine_dmsf['dmsf_webdav_use_project_names'] = false RedmineDmsf::Webdav::Cache.clear end @@ -170,57 +166,6 @@ class DmsfWebdavPropfindTest < RedmineDmsf::Test::IntegrationTest end def test_propfind_depth1_on_root_for_admin_with_project_names_and_cache -<<<<<<< HEAD - RedmineDmsf::Webdav::Cache.init_testcache - Setting.plugin_redmine_dmsf['dmsf_webdav_use_project_names'] = true - if Setting.plugin_redmine_dmsf['dmsf_webdav_use_project_names'] == true - # PROPSTATS for / and project1 should be cached. - assert_difference 'RedmineDmsf::Webdav::Cache.cache.instance_variable_get(:@data).count', +2 do - xml_http_request :propfind, '/dmsf/webdav/', nil, - @admin.merge!({:HTTP_DEPTH => '1'}) - end - - assert_response 207 # MultiStatus - assert_match 'http://www.example.com:80/dmsf/webdav/', response.body - assert_match '/', response.body - - # project.identifier should not match when using project names - assert_no_match "http://www.example.com:80/dmsf/webdav/#{@project1.identifier}/", response.body - assert_no_match "#{@project1.identifier}", response.body - - # but the project name should match - assert_match "http://www.example.com:80/dmsf/webdav/#{@project1_uri}/", response.body - assert_match "#{@project1_name}", response.body - - # Rename project1 - @project1.name = 'Online Cookbook' - @project1.save! - project1_new_name = RedmineDmsf::Webdav::ProjectResource.create_project_name(@project1) - project1_new_uri = URI.encode(project1_new_name) - - # PROPSTATS for / is already cached, but a new PROPSTATS should be cached for project1 - assert_difference 'RedmineDmsf::Webdav::Cache.cache.instance_variable_get(:@data).count', +1 do - xml_http_request :propfind, '/dmsf/webdav/', nil, - @admin.merge!({:HTTP_DEPTH => '1'}) - end - - assert_response 207 # MultiStatus - assert_match 'http://www.example.com:80/dmsf/webdav/', response.body - assert_match '/', response.body - - # project.identifier should not match when using project names - assert_no_match "http://www.example.com:80/dmsf/webdav/#{@project1.identifier}/", response.body - assert_no_match "#{@project1.identifier}", response.body - - # old project name should not match - assert_no_match "http://www.example.com:80/dmsf/webdav/#{@project1_uri}/", response.body - assert_no_match "#{@project1_name}", response.body - - # but new project name should match - assert_match "http://www.example.com:80/dmsf/webdav/#{project1_new_uri}/", response.body - assert_match "#{project1_new_name}", response.body - end -======= @project1.name = 'Online Cookbook' @project1.save! project1_new_name = RedmineDmsf::Webdav::ProjectResource.create_project_name(@project1) @@ -229,7 +174,6 @@ class DmsfWebdavPropfindTest < RedmineDmsf::Test::IntegrationTest assert_response 207 # MultiStatus assert response.body.include?("http://www.example.com:80/dmsf/webdav/#{project1_new_uri}/") assert response.body.include?("#{project1_new_name}") ->>>>>>> devel-1.6.0 end def test_propfind_depth0_on_project1_for_admin_with_cache