src/NCBS/WebsiteBundle/Resources/views/Default/askquestioninc.html.twig line 1

Open in your IDE?
  1. {% set nColNum = 0 %}
  2. {% if column_num is defined %}
  3.     {% set nColNum = column_num %}
  4. {% endif %}
  5. {% if nColNum < 2 %}
  6.     {% set sModalTitle = app.session.get('ui_str')["askquestion.title"]|replace({'"':"&quot;"})|raw %}
  7.     {% set sTitle = app.session.get('ui_str')["askquestion.hovertext"] %}
  8.     <li class="nav-item"><a href='javascript:askQuestion2("{{ sModalTitle }}","{{ path('ask_question') }}");' alt="{{ sTitle }}" title="{{ sTitle }}" class="nav-link"><i class="fa-regular fa-message-question"></i><span class="mobile-only"> {{ sTitle }}</span></a></li>
  9.     
  10. {% if ('bible' in sPath and 'stories' not in sPath and 'translations' not in sPath) or 'exposition' in sPath or 'multi' in sPath or 'videopage' in sPath or 'coursepage' in sPath or 'sermonpage' in sPath %}
  11.      {% set sTitle = app.session.get('ui_str')["homepage.bookmarkfortitle"]|raw %}
  12.     <li class="nav-item"><span class="mobile-hide" style="color:#0056b3;">&nbsp;|&nbsp;</span></i><li class="nav-item" id="liAddBookmark"><a href="javascript:addBookmark();" title="{{ sTitle }}" class="nav-link"><i class="fa-regular fa-star"></i><span class="mobile-only"> {{ sTitle }}</span></a></li>
  13.     {% set sTitle = app.session.get('ui_str')["deleteBookmark"]|raw %}
  14.     <li class="nav-item" id="liDeleteBookmark" style="display:none;"><a href="javascript:deleteCurrentBookmark();" title="{{ sTitle }}" class="nav-link"><i class="fa-solid fa-star" style="color:#FFC107;"></i><span class="mobile-only"> {{ sTitle }}</span></a></li>
  15.     {% set sTitle = app.session.get('ui_str')["homepage.makeanotefortitle"]|raw %}
  16.     <li class="nav-item"><a href="javascript:addNote();" title="{{ sTitle }}" class="nav-link"><i class="far fa-clipboard"></i><span class="mobile-only"> {{ sTitle }}</span></a></li> <script>
  17.     function deleteCurrentBookmark()
  18.     {
  19.         {% if bLoggedIn %}            
  20.             if(nCurrentBookmarkID != null)
  21.             {
  22.                 var sUrl = "/dbadmin/sc_deletemybookmark.php?id="+nCurrentBookmarkID;            
  23.                 $.ajax({ url: sUrl, success: function(sHtml) {
  24.                     nCurrentBookmarkID = null;
  25.                     showHideBookmarkIcon(false);
  26.                 } });
  27.             }
  28.         {% endif %}
  29.     }
  30.     
  31.     function checkBookmark()
  32.     {
  33.         {% if bLoggedIn %}            
  34.             if(nCurrentBookmarkID == null)
  35.             {
  36.                 var sUrl = document.URL;
  37.                 sUrl = encodeURIComponent(sUrl);                
  38.                 var sLink = "/dbadmin/sc_hasbookmark.php?url="+sUrl;                     
  39.                 $.ajax({ url: sLink, success: function(sHtml) {
  40.                     var nID = sHtml.trim(); 
  41.                     if(nID != '')
  42.                     {
  43.                         nCurrentBookmarkID = nID;
  44.                         showHideBookmarkIcon(true);
  45.                     }
  46.                     else
  47.                     {
  48.                         nCurrentBookmarkID = null;                        
  49.                         showHideBookmarkIcon(false);
  50.                     }
  51.                 } });
  52.             }
  53.         {% endif %}
  54.     }
  55.     
  56.     checkBookmark();
  57.     
  58.     var isAlt = false;
  59.     document.onkeyup=function(e){
  60.         if(e.keyCode == 18) isAlt=false;
  61.     }
  62.     document.onkeydown=function(e){
  63.         if(e.keyCode == 18) isAlt=true;
  64.         if(e.keyCode == 78 && isAlt) {
  65.             addNote();
  66.             return false;
  67.         }
  68.         else if(e.keyCode == 66 && isAlt) {
  69.             addBookmark();
  70.             return false;
  71.         }
  72.     }
  73. </script>       
  74. {% endif %}    
  75. {% if show_id is defined and show_id > 0 %}        
  76.     {% if bAdminUser %}
  77.         <li class="nav-item"><a href='javascript:editShow({{ show_id }});' alt="Edit Show" class="nav-link"><i class="far fa-pen-to-square"></i><span class="mobile-only"> Edit Show</span></a></li>
  78.     {% endif %}
  79. {% endif %}
  80. {% if sermon_id is defined and sermon_id > 0 %}        
  81.     {% if bAdminUser or bLNCAdmin %}
  82.         <li class="nav-item"><a href='javascript:editSermon({{ sermon_id }});' alt="Edit Sermon" class="nav-link"><i class="far fa-pen-to-square"></i><span class="mobile-only"> Edit Sermon</span></a></li>
  83.     {% endif %}
  84. {% endif %}
  85. {% if chapter_id_to_edit is defined %}        
  86.     {% if bAdminUser %}
  87.         <li class="nav-item"><a href='javascript:editChapter({{ chapter_id_to_edit }});' title="{{ app.session.get('ui_str')["generic.editicon"] }}" class="nav-link"><i class="far fa-pen-to-square"></i><span class="mobile-only"> {{ app.session.get('ui_str')["generic.editicon"] }}</span></a></li>
  88.         <script>
  89.             function editChapter(vChapterID) 
  90.             {
  91.                 var sUrl = "/dbadmin/bibleverselist.php?a=gridedit&showmaster=biblechapter&fk_id=" + vChapterID;
  92.                 popupWin(sUrl, 'add_win', screen.width * 0.8, screen.height * 0.8);
  93.             }
  94.         </script>
  95.     {% endif %}
  96. {% endif %}
  97.     
  98. {% endif %}