팁/튜토리얼

글쓰기 권한이 없을시 안내페이지로 넘어 가지않고 바로 경고창 띄우기

2015.08.27 08:15
5,658
1
0

게시판 리스트(list.html) 하단에 보면 쓰기버튼이 있는데
권한이 없을 시에는  message.html로 넘어가서 '권한이 없습니다' 라는 페이지가 나오는데

이렇게 안내 페이지로 넘어가지 않고 경고창만으로 띄우는 것입니다.

K-001.png

 

스킨마다 차이가 있겠지만 게시판 list.html에 (쓰기버턴 부분)

<a href="{getUrl('act','dispBoardWrite','document_srl','')}" onClick="alert('{$lang->msg_not_permitted}'); return false"|cond="!$grant->write_document">{$lang->cmd_write}

-----------***

onClick="alert('{$lang->msg_not_permitted}'); return false"|cond="!$grant->write_document" 
붉은색 부분이 추가된 내용입니다.
-------------------------------------------------------------
스케치북에서는 ........ list.html 213열? 쯤에

 

<a cond="!$mi->write_btm_btn || ($mi->write_btm_btn!='N' && $grant->write_document)" class="btn_img" href="{getUrl('act','dispBoardWrite','document_srl','')}" onClick="alert('{$lang->msg_not_permitted}'); return false"|cond="!$grant->write_document"><i class="ico_16px write"></i> {$lang->cmd_write}</a>

------------***

onClick="alert('{$lang->msg_not_permitted}'); return false"|cond="!$grant->write_document" 
붉은색 부분이 추가된 내용입니다.

댓글 0