forked from Gitlink/forgeplus
Merge branch 'dev_trustie' of http://gitea.trustie.net/jasder/forgeplus into dev_trustie
This commit is contained in:
commit
3616e84548
|
@ -5,8 +5,8 @@ module RepositoriesHelper
|
|||
end
|
||||
|
||||
def download_type(str)
|
||||
default_type = %w(xlsx xls ppt pptx pdf zip 7z rar exe pdb obj idb)
|
||||
default_type.include?(str)
|
||||
default_type = %w(xlsx xls ppt pptx pdf zip 7z rar exe pdb obj idb png jpg gif tif psd svg)
|
||||
default_type.include?(str&.downcase)
|
||||
end
|
||||
|
||||
def render_commit_author(author_json)
|
||||
|
|
|
@ -13,13 +13,13 @@ json.array! @branches do |branch|
|
|||
json.time_from_now time_from_now(branch['commit']['timestamp'])
|
||||
end
|
||||
|
||||
user = User.find_by_login branch['commit']['author']['name']
|
||||
user = User.find_by_login branch['commit']['author']['username']
|
||||
json.author do
|
||||
if user
|
||||
json.login user.login
|
||||
json.image_url url_to_avatar(user)
|
||||
else
|
||||
json.nil
|
||||
json.nil!
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue