Fixed repoview generator
This commit is contained in:
2
app.rb
2
app.rb
@@ -613,7 +613,6 @@ post "/prjcfg/:id" do
|
|||||||
if prj_info.nil?
|
if prj_info.nil?
|
||||||
print_error_page(503, "Путь к проектам не существует")
|
print_error_page(503, "Путь к проектам не существует")
|
||||||
else
|
else
|
||||||
pp params
|
|
||||||
unless params["cancel"].nil?
|
unless params["cancel"].nil?
|
||||||
redirect "/prjedit/#{params["id"]}"
|
redirect "/prjedit/#{params["id"]}"
|
||||||
else
|
else
|
||||||
@@ -1379,7 +1378,6 @@ end
|
|||||||
|
|
||||||
get "/prjsignview/:id/*" do
|
get "/prjsignview/:id/*" do
|
||||||
data_path = params[:splat]
|
data_path = params[:splat]
|
||||||
pp data_path
|
|
||||||
if data_path.nil? || data_path.first.strip == ""
|
if data_path.nil? || data_path.first.strip == ""
|
||||||
data_path = "index.html"
|
data_path = "index.html"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -103,7 +103,8 @@ class RepoManager
|
|||||||
pkg_info[:stat] = File.stat(full_rpm_path).ctime
|
pkg_info[:stat] = File.stat(full_rpm_path).ctime
|
||||||
pkg_info[:pname] = "noname"
|
pkg_info[:pname] = "noname"
|
||||||
if info[:error].nil?
|
if info[:error].nil?
|
||||||
pkg_info[:chlog] = info[:pkginfo].changelog.first(5)
|
pkg_info[:chlog] = []
|
||||||
|
pkg_info[:chlog] << info[:pkginfo].changelog.first
|
||||||
pkg_info[:pname] = info[:pkginfo].name
|
pkg_info[:pname] = info[:pkginfo].name
|
||||||
else
|
else
|
||||||
pkg_info[:chlog] = []
|
pkg_info[:chlog] = []
|
||||||
@@ -153,8 +154,6 @@ class RepoManager
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
pp repo_data
|
|
||||||
|
|
||||||
tpl_file = File.join(template_dir, "template.erb")
|
tpl_file = File.join(template_dir, "template.erb")
|
||||||
template = File.read(tpl_file)
|
template = File.read(tpl_file)
|
||||||
renderer = ERB.new(template)
|
renderer = ERB.new(template)
|
||||||
|
|||||||
Reference in New Issue
Block a user