Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.3.2^2
zouap 4 years ago
parent
commit
623344c00b
2 changed files with 8 additions and 7 deletions
  1. +6
    -5
      models/dbsql/dataset_foreigntable_for_es.sql
  2. +2
    -2
      public/home/search.js

+ 6
- 5
models/dbsql/dataset_foreigntable_for_es.sql View File

@@ -38,7 +38,7 @@ DELETE FROM public.dataset_es;
user_id,
repo_id,
created_unix,
updated_unix,file_name,file_type)
updated_unix,file_name)
SELECT
b.id,
b.title,
@@ -60,8 +60,8 @@ $def$
DECLARE
privateValue boolean=false;
BEGIN
select into privateValue is_private from public.repository where id=NEW.repo_id;
if not privateValue then
--select into privateValue is_private from public.repository where id=NEW.repo_id;
--if not privateValue then
INSERT INTO public.dataset_es(
id,
title,
@@ -69,7 +69,8 @@ $def$
category,
description,
download_times,
license, task,
license,
task,
release_id,
user_id,
repo_id,
@@ -90,7 +91,7 @@ $def$
NEW.created_unix,
NEW.updated_unix
);
end if;
--end if;
RETURN NEW;
END;
$def$


+ 2
- 2
public/home/search.js View File

@@ -281,11 +281,11 @@ function displayDataSetResult(page,jsonResult,onlyReturnNum,keyword){
html += " <span class=\"text grey\"><i class=\"ri-fire-line\"></i> " +recordMap["download_times"] + "</span> ";
html +=" </div>";
html += " <div class=\"ui header\">";
html += " <a class=\"name\" href=\"/" +recordMap["repoUrl"] +"/datasets?type=0\">" + recordMap["repoUrl"] + "</a>";
html += " <a class=\"name\" href=\"/" +recordMap["repoUrl"] +"/datasets?type=0\">" + recordMap["title"] + "</a>";
html +=" <span class=\"middle\"><svg class=\"svg octicon-repo-clone\" width=\"16\" height=\"16\" aria-hidden=\"true\"><use xlink:href=\"#octicon-repo-clone\"></use></svg></span>";
html +=" </div>";
html += " <div class=\"description\">";
html += " <p class=\"has-emoji\"> " + recordMap["title"] + "</p>";
html += " <p class=\"has-emoji\"> " + recordMap["description"] + "</p>";
if(!isEmpty(recordMap["file_name"])){
html += " <p class=\"has-emoji\"> " + recordMap["file_name"] + "</p>";
}


Loading…
Cancel
Save