]> git.plutz.net Git - rawnet/blobdiff - page_channel.sh
UI styling, breadcrumb navigation
[rawnet] / page_channel.sh
index d12f41719f3a70cd262ed532c4ccecadcf128494..159c865e66ad1705128b1b3099bc01418024956b 100755 (executable)
@@ -96,6 +96,9 @@ update_channel(){
       REDIRECT "${_BASE}/channel/${channel}/#ERROR_UPDATE_NOLOCK"
     fi
     ;;
+  update_channel_cancel)
+    REDIRECT "${_BASE}/channel/${channel}/"
+    ;;
   newvideo)
     video="$(POST video |checkid)"
     # database video create
@@ -161,14 +164,17 @@ elif [ "$channel" -a "$action" = edit ]; then
          [input name="name" value="$(HTML "$CHANNEL_NAME")" placeholder="Channel Name"]
          [textarea name="description" placeholder="Description" . $(HTML "$CHANNEL_DESCRIPTION")]
          [submit "action" "update_channel" . Update]
+         [submit "action" "update_channel_cancel" . Cancel]
        ]
        EOF
 elif [ "$channel" ]; then
   yield_page "$CHANNEL_NAME" "channel" <<-EOF
+       [nav [a href="../" Channels] - [span $(HTML "${CHANNEL_NAME:-(Unnamed Channel)}")]
+         $( [ "$USER_ID" -a ! "${CHANNEL_AUTHORS##*${USER_ID}*}" ] \
+             && printf ' - [a href="edit" edit]'
+          )
+       ]
        [h1 .name $(HTML "$CHANNEL_NAME")]
-       $( [ "$USER_ID" -a ! "${CHANNEL_AUTHORS##*${USER_ID}*}" ] \
-           && printf '[a href="edit" edit]'
-        )
        [div .description . ${CHANNEL_DESCR_CACHE}]
        [div .videos
          $( [ -f "$vid_db" -a -r "$vid_db" ] \