3 Replies · Latest reply on May 19, 2017 9:47 PM by Madhusudan Kulkarni

    How do I get rid of the EDIT UI action on knowledge portal?

      EDIT Button.png

      Hi there,

       

      Please help me get rid of the "edit" UI button from the knowledge portal for all users.

        • Re: How do I get rid of the EDIT UI action on knowledge portal?
          Brad Tilton

          By default, the edit button shows up if the user has security rights to edit the knowledge article. If you have to remove it, it's actually rendered in the ui macro kb_view_common_header_toolbar which is called by the ui macro kb_view_common which is called by the ui page kb_view. I don't think it's worth it to take ownership of the ui macro in question just to hide the button, though.

          3 of 3 people found this helpful
            • Re: How do I get rid of the EDIT UI action on knowledge portal?
              Naresh Reddy

              Hi Brad,

               

              How to give EDIT option for whoever Knowledge role peoples based on the below script.

               

              <?xml version="1.0" encoding="utf-8" ?>

              <j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">

                <!--A Heisenberg page header as specified in our style guide-->

                <g:evaluate var="jvar_is_kb_languages_new_ui" jelly='true'>

                  var isActive = GlidePluginManager.isActive('com.glideapp.knowledge.i18n2');

                  isActive;

                  </g:evaluate>

                <div class="navbar navbar-default snc-article-header-toolbar" role="navigation">

                <div class="kb-container-fluid">

                <div class="kb-navbar-header">

                <j:if test="${RP.getParameterValue('sysparm_popup') != 'true'}">

                <button id="backButton" class="btn btn-default icon-chevron-left navbar-btn"><j2:if test="$[jvar_isMSIE8 || jvar_isMSIE7]">${AMP}lt;</j2:if></button>

                </j:if>

                <g:inline template="kb_view_breadcrumb" />

                </div>

                </div>

                <j:if test="${isMobileView != true}">

                <div class="snc-kb-navbar-right">

                  <g:evaluate var="jvar_not_important" expression="

                var knowHelp = new SNC.KnowledgeHelper();

                var show_kb_rating_options = knowHelp.getBooleanProperty(knowledgeRecord,'glide.knowman.show_rating_options',true);

                var roles = gs.getProperty('glide.knowman.show_rating_options.roles');

                if (roles == null || roles == '')

                 ;

                else {

                var hasRole = gs.hasRole(roles);

                if (hasRole == false)

                show_kb_rating_options = false;

                }

                " />

               

                <j:if test="${jvar_is_kb_languages_new_ui == 'true'}">

                <g:kb_languages_new_ui />

                 </j:if>

               

               

                <j:if test="${showAttachToTask}">

                <button id="attachToTask" title="${attachToTaskLabel}" class="btn btn-default navbar-btn snc-article-header-toolbar-button">${attachToTaskLabel}</button>

                </j:if>

               

               

                <j:if test="${showFlagArticle &amp;&amp; show_kb_rating_options}"><!-- keep the extra spaces in ' Flag Article ' to get upper case words -->

                <button id="flagArticle" title="${gs.getMessage(' Flag Article ')}" class="btn btn-default navbar-btn snc-article-header-toolbar-button">${gs.getMessage(" Flag Article ")}</button>

                </j:if>

               

               

                <j:if test="${showCreateIncident}">

                <button id="createIncident" title="${gs.getMessage('Create Incident')}" class="btn btn-default navbar-btn snc-article-header-toolbar-button">${gs.getMessage("Create Incident")}</button>

                </j:if>

               

               

                <j:if test="${showMoreInfo}">

                <button id="moreInformation" title="${gs.getMessage('Information')}" class="btn btn-default navbar-btn snc-article-header-toolbar-button">

                <j2:choose>

                <j2:when test="$[jvar_isMSIE8 || jvar_isMSIE7]">

                ${gs.getMessage("Information")}

                </j2:when>

                <j2:otherwise>

                <span class="icon icon-view"></span>

                </j2:otherwise>

                </j2:choose>

                </button>

                </j:if>

               

               

                <j:if test="${showUpdateAction}">

                <button id="editArticle" title="${gs.getMessage('Edit content')}" class="btn btn-default navbar-btn snc-article-header-toolbar-button">${gs.getMessage("Edit")}</button>

                </j:if>

                </div>

                </j:if>

                </div>

                <!-- Confirmation dialog box -->

                <div id="kb_confirmationDlg" tabindex="-1" aria-hidden="true" class="modal" role="dialog" aria-labelledby="modal1_title">

                <div class="modal-dialog modal-sm modal-alert">

                <div class="modal-content">

                <header class="modal-header">

                <h4 id="modal1_title" class="modal-title">${gs.getMessage('Cancel changes')}</h4>

                </header>

                <div class="modal-body">

                <p>${gs.getMessage('Discard all changes?')}</p>

                </div>

                <footer class="modal-footer flex">

                <button data-dismiss="modal" class="btn btn-default kb-no-btn" onclick="$j('#kb_confirmationDlg').hide()">${gs.getMessage('No')}</button>

                <button data-dismiss="modal" class="btn btn-danger kb-yes-btn">${gs.getMessage('Yes')}</button>

                </footer>

                </div>

                </div>

                </div>

               

               

              </j:jelly>