File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
WEB-INF/views/open/knowledge/partials Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 94
94
<i class =" fa fa-check-square-o" ></i >  ;
95
95
<%= jspUtil. label(" knowledge.view.label.answer" ) % >
96
96
</a >
97
+ <a id =" btnLoginToAnswerSurvey" class =" btn btn-info btn_col2 hide"
98
+ href =" <%= request. getContextPath() % > /protect.knowledge/view/<%= jspUtil. out(" knowledgeId" ) % >" >
99
+ <i class =" fa fa-check-square-o" ></i >  ;
100
+ <%= jspUtil. label(" knowledge.view.label.answer" ) % >
101
+ </a >
97
102
</div >
98
103
99
104
<%
Original file line number Diff line number Diff line change @@ -8,10 +8,18 @@ $(document).ready(function() {
8
8
if ( data . msg || ! data . exist ) {
9
9
return ;
10
10
}
11
- $ ( '#btnAnswerSurvey' ) . removeClass ( 'hide' ) ;
12
11
$ ( '#modalAnswerSurveyLabel' ) . text ( data . title ) ;
13
12
$ ( '#surveyDescription' ) . text ( data . description ) ;
14
13
document . __add_Template_Edit_Item ( data ) ;
14
+ if ( _LOGIN_USER_ID ) {
15
+ $ ( '#btnAnswerSurvey' ) . removeClass ( 'hide' ) ;
16
+ } else {
17
+ if ( data . loginNecessary ) {
18
+ $ ( '#btnLoginToAnswerSurvey' ) . removeClass ( 'hide' ) ;
19
+ } else {
20
+ $ ( '#btnAnswerSurvey' ) . removeClass ( 'hide' ) ;
21
+ }
22
+ }
15
23
} ) . fail ( function ( err ) {
16
24
console . log ( err ) ;
17
25
} ) ;
You can’t perform that action at this time.
0 commit comments