Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change BoardIndex Templates to be more flexible #4310

Merged

Conversation

jdarwood007
Copy link
Member

This technically adds a feature, but this feature prevents modifications from needing to modify the template if they need to inject a "fake" board. This also allows us to more easily handle redirects differently than boards.

@antes You may want to review this.
@Gwenwyfar Antes thinks you may be interested.

Signed-off-by: jdarwood007 unmonitored+github@sleepycode.com

This technically adds a feature, but this feature prevents modifications from needing to modify the template if they need to inject a "fake" board.  This also allows us to more easily handle redirects differently than boards.

Signed-off-by: jdarwood007 <unmonitored+github@sleepycode.com>
@jdarwood007 jdarwood007 added this to the RC 1 milestone Sep 17, 2017
@@ -178,6 +132,140 @@ function template_main()
}

/**
* Outs the board icon for a standard board.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: "Outs the..." is weird English. This should probably be "Outputs the..." or (better) "Prints the..."

Copy link
Member

@Sesquipedalian Sesquipedalian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the approach. Just requesting a couple adjustments to the comments.


/**
* Outs the board lastposts for a standard board or a redirect.
* This gets hidden on mobile if $board['last_post']['id'] is empty by the main template.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this comment is unclear.

Signed-off-by: jdarwood007 <unmonitored+github@sleepycode.com>
@jdarwood007
Copy link
Member Author

Thanks, I like it as well. SimpleDesk and other mods will be able to easily add "fake" boards now with custom content for the all the columns. The code is easier to read as well and should be easier on theme developers to make changes to it.

Updated the comments.

@Sesquipedalian Sesquipedalian merged commit 8af4064 into SimpleMachines:release-2.1 Sep 26, 2017
@jdarwood007 jdarwood007 deleted the boardindex_templates branch May 2, 2018 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants