コード例 #1
0
        public static String getAdminActions() {

            Forum.Edits.TopicController ut = new Forum.Edits.TopicController();
            Forum.Edits.PostController up = new Forum.Edits.PostController();
            Forum.Edits.AttachmentController ac = new Forum.Edits.AttachmentController();
            Forum.Edits.TagController tc = new Forum.Edits.TagController();

            Forum.Moderators.TopicController t = new Forum.Moderators.TopicController();
            Forum.Moderators.TopicSaveController ts = new Forum.Moderators.TopicSaveController();
            Forum.Moderators.PostController p = new Forum.Moderators.PostController();
            Forum.Moderators.PostSaveController ps = new Forum.Moderators.PostSaveController();

            aActionWithId[] arrActions = new aActionWithId[] {


                // (admin) post
                p.AddCredit,
                ps.SaveCredit, ps.Ban, ps.UnBan, ps.Lock, ps.UnLock, ps.DeletePost, ps.DeleteTopic,

                // (edit) topic/post
                ut.Edit, ut.Update, up.Edit, up.Update,
                //up.SetReward, up.AddReward, up.SaveReward, 

                // (edit) attachment
                ac.Admin, ac.SetPermission, ac.SavePermission, ac.SaveSort, ac.Add, ac.SaveAdd, ac.Rename, ac.SaveRename, ac.Upload, ac.SaveUpload, ac.Delete,

                // (edit) tag
                tc.SaveTag
            };

            aAction[] otherActions = new aAction[] { 

                // (admin) topic 
                t.Sticky, t.Picked, t.Lock, t.Delete, t.Highlight, t.Category, t.SortSticky, t.GlobalSticky, t.Move,
                ts.Sticky, ts.StickyUndo, ts.Lock, ts.LockUndo, ts.GlobalSticky, ts.GlobalStickyUndo, ts.Pick, ts.PickedUndo, ts.Highlight, ts.HighlightUndo, ts.Delete,
                ts.Move, ts.SaveStickySort, ts.Category,
                t.GlobalSortSticky, ts.SaveGlobalStickySort
            };

            StringBuilder sb = new StringBuilder();
            addActions( sb, arrActions );
            addActions( sb, otherActions );

            return sb.ToString();
        }
コード例 #2
0
        public static String getAdminActions()
        {
            Forum.Edits.TopicController      ut = new Forum.Edits.TopicController();
            Forum.Edits.PostController       up = new Forum.Edits.PostController();
            Forum.Edits.AttachmentController ac = new Forum.Edits.AttachmentController();
            Forum.Edits.TagController        tc = new Forum.Edits.TagController();

            Forum.Moderators.TopicController     t  = new Forum.Moderators.TopicController();
            Forum.Moderators.TopicSaveController ts = new Forum.Moderators.TopicSaveController();
            Forum.Moderators.PostController      p  = new Forum.Moderators.PostController();
            Forum.Moderators.PostSaveController  ps = new Forum.Moderators.PostSaveController();

            aActionWithId[] arrActions = new aActionWithId[] {
                // (admin) post
                p.AddCredit,
                ps.SaveCredit, ps.Ban, ps.UnBan, ps.Lock, ps.UnLock, ps.DeletePost, ps.DeleteTopic,

                // (edit) topic/post
                ut.Edit, ut.Update, up.Edit, up.Update,
                //up.SetReward, up.AddReward, up.SaveReward,

                // (edit) attachment
                ac.Admin, ac.SetPermission, ac.SavePermission, ac.SaveSort, ac.Add, ac.SaveAdd, ac.Rename, ac.SaveRename, ac.Upload, ac.SaveUpload, ac.Delete,

                // (edit) tag
                tc.SaveTag
            };

            aAction[] otherActions = new aAction[] {
                // (admin) topic
                t.Sticky, t.Picked, t.Lock, t.Delete, t.Highlight, t.Category, t.SortSticky, t.GlobalSticky, t.Move,
                ts.Sticky, ts.StickyUndo, ts.Lock, ts.LockUndo, ts.GlobalSticky, ts.GlobalStickyUndo, ts.Pick, ts.PickedUndo, ts.Highlight, ts.HighlightUndo, ts.Delete,
                ts.Move, ts.SaveStickySort, ts.Category,
                t.GlobalSortSticky, ts.SaveGlobalStickySort
            };

            StringBuilder sb = new StringBuilder();

            addActions(sb, arrActions);
            addActions(sb, otherActions);

            return(sb.ToString());
        }
コード例 #3
0
        public void AdminToolbar()
        {
            int id = fb.Id;

            Moderators.TopicController     t  = new Forum.Moderators.TopicController();
            Moderators.TopicSaveController ts = new Forum.Moderators.TopicSaveController();

            set("adminSticky", urlto(t.Sticky, id));
            set("adminPicked", urlto(t.Picked, id));
            set("adminHighlight", urlto(t.Highlight, id));
            set("adminLock", urlto(t.Lock, id));

            set("adminStickyUndo", urlto(ts.StickyUndo, id));
            set("adminPickedUndo", urlto(ts.PickedUndo, id));
            set("adminHighlightUndo", urlto(ts.HighlightUndo, id));
            set("adminLockUndo", urlto(ts.LockUndo, id));
            set("adminCategory", urlto(t.Category, id));
            set("adminDelete", urlto(t.Delete, id));

            set("stickyOrderLink", urlto(t.SortSticky, id));


            String cmdGsticky        = string.Format("<i class=\"icon-circle-arrow-up\"></i> <span class=\"cmdGsticky\"> {0}</span>", alang("cmdGlobalSticky"));
            String cmd               = "<span class=\"ajaxCmd btn\" url=\"{0}\">{1}</span>";
            String adminGlobalSticky = string.Format(cmd, urlto(t.GlobalSticky, id), cmdGsticky);

            String gstickyOrderLink = urlto(t.GlobalSortSticky, id);

            adminGlobalSticky += " <a href=\"" + gstickyOrderLink + "\">&rsaquo;&rsaquo; " + alang("pSortStickyTopic") + "</a>";

            String gstickyUndoLink       = urlto(ts.GlobalStickyUndo, id);
            String cmdPost               = "<span class=\"ajaxForumPost btn\" url=\"{0}\"><i class=\"icon-circle-arrow-down\"></i> {1}</span>";
            String adminGlobalStickyUndo = string.Format(cmdPost, gstickyUndoLink, alang("cmdGlobalStickyUndo"));

            String moveLink  = urlto(t.Move, id);
            String adminMove = string.Format(cmd, moveLink, "<i class=\"icon-move\"></i> " + alang("moveTopic"));

            set("adminGsticky", adminGlobalSticky);
            set("adminGstickyUndo", adminGlobalStickyUndo);
            set("adminMove", adminMove);
        }
コード例 #4
0
ファイル: TopicListController.cs プロジェクト: sdujq/wojilu
        public void AdminToolbar()
        {
            int id = fb.Id;

            Moderators.TopicController t = new Forum.Moderators.TopicController();
            Moderators.TopicSaveController ts = new Forum.Moderators.TopicSaveController();

            set( "adminSticky", urlto( t.Sticky, id ) );
            set( "adminPicked", urlto( t.Picked, id ) );
            set( "adminHighlight", urlto( t.Highlight, id ) );
            set( "adminLock", urlto( t.Lock, id ) );

            set( "adminStickyUndo", urlto( ts.StickyUndo, id ) );
            set( "adminPickedUndo", urlto( ts.PickedUndo, id ) );
            set( "adminHighlightUndo", urlto( ts.HighlightUndo, id ) );
            set( "adminLockUndo", urlto( ts.LockUndo, id ) );
            set( "adminCategory", urlto( t.Category, id ) );
            set( "adminDelete", urlto( t.Delete, id ) );

            set( "stickyOrderLink", urlto( t.SortSticky, id ) );

            String cmdGsticky = string.Format( "<i class=\"icon-circle-arrow-up\"></i> <span class=\"cmdGsticky\"> {0}</span>", alang( "cmdGlobalSticky" ) );
            String cmd = "<span class=\"ajaxCmd btn\" url=\"{0}\">{1}</span>";
            String adminGlobalSticky = string.Format( cmd, urlto( t.GlobalSticky, id ), cmdGsticky );

            String gstickyOrderLink = urlto( t.GlobalSortSticky, id );
            adminGlobalSticky += " <a href=\"" + gstickyOrderLink + "\">&rsaquo;&rsaquo; " + alang( "pSortStickyTopic" ) + "</a>";

            String gstickyUndoLink = urlto( ts.GlobalStickyUndo, id );
            String cmdPost = "<span class=\"ajaxForumPost btn\" url=\"{0}\"><i class=\"icon-circle-arrow-down\"></i> {1}</span>";
            String adminGlobalStickyUndo = string.Format( cmdPost, gstickyUndoLink, alang( "cmdGlobalStickyUndo" ) );

            String moveLink = urlto( t.Move, id );
            String adminMove = string.Format( cmd, moveLink, "<i class=\"icon-move\"></i> " + alang( "moveTopic" ) );

            set( "adminGsticky", adminGlobalSticky );
            set( "adminGstickyUndo", adminGlobalStickyUndo );
            set( "adminMove", adminMove );
        }