board layout admin page

classic Classic list List threaded Threaded
33 messages Options
12
Reply | Threaded
Open this post in threaded view
|

board layout admin page

fschmidt
Administrator
Please implement this page.  No theming is needed here.
Reply | Threaded
Open this post in threaded view
|

Re: board layout admin page

fschmidt
Administrator
priority 1 since I need this to theme the home page
Reply | Threaded
Open this post in threaded view
|

Re: board layout admin page

Hugo <Nabble>
I started a simple editor in rev 5c4cedf. Don't worry about the look, I will work on that later. This is unfinished, so the page doesn't even save the structure.

We discussed how many levels a Board can have, but I don't remember our decision. Supporting a flat (max-2-levels) layout would simplify things a lot. Should I implement many levels or should we start with a flat (max-2-levels) layout?
Reply | Threaded
Open this post in threaded view
|

Re: board layout admin page

fschmidt
Administrator
The page doesn't work for me.  I just see 2 buttons that do nothing.

Flat isn't the same as max-2-levels since flat means everything at the same level.  So I am fine with max-2-levels but not with flat.
Reply | Threaded
Open this post in threaded view
|

Re: board layout admin page

Hugo <Nabble>
We discussed this. I need a way to get/set the Board code in lua table format.

(I will continue working on the UI in the meanwhile)
Reply | Threaded
Open this post in threaded view
|

Re: board layout admin page

fschmidt
Administrator
Please check the latest code.  I split Board.save() into Board.to_doc() and Board.save_doc() .  You can call to_doc() and then manipulate that and then call save_doc() which will also update Board.  Does this work?
Reply | Threaded
Open this post in threaded view
|

Re: board layout admin page

Hugo <Nabble>
In my default forum the to_doc() function returns this:
{type="board", id=1, name="My Board", next_forum_id=2, depth=1, tree="{{id=1, is_forum=true, name=\"My Forum\"}}"}
The "tree" value is quoted. That quote is not needed, right? Any easy way to remove it? If not, I will have to do some parsing when I convert it to json.
Reply | Threaded
Open this post in threaded view
|

Re: board layout admin page

fschmidt
Administrator
Do you mean that you want the tree as a data structure (table) instead of a string?
Reply | Threaded
Open this post in threaded view
|

Re: board layout admin page

Hugo <Nabble>
I need it as a string, but without those quotes. Imagine a string that could be pasted in a lua program as a data structure. In my case, I will paste it as a JSON structure and then the code will navigate through it.
Reply | Threaded
Open this post in threaded view
|

Re: board layout admin page

fschmidt
Administrator
So I can return to you a data structure and you can call Io.repr() on that. And then you can pass me back a similar data structure to save.  Okay?
Reply | Threaded
Open this post in threaded view
|

Re: board layout admin page

Hugo <Nabble>
Yes, but I assume I can convert a string into a data structure in lua (i.e., the inverse of Io.repr).
Reply | Threaded
Open this post in threaded view
|

Re: board layout admin page

fschmidt
Administrator
I made the change.  You can see how to do the inverse of repr in Board.luan .  But if you really want JSON support, this should be added to Luan directly.
Reply | Threaded
Open this post in threaded view
|

Re: board layout admin page

Hugo <Nabble>
I've made some improvements in rev c0ea2c7. Please test the UI and let me know if you see issues. If it works fine, I will finish it.
Reply | Threaded
Open this post in threaded view
|

Re: board layout admin page

fschmidt
Administrator
I can't do this:

category
   forum 1
forum 2
Reply | Threaded
Open this post in threaded view
|

Re: board layout admin page

Hugo <Nabble>
What you can do is move forum2 to the top:

forum 2
category
    forum 1

I tried Proboards and Lefora and they don't allow your structure either.
Reply | Threaded
Open this post in threaded view
|

Re: board layout admin page

fschmidt
Administrator
Proboards and Lefora don't allow top level forums at all.  I don't see why you wouldn't allow top level forums anywhere.  Where drag-and-drop is ambiguous, you can use the horizontal position to decide what to do.
Reply | Threaded
Open this post in threaded view
|

Re: board layout admin page

Hugo <Nabble>
Please try rev 695399b and let me know if it works for you.
Reply | Threaded
Open this post in threaded view
|

Re: board layout admin page

fschmidt
Administrator
It looks fine.
Reply | Threaded
Open this post in threaded view
|

Re: board layout admin page

Hugo <Nabble>
Board.fancy_test() seems to be broken. I need this to finish the UI.
Reply | Threaded
Open this post in threaded view
|

Re: board layout admin page

Hugo <Nabble>
I was wrong and it seems to work. Assigning to me.
12