May 17, 2022

ปรับ Redmine ให้รองรับ sub url

Config on redmine server (docker image -> redmine:4.0.3-passenger)

1. add prefix uri to end of file config/environment.rb

Redmine::Utils::relative_url_root = '/redmine/'

 
2. add scope to file routes.rb

   Rails.application.routes.draw do
   scope 'redmine' do
     ...
   end
   end

 

3. create link file

cd redmine/public
ln -s . redmine

application_helper.rb

def thumbnail_tag(attachment)
    thumbnail_size = Setting.thumbnails_size.to_i
    src = thumbnail_path(attachment)
    src['/redmine'] = ''
#end
    link_to(
      image_tag(
         src,#thumbnail_path(attachment),
        :srcset => srcset, # "#{thumbnail_path(attachment, :size => thumbnail_size * 2)} 2x",
        :style => style # "max-width: #{thumbnail_size}px; max-height: #{thumbnail_size}px;" 
      ),
      attachment_path(
        attachment
      ),
      :title => attachment.filename
    )
  end

app/views/common/_image.html.erb

<%= path['/redmine'] = '' %>
.... ที่เหลือเหมือนเดิม

 

March 2024
S M T W T F S
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Who We Are

Wealth Management System Limited (WMSL) is a leading financial software company in Thailand. We provide reliable, trusted solutions to financial institutions in asset, treasury and risk management. With our innovative software systems and value added consulting services, we help our customers significantly improve their operational efficiency, reduce costs and minimize risks.

Contact Info

Chin Pong Building, 383 Ladya Road, Klongsan, Bangkok 10600 Thailand

Phone: +66(0) 2-861-4820 Ext. 5620-5622, 5628, 5629
Fax: +66 (0) 2-861-4400
Email: marketing@wealth.co.th

Weekdays: 8:00 am - 5:00 pm
Saturday & Sunday: Closed

Copyright © 2022 WMSL. All Rights Reserved