代码之家  ›  专栏  ›  技术社区  ›  Samuel Mwamburi

DSpace 6.2社区列表修改

  •  1
  • Samuel Mwamburi  · 技术社区  · 8 年前

    我一直在尝试修改我正在处理的存储库中社区列表的外观。本质上,我想删除首页社区下方的内容描述标题。我在下面附上了图片描述。

    我正在试着得到这个 Now

    看起来像这样 What I'm Going For

    我似乎找不到负责的文件,我最初试图修改 _社区列表。scss公司 以及 _社区视图。scss公司 中的文件 [source]/dspace-xmlui-mirage2/src/main/webapp/styles/classic_mirage_color_scheme/

    但还没有运气。

    3 回复  |  直到 8 年前
        1
  •  1
  •   terrywb    8 年前

    注释掉以下代码以隐藏该信息的显示。 https://github.com/DSpace/DSpace/blob/dspace-6_x/dspace-xmlui-mirage2/src/main/webapp/xsl/aspect/artifactbrowser/community-list.xsl#L66-L73

            <xsl:variable name="abstract" select="$data/dim:field[@element = 'description' and @qualifier='abstract']/node()"/>
            <xsl:if test="$abstract and string-length($abstract[1]) &gt; 0">
                <div class="artifact-info">
                    <span class="short-description text-muted">
                        <xsl:value-of select="util:shortenString($abstract, 220, 10)"/>
                    </span>
                </div>
            </xsl:if>
    
        2
  •  0
  •   Samuel Mwamburi    8 年前

    谢谢你这么做。缓存不是问题,因为我似乎还需要修改 /[来源]/dspace-xmlui-mirage2/src/main/webapp/xsl/preprocess/communitylist。xsl

        3
  •  0
  •   Samuel Mwamburi    8 年前

    我遵循了@terrywb的上述指示

    注释掉以下代码以隐藏该信息的显示。 https://github.com/DSpace/DSpace/blob/dspace-6_x/dspace-xmlui-mirage2/src/main/webapp/xsl/aspect/artifactbrowser/community-list.xsl#L66-L73

        <xsl:variable name="abstract" select="$data/dim:field[@element = 'description' and @qualifier='abstract']/node()"/>
        <xsl:if test="$abstract and string-length($abstract[1]) &gt; 0">
            <div class="artifact-info">
                <span class="short-description text-muted">
                    <xsl:value-of select="util:shortenString($abstract, 220, 10)"/>
                </span>
            </div>
        </xsl:if>
    

    然后在 /[来源]/dspace-xmlui-mirage2/src/main/webapp/xsl/preprocess/communitylist。xsl/ 注释掉第138行到第143行,使其看起来像这样。

      <!-- <xsl:variable name="description" select="$dim/dim:field[@element='description'][@qualifier='abstract']"/>
            <xsl:if test="string-length($description/text()) > 0">
                <p rend="hidden-xs">
                    <xsl:value-of select="$description"/>
                </p>
            </xsl:if> -->
    

    在构建下面的描述之后,社区应该消失。


    我还发现,也可以从 /主页/dspace/config/dspace。cfg公司 文件第944行:

    webui.strengths.show = true
    

    将此值更改为false,使其看起来像这样

    webui.strengths.show = false