Fixed missing </div> causing nesting issues

A missing `</div>` in the recently converted library template caused nesting issues on the library page. I believe I placed it correctly and that everything is nested and indented properly now. However, if someone else could check especially the if statement between lines 18-40.