mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 14:18:27 +01:00
Merge branch 'master' into fix/4727
This commit is contained in:
commit
1082c5b434
@ -6,8 +6,10 @@ HumHub Changelog
|
|||||||
- Fix #4668: table-responsive tables do not overflow due to default word break style
|
- Fix #4668: table-responsive tables do not overflow due to default word break style
|
||||||
- Fix #4679: Richtext extension scan does not include full title if title contains a `)`
|
- Fix #4679: Richtext extension scan does not include full title if title contains a `)`
|
||||||
- Fix #4714: Use HTTPS protocol for default OEmbed endpoint URLs
|
- Fix #4714: Use HTTPS protocol for default OEmbed endpoint URLs
|
||||||
- Fix #4649: Success message although password save error
|
|
||||||
- Fix #4727: Nav tabs with data-toggle are styled in link color
|
- Fix #4727: Nav tabs with data-toggle are styled in link color
|
||||||
|
- Fix #4649: Success message rendered although password validation failed
|
||||||
|
- Fix #4717: Repsonsive layout alignment issue on small screens
|
||||||
|
- Fix #4715: Call to `Content::canArchive()` throws error on global content
|
||||||
|
|
||||||
|
|
||||||
1.7.1 (November 27, 2020)
|
1.7.1 (November 27, 2020)
|
||||||
|
@ -409,6 +409,16 @@ class Content extends ActiveRecord implements Movable, ContentOwner
|
|||||||
*/
|
*/
|
||||||
public function canArchive()
|
public function canArchive()
|
||||||
{
|
{
|
||||||
|
// Currently global content can not be archived
|
||||||
|
if (!$this->contentcontainer_id) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// No need to archive content on an archived container, content is marked as archived already
|
||||||
|
if ($this->content->content->getContainer()->isArchived()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return $this->getContainer()->permissionManager->can(new ManageContent());
|
return $this->getContainer()->permissionManager->can(new ManageContent());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -572,9 +582,9 @@ class Content extends ActiveRecord implements Movable, ContentOwner
|
|||||||
* HActiveRecordContent (e.g. Post) to overwrite this behavior.
|
* HActiveRecordContent (e.g. Post) to overwrite this behavior.
|
||||||
* e.g. in case there is no wall entry available for this content.
|
* e.g. in case there is no wall entry available for this content.
|
||||||
*
|
*
|
||||||
* @since 0.11.1
|
|
||||||
* @param boolean $scheme
|
* @param boolean $scheme
|
||||||
* @return string the URL
|
* @return string the URL
|
||||||
|
* @since 0.11.1
|
||||||
*/
|
*/
|
||||||
public function getUrl($scheme = false)
|
public function getUrl($scheme = false)
|
||||||
{
|
{
|
||||||
@ -627,8 +637,8 @@ class Content extends ActiveRecord implements Movable, ContentOwner
|
|||||||
* Relation to ContentContainer model
|
* Relation to ContentContainer model
|
||||||
* Note: this is not a Space or User instance!
|
* Note: this is not a Space or User instance!
|
||||||
*
|
*
|
||||||
* @since 1.1
|
|
||||||
* @return \yii\db\ActiveQuery
|
* @return \yii\db\ActiveQuery
|
||||||
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
public function getContentContainer()
|
public function getContentContainer()
|
||||||
{
|
{
|
||||||
@ -638,8 +648,8 @@ class Content extends ActiveRecord implements Movable, ContentOwner
|
|||||||
/**
|
/**
|
||||||
* Returns the ContentTagRelation query.
|
* Returns the ContentTagRelation query.
|
||||||
*
|
*
|
||||||
* @since 1.2.2
|
|
||||||
* @return \yii\db\ActiveQuery
|
* @return \yii\db\ActiveQuery
|
||||||
|
* @since 1.2.2
|
||||||
*/
|
*/
|
||||||
public function getTagRelations()
|
public function getTagRelations()
|
||||||
{
|
{
|
||||||
@ -649,8 +659,8 @@ class Content extends ActiveRecord implements Movable, ContentOwner
|
|||||||
/**
|
/**
|
||||||
* Returns all content related tags ContentTags related to this content.
|
* Returns all content related tags ContentTags related to this content.
|
||||||
*
|
*
|
||||||
* @since 1.2.2
|
|
||||||
* @return \yii\db\ActiveQuery
|
* @return \yii\db\ActiveQuery
|
||||||
|
* @since 1.2.2
|
||||||
*/
|
*/
|
||||||
public function getTags($tagClass = ContentTag::class)
|
public function getTags($tagClass = ContentTag::class)
|
||||||
{
|
{
|
||||||
@ -660,9 +670,9 @@ class Content extends ActiveRecord implements Movable, ContentOwner
|
|||||||
/**
|
/**
|
||||||
* Adds a new ContentTagRelation for this content and the given $tag instance.
|
* Adds a new ContentTagRelation for this content and the given $tag instance.
|
||||||
*
|
*
|
||||||
* @since 1.2.2
|
|
||||||
* @param ContentTag $tag
|
* @param ContentTag $tag
|
||||||
* @return bool if the provided tag is part of another ContentContainer
|
* @return bool if the provided tag is part of another ContentContainer
|
||||||
|
* @since 1.2.2
|
||||||
*/
|
*/
|
||||||
public function addTag(ContentTag $tag)
|
public function addTag(ContentTag $tag)
|
||||||
{
|
{
|
||||||
@ -683,8 +693,8 @@ class Content extends ActiveRecord implements Movable, ContentOwner
|
|||||||
/**
|
/**
|
||||||
* Adds the given ContentTag array to this content.
|
* Adds the given ContentTag array to this content.
|
||||||
*
|
*
|
||||||
* @since 1.3
|
|
||||||
* @param $tags ContentTag[]
|
* @param $tags ContentTag[]
|
||||||
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
public function addTags($tags)
|
public function addTags($tags)
|
||||||
{
|
{
|
||||||
@ -770,11 +780,11 @@ class Content extends ActiveRecord implements Movable, ContentOwner
|
|||||||
/**
|
/**
|
||||||
* Checks if user can view this content.
|
* Checks if user can view this content.
|
||||||
*
|
*
|
||||||
* @since 1.1
|
|
||||||
* @param User|integer $user
|
* @param User|integer $user
|
||||||
* @return boolean can view this content
|
* @return boolean can view this content
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
* @throws \Throwable
|
* @throws \Throwable
|
||||||
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
public function canView($user = null)
|
public function canView($user = null)
|
||||||
{
|
{
|
||||||
@ -785,7 +795,7 @@ class Content extends ActiveRecord implements Movable, ContentOwner
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check global content visibility, private global content is visible for all users
|
// Check global content visibility, private global content is visible for all users
|
||||||
if(empty($this->contentcontainer_id) && !Yii::$app->user->isGuest) {
|
if (empty($this->contentcontainer_id) && !Yii::$app->user->isGuest) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -833,15 +843,15 @@ class Content extends ActiveRecord implements Movable, ContentOwner
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GLobal content
|
// GLobal content
|
||||||
if(!$this->container) {
|
if (!$this->container) {
|
||||||
return $this->isPublic();
|
return $this->isPublic();
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->container instanceof Space) {
|
if ($this->container instanceof Space) {
|
||||||
return $this->isPublic() && $this->container->visibility == Space::VISIBILITY_ALL;
|
return $this->isPublic() && $this->container->visibility == Space::VISIBILITY_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->container instanceof User) {
|
if ($this->container instanceof User) {
|
||||||
return $this->isPublic() && $this->container->visibility == User::VISIBILITY_ALL;
|
return $this->isPublic() && $this->container->visibility == User::VISIBILITY_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,8 +32,8 @@ class ArchiveLink extends \yii\base\Widget
|
|||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
if (!$this->content->content->canArchive() || $this->content->content->getContainer()->isArchived()) {
|
if (!$this->content->content->canArchive()) {
|
||||||
return;
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render('archiveLink', [
|
return $this->render('archiveLink', [
|
||||||
|
@ -18,18 +18,6 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 920px) {
|
|
||||||
body {
|
|
||||||
padding-top: 115px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 768px) and (max-width: 920px) {
|
|
||||||
body {
|
|
||||||
padding-top: 120px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
@ -106,12 +94,14 @@ input[type=select] {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 768px) and (max-width: 920px) {
|
@media (min-width: 768px) and (max-width: 991px) {
|
||||||
#topbar-first, #topbar-second {
|
.layout-nav-container, .layout-content-container {
|
||||||
.container {
|
color:#123456;
|
||||||
padding-left: 10px;
|
padding: 0 15px;
|
||||||
padding-right: 20px;
|
}
|
||||||
}
|
|
||||||
|
body {
|
||||||
|
padding-top: 120px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ body.modal-open {
|
|||||||
width: 900px;
|
width: 900px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 920px) {
|
@media screen and (max-width: 991px) {
|
||||||
.modal-dialog-large {
|
.modal-dialog-large {
|
||||||
width: auto !important;
|
width: auto !important;
|
||||||
padding-top: 30px;
|
padding-top: 30px;
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user