asp.net mvc – How to use several models in a single view?

i tried adding two references in one view but it can't work
@model MaltipaleModel.test1
@model MaltipaleMode.test2
if we enter two time references, an error occurs
how to link several modes in single view.

database – PHP query in view will cause website error

I am using a global PHP request in a view to find out the number of member users.
The first query, which extracts the total number of users from the database works fine, but when I use the OR clause in a query for a comparison with a string, I received a website error as in the image below.

Here is the request:

fetchField();
print $count_users_premium;
?>

So if I want to use O some some_number = 3, it will work, but the comparison with a chain did not work. (Drupal 8 version)

enter description of image here

sharepoint online – Unable to display the "All items" view in the SPO page for a list of calendar events

I created the event list (event list) and created a page to host the "All items" view … only to find that the "List" display application don't see my calendar event list, but see "regular" lists. I tried to embed the URL of the "All items" view in the built-in application, but it shows the whole page (see image) and not the data from sight. I need this to display the "lines" in the SPO page … and keep the "Synchronize with Outlook" functionality so that I can't just create a "standard" custom list.

Anyone have any ideas on how to work around this in SPO?
PS: I would like to keep it as OOTB as possible because of the risk of breaking it with upgrades along the way.
And I am proficient in HTML but not JavaScript or harder languages ​​and the administrators of our site collection have blocked the use of SP Designer.

enter description of image here

8 – How to restrict access to view a block for a certain role?

The basis of the role visibility block is an integrated functionality of Drupal 8.

go to admin/structure/block and click on your desire block configure button

enter description of image here

then in the Visibility section there is Role that you can define for which role your module will display or not.

enter description of image here

sharepoint online – How do I change the font of the column header in the "Quick edit" view?

I'm having trouble using style tags to change the font color in the header of my list in quick edit mode. This problem only occurs in the quick edit view … I managed to change the header properties (color, font, size, etc.) in the view views non-fast editing using the following code:

.ms-vh2-nofilter, .ms-vh2, a.ms-headerSortTitleLink, .ms-vh2 a, .ms-vh, .ms-vh a {font-weight: bold; White color; font size: 1.05em; }

What am I missing? Is there a different CSS class that handles fast editing headers?

Update: The use of the following code has been recommended but still does not change the text in the column headers in quick edit mode.

  /* Change column header font properties */

.ms-vh, .ms-vh2-nofilter, .ms-vh2, a.ms-headerSortTitleLink, th (Title = & # 39; Justification & # 39;) {font-weight: bold; White colour! important; font size: 1.05em; }

Here's what it looks like:

Headers in the Quick Edit view

Here is what I would like it to look like (not fast editing appearance):
Normal view

8 – Is a block rendering table built with EntityViewBuilderInterface :: view supposed to make the block model complete or only the internal fields?

After making the custom blocks in the templates, I got this js error: Quick edit could not match the markup of the rendered entity field. What I have done so far:

In order to repeatedly render custom blocks in models, I wrote this function in mytheme.theme :

function render_block_in_template($block_id) {
  // $block = Drupal::entityTypeManager()->getStorage('block_content')->load($block_id);
  $block = Drupalblock_contentEntityBlockContent::load($block_id);

  if(!empty($block)) {
    $block_content = Drupal::entityTypeManager()
      ->getViewBuilder('block_content')
      ->view($block);

    if($block_content) {
      // kint($block_content);
      return $block_content;
    }
  }
}

And I call it mytheme_preprocess_node :

function mytheme_preprocess_node(&$variables) {
  $node = $variables('node');

  if($node->bundle() == 'some_bundle') {
    $variables('some_block') = render_block_in_template(12);
    $variables('some_other_block') = render_block_in_template(13);
    // ...
  }
}

Then I make the blocks node--some-bundle.html.twig :

{{ some_block }}
{{ some_other_block }}

So far so good. But I got this js error from quickedit.js:

Error: Quick edit could not associate markup of the rendered entity field
(with (data-quickedit-field-id="block_content/12/body/fr/full")) with
the corresponding entity markup: no parent DOM node found
with (data-quickedit-entity-id="block_content/12"). It’s typically
caused by the theme template for this type of entity forgetting to
print the attributes.

Which led me to this problem: the custom block layout creation module does not work – Quick Edit could not associate the markup of the rendered entity field, but the Applying the fix hasn't changed anything, and further reading makes me think that it's not exactly related.

If I {{ kint(some_block) }} in twig, the #attributes key with expected values ​​is here:

enter description of image here

and here is the HTML output:

// FIELD CONTENT

Finally, wrapping it manually with the following eliminates the error:

So it seems that the above packaging part of the block model is not rendered, only the fields are rendered and this causes the error.

Is there actually a bug or am I doing things wrong?

Connect SELECT, view one or the other record

I have to use the rule that is in the if in my selection.
The main rule is that if I have the purchase and the purchase has the approved status, I must bring the field with the URL of the final product if I do not have it. no, i have to bring the url of the sample product.

Main rule:
If I made the purchase and its status is 1, bring in type 2 scientific work,

**TPTRABALHO.id_tipo_trabalho_cientificos = IF (COMPRAUSER.compra_user.status_compra_id_status_compra == 1 AND TRBCIEN.id_trabalhos_cientificos == COMPRAUSER.trabalhos_cientificos_id_trabalhos_cientificos) THEN 2 ELSE 1**

or

**ARQTRBCINT.tipo_arquivos_trabalhos_cientificos_id_tipo_trabalho_cientificos = IF (COMPRAUSER.compra_user.status_compra_id_status_compra == 1 AND TRBCIEN.id_trabalhos_cientificos == COMPRAUSER.trabalhos_cientificos_id_trabalhos_cientificos) THEN 2 ELSE 1**

Here are some selections
SELECT * FROM dbdevvendaassessoria.compra_user
insert description of image here
SELECT * FROM dbdevvassassessoria.arquivos_trabalhos_cientificos;
insert description of image here
My final selection

SELECT * 
FROM dbdevvendaassessoria.compra_user AS COMPRAUSER
INNER JOIN dbdevvendaassessoria.trabalhos_cientificos AS TRBCIEN
ON TRBCIEN.id_trabalhos_cientificos = COMPRAUSER.trabalhos_cientificos_id_trabalhos_cientificos

INNER JOIN dbdevvendaassessoria.autor AS AUT
ON TRBCIEN.user_system_web_id_user_system_web = AUT.id_autor

INNER JOIN dbdevvendaassessoria.especialidade AS ESPC
ON TRBCIEN.especialidade_id_especialidade = ESPC.id_especialidade

INNER JOIN dbdevvendaassessoria.arquivos_trabalhos_cientificos AS ARQTRBCINT
ON TRBCIEN.id_trabalhos_cientificos = ARQTRBCINT.trabalhos_cientificos_id_trabalhos_cientificos

INNER JOIN dbdevvendaassessoria.tipo_arquivos_trabalhos_cientificos AS TPTRABALHO
ON TPTRABALHO.id_tipo_trabalho_cientificos = ARQTRBCINT.tipo_arquivos_trabalhos_cientificos_id_tipo_trabalho_cientificos

INNER JOIN dbdevvendaassessoria.user_app AS USERAPP
ON COMPRAUSER.user_app__id = USERAPP._id

WHERE TPTRABALHO.id_tipo_trabalho_cientificos = IF (COMPRAUSER.compra_user.status_compra_id_status_compra == 1 AND TRBCIEN.id_trabalhos_cientificos == COMPRAUSER.trabalhos_cientificos_id_trabalhos_cientificos) THEN 2 ELSE 1
AND USERAPP.tokenuser = '158040683493255678149091'
AND TRBCIEN.id_trabalhos_cientificos = 6

functions – Filter comments from other users. View only your own comments and comments from users of the editor role

I have a similar request to the question, but I'm not at all in php and I wouldn't know where to start to make such changes based on the answer provided.

It would be great if someone could help here. It is a simple school project where teachers can share homework with their students. Students should not be able to see other students' comments on an assignment.

Is there anyone who could help you with this task? The functions.php can be found on the link

Thanks in advance

hook_views_post_execute () does not work on AJAX View with exposed filters after the first refresh

I have a view that returns 5 entities of the same type. AJAX – activated, filters and filters exposed, everything works fine.

I need to add a new result, a user-defined entity, to the top of the view results. This line added by program must not be affected when the exposed filters are used and must remain at the top of the view, above the other 5 results returned, whatever happens.

I managed to add it with hook_views_post_execute () but when I use the exposed filters, the view returns to its original results and my addition is lost because AJAX is enabled on this view. hook_views_post_execute() does not seem to have any effect after the initial page load.

What is a good alternative for this scenario, i.e. change the view in a way that is not affected by AJAX refresh?

date – Sharepoint Online List – view future dd-mm-yyyy

I would like display the date (dd-mm-yyyy) of the first day of the following quarter in a column (call it Due date).

This would not be calculated based on another date entry in the Sharepoint Online list, just based on current system date.

For example. for today (03/24/2020), the due date would display 04/01/2020. When the 04/01/2020 arrives the Due date the field would be automatically updated on 7/1/2020 and displayed as such until 7/1/2020 arrives … etc. etc.

What would be the appropriate formula to enter when creating the new column?

Thank you!