#1064 Wrong sorting of Czech characters
This commit is contained in:
parent
133dc24ad4
commit
6d454993cd
@ -191,4 +191,11 @@ module DmsfHelper
|
||||
principals_check_box_tags 'user_ids[]', users
|
||||
end
|
||||
|
||||
# Replace specifics characters with their ASCII version + 'z' in order to fix the wrong ordering
|
||||
# e.g. 'č' -> 'cz'
|
||||
def clear_title(title)
|
||||
title.gsub!(/[ěščřýáíéůúďťňĚŠČŘÝÁÍÉÚŮĎŤŇ]/) { |c| c + 'z' }
|
||||
title.tr('ěščřýáíéůúďťňĚŠČŘÝÁÍÉÚŮĎŤŇ', 'escryaieuudtnESCRYAIEUUDTN')
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@ -128,4 +128,4 @@
|
||||
<td class="none">0</td>
|
||||
<td class="none"><%= subfolder.modified.to_i if subfolder %></td>
|
||||
<td class="none">0</td>
|
||||
<td class="none"><%= title %></td>
|
||||
<td class="none"><%= clear_title(title) %></td>
|
||||
|
||||
@ -87,4 +87,4 @@
|
||||
<td class="none">0</td>
|
||||
<td class="none"><%= subfolder.modified.to_i if subfolder %></td>
|
||||
<td class="none">0</td>
|
||||
<td class="none"><%= title %></td>
|
||||
<td class="none"><%= clear_title(title) %></td>
|
||||
|
||||
@ -139,4 +139,4 @@
|
||||
<td class="none"><%= file.last_revision.size %></td>
|
||||
<td class="none"><%= file.last_revision.updated_at.to_i %></td>
|
||||
<td class="none"><%= file.last_revision.iversion %></td>
|
||||
<td class="none"><%= title %></td>
|
||||
<td class="none"><%= clear_title(title) %></td>
|
||||
|
||||
@ -81,4 +81,4 @@
|
||||
<td class="none"><%= file.last_revision.size %></td>
|
||||
<td class="none"><%= file.last_revision.updated_at.to_i %></td>
|
||||
<td class="none"><%= file.last_revision.iversion %></td>
|
||||
<td class="none"><%= title %></td>
|
||||
<td class="none"><%= clear_title(title) %></td>
|
||||
|
||||
@ -85,4 +85,4 @@
|
||||
<td class="none"></td>
|
||||
<td class="none">link.updated_at.to_i</td>
|
||||
<td class="none"></td>
|
||||
<td class="none"><%= title %></td>
|
||||
<td class="none"><%= clear_title(title) %></td>
|
||||
|
||||
@ -75,4 +75,4 @@
|
||||
<td class="none"></td>
|
||||
<td class="none"><%= link.updated_at.to_i %></td>
|
||||
<td class="none"></td>
|
||||
<td class="none"><%= title %></td>
|
||||
<td class="none"><%= clear_title(title) %></td>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user